diff --git a/ChangeLog b/ChangeLog index f363b3fa459..1f47f112ab2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ For users: - Fix: Can use $ in database and login/pass values. - Fix: No error on upgrade if there is orphelins tasks. - Fix: Failed to login when user agent string was longer than 128. +- Fix: bug #29526 : Numérotation Proposition Incorrecte après duplication ***** ChangeLog for 2.8 compared to 2.7 ***** diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index 1ce7850ae97..de0c9bb3b3a 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -89,7 +89,7 @@ class Propal extends CommonObject var $adresse; var $products=array(); - + var $lines = array(); var $labelstatut=array(); @@ -729,6 +729,10 @@ class Propal extends CommonObject $object->id=0; $object->statut=0; + require_once(DOL_DOCUMENT_ROOT ."/societe.class.php"); + $objsoc=new Societe($this->db); + $objsoc->fetch($object->socid); + if (empty($conf->global->PROPALE_ADDON) || ! is_readable(DOL_DOCUMENT_ROOT ."/includes/modules/propale/".$conf->global->PROPALE_ADDON.".php")) { $this->error='ErrorSetupNotComplete'; @@ -738,7 +742,7 @@ class Propal extends CommonObject require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/".$conf->global->PROPALE_ADDON.".php"); $obj = $conf->global->PROPALE_ADDON; $modPropale = new $obj; - $numpr = $modPropale->getNextValue($soc,$object); + $numpr = $modPropale->getNextValue($objsoc,$object); // Clear fields $object->ref = $numpr;