Fix: bug #29526 : Numrotation Proposition Incorrecte aprs duplication

This commit is contained in:
Laurent Destailleur 2010-04-13 19:34:40 +00:00
parent 4846b9b98b
commit 916e3de6a7
4 changed files with 15 additions and 9 deletions

View File

@ -41,6 +41,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 *****

1
documents/.cvsignore Normal file
View File

@ -0,0 +1 @@
.htaccess

View File

@ -90,7 +90,7 @@ class Propal extends CommonObject
var $adresse;
var $products=array();
var $lines = array();
var $labelstatut=array();
@ -733,6 +733,10 @@ class Propal extends CommonObject
$object->id=0;
$object->statut=0;
require_once(DOL_DOCUMENT_ROOT ."/societe/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';
@ -742,7 +746,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;
@ -1615,7 +1619,7 @@ class Propal extends CommonObject
}
}
}
if (! $notrigger)
{
// Call triggers

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
*
@ -23,7 +23,7 @@
/**
\file htdocs/includes/modules/propale/mod_propale_saphir.php
\ingroup propale
\brief Fichier contenant la classe du modèle de numérotation de référence de propale Saphir
\brief File that contains the numbering module rules Saphir
\version $Id$
*/
@ -32,7 +32,7 @@ require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php")
/**
\class mod_propale_saphir
\brief Classe du modèle de numérotation de référence de propale Saphir
\brief Class of file that contains the numbering module rules Saphir
*/
class mod_propale_saphir extends ModeleNumRefPropales
{
@ -41,7 +41,7 @@ class mod_propale_saphir extends ModeleNumRefPropales
var $nom = 'Saphir';
/** \brief Renvoi la description du modele de numérotation
/** \brief Return description of module
* \return string Texte descripif
*/
function info()
@ -79,7 +79,7 @@ class mod_propale_saphir extends ModeleNumRefPropales
return $texte;
}
/** \brief Renvoi un exemple de numérotation
/** \brief Renvoi un exemple de numerotation
* \return string Example
*/
function getExample()
@ -109,7 +109,7 @@ class mod_propale_saphir extends ModeleNumRefPropales
require_once(DOL_DOCUMENT_ROOT ."/lib/functions2.lib.php");
// On défini critere recherche compteur
// On d<EFBFBD>fini critere recherche compteur
$mask=$conf->global->PROPALE_SAPHIR_MASK;
if (! $mask)