From cbf4aa2f2a7f54f6df940816e0d2102a3ae47ad3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Apr 2010 19:33:18 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20bug=20#29526=20:=20Num=E9rotation=20Prop?= =?UTF-8?q?osition=20Incorrecte=20apr=E8s=20duplication?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 1 + htdocs/propal.class.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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;