Fix: Maxi bug. Value for date used in object numbering module was current date instead of date of object.

This commit is contained in:
Laurent Destailleur
2008-07-05 14:20:03 +00:00
parent 2ec5ffee48
commit 6d8755edd4
22 changed files with 769 additions and 641 deletions

View File

@@ -96,7 +96,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes
* \param commande Object order
* \return string Value if OK, 0 if KO
*/
function getNextValue($objsoc=0,$commande)
function getNextValue($objsoc,$commande)
{
global $db,$conf;
@@ -111,22 +111,22 @@ class mod_commande_saphir extends ModeleNumRefCommandes
return 0;
}
$numFinal=get_next_value($db,$mask,'commande','ref','',$objsoc->code_client);
$numFinal=get_next_value($db,$mask,'commande','ref','',$objsoc->code_client,$commande->date);
return $numFinal;
}
/** \brief Renvoie la r<>f<EFBFBD>rence de commande suivante non utilis<69>e
* \param objsoc Objet soci<EFBFBD>t<EFBFBD>
* \param commande Objet commande
* \return string Texte descripif
*/
function commande_get_num($objsoc=0,$commande)
/** \brief Return next free value
* \param objsoc Object third party
* \param objforref Object for number to search
* \return string Next free value
*/
function commande_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$commande);
return $this->getNextValue($objsoc,$objforref);
}
}
?>