diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index e998b99cd65..3fa15930145 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -201,12 +201,10 @@ if ($handle) print ''.$langs->trans("Activate").''; } print ''; - - $commande = new Commande($db); // Info $htmltooltip=''; - $nextval=$module->getNextValue($mysoc,$commande); + $nextval=$module->getNextValue($mysoc); if ($nextval != $langs->trans("NotAvailable")) { $htmltooltip=''.$langs->trans("NextValue").': '.$nextval; diff --git a/htdocs/admin/fournisseur.php b/htdocs/admin/fournisseur.php index caed089e46d..d1158a5cc25 100644 --- a/htdocs/admin/fournisseur.php +++ b/htdocs/admin/fournisseur.php @@ -202,12 +202,10 @@ if ($handle) print ''.$langs->trans("Activate").''; } print ''; - - $commande = new CommandeFournisseur($db); // Info $htmltooltip=''; - $nextval=$module->getNextValue($mysoc,$commande); + $nextval=$module->getNextValue($mysoc); if ($nextval != $langs->trans("NotAvailable")) { $htmltooltip=''.$langs->trans("NextValue").': '.$nextval; diff --git a/htdocs/admin/propale.php b/htdocs/admin/propale.php index d7bb05bc659..0e1eb6646bc 100644 --- a/htdocs/admin/propale.php +++ b/htdocs/admin/propale.php @@ -215,12 +215,10 @@ if ($handle) print ''.$langs->trans("Activate").''; } print ''; - - $propale = new Propal($db); // Info $htmltooltip=''; - $nextval=$module->getNextValue($mysoc,$propale); + $nextval=$module->getNextValue($mysoc); if ($nextval != $langs->trans("NotAvailable")) { $htmltooltip=''.$langs->trans("NextValue").': '.$nextval; diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index c494c06166a..9ef00a53d29 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -174,7 +174,7 @@ class Commande extends CommonObject $obj = new $classname(); $numref = ""; - $numref = $obj->getNextValue($soc,$this); + $numref = $obj->getNextValue($soc); if ( $numref != "") { diff --git a/htdocs/fourn/commande/modules/mod_commande_fournisseur_orchidee.php b/htdocs/fourn/commande/modules/mod_commande_fournisseur_orchidee.php index b141abaa610..bd17faff0f3 100644 --- a/htdocs/fourn/commande/modules/mod_commande_fournisseur_orchidee.php +++ b/htdocs/fourn/commande/modules/mod_commande_fournisseur_orchidee.php @@ -232,7 +232,7 @@ function info() * \param commande Objet commande fournisseur * \return string Valeur */ - function getNextValue($objsoc,$commande) + function getNextValue($objsoc) { global $db,$conf; @@ -443,9 +443,9 @@ function info() * \param commande Objet commande * \return string Texte descripif */ - function commande_get_num($objsoc=0,$commande) + function commande_get_num($objsoc=0) { - return $this->getNextValue($objsoc,$commande); + return $this->getNextValue($objsoc); } } diff --git a/htdocs/includes/modules/commande/mod_commande_saphir.php b/htdocs/includes/modules/commande/mod_commande_saphir.php index b8fd007aabc..3021c2f0571 100644 --- a/htdocs/includes/modules/commande/mod_commande_saphir.php +++ b/htdocs/includes/modules/commande/mod_commande_saphir.php @@ -232,7 +232,7 @@ function info() * \param commande Objet commande * \return string Valeur */ - function getNextValue($objsoc,$commande) + function getNextValue($objsoc=0) { global $db,$conf; @@ -443,9 +443,9 @@ function info() * \param commande Objet commande * \return string Texte descripif */ - function commande_get_num($objsoc=0,$commande) + function commande_get_num($objsoc=0) { - return $this->getNextValue($objsoc,$commande); + return $this->getNextValue($objsoc); } } diff --git a/htdocs/includes/modules/propale/mod_propale_saphir.php b/htdocs/includes/modules/propale/mod_propale_saphir.php index 5c094b57555..2c792dd5454 100644 --- a/htdocs/includes/modules/propale/mod_propale_saphir.php +++ b/htdocs/includes/modules/propale/mod_propale_saphir.php @@ -232,7 +232,7 @@ function info() * \param propale Objet propale * \return string Valeur */ - function getNextValue($objsoc=0,$propale) + function getNextValue($objsoc=0) { global $db,$conf;