Ajout de traces sur modele numrotation

This commit is contained in:
Laurent Destailleur
2006-10-07 11:20:25 +00:00
parent 9db78c5535
commit d040a3f7f8
3 changed files with 24 additions and 5 deletions

View File

@@ -110,9 +110,14 @@ class mod_commande_marbre extends ModeleNumRefCommandes
$row = $db->fetch_row($resql);
if ($row) $coyymm = substr($row[0],0,6);
}
else
{
dolibarr_syslog("mod_commande_marbre::getNextValue sql=".$sql);
return -1;
}
// Si champ respectant le mod<6F>le a <20>t<EFBFBD> trouv<75>e
if (eregi('^'+$this->prefix+'[0-9][0-9][0-9][0-9]',$coyymm))
if (eregi('^'.$this->prefix.'[0-9][0-9][0-9][0-9]',$coyymm))
{
// Recherche rapide car restreint par un like sur champ index<65>
$posindice=8;
@@ -133,6 +138,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes
$yymm = strftime("%y%m",time());
$num = sprintf("%04s",$max+1);
dolibarr_syslog("mod_commande_marbre::getNextValue return ".$this->prefix."$yymm-$num");
return $this->prefix."$yymm-$num";
}