Fix: bug #29526 : Numrotation Proposition Incorrecte aprs duplication

This commit is contained in:
Laurent Destailleur 2010-04-13 19:33:18 +00:00
parent 293e56399e
commit cbf4aa2f2a
2 changed files with 7 additions and 2 deletions

View File

@ -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 *****

View File

@ -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;