Skip to content
Snippets Groups Projects
Commit 9cc344f8 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix problem in type and customer code substitution in numbering module

parent f5ccd943
No related branches found
No related tags found
No related merge requests found
......@@ -88,9 +88,12 @@ class mod_commande_saphir extends ModeleNumRefCommandes
global $conf,$langs,$mysoc;
$old_code_client=$mysoc->code_client;
$old_code_type=$mysoc->typent_code;
$mysoc->code_client='CCCCCCCCCC';
$mysoc->typent_code='TTTTTTTTTT';
$numExample = $this->getNextValue($mysoc,'');
$mysoc->code_client=$old_code_client;
$mysoc->typent_code=$old_code_type;
if (! $numExample)
{
......@@ -121,7 +124,9 @@ class mod_commande_saphir extends ModeleNumRefCommandes
return 0;
}
$numFinal=get_next_value($db,$mask,'commande','ref','',$objsoc,$object->date);
$date = ($object->date_commande ? $object->date_commande : $object->date);
$numFinal=get_next_value($db,$mask,'commande','ref','',$objsoc,$date);
return $numFinal;
}
......
......@@ -79,9 +79,12 @@ class mod_expedition_ribera extends ModelNumRefExpedition
global $conf,$langs,$mysoc;
$old_code_client=$mysoc->code_client;
$old_code_type=$mysoc->typent_code;
$mysoc->code_client='CCCCCCCCCC';
$mysoc->typent_code='TTTTTTTTTT';
$numExample = $this->getNextValue($mysoc,'');
$mysoc->code_client=$old_code_client;
$mysoc->typent_code=$old_code_type;
if (! $numExample)
{
......@@ -111,7 +114,9 @@ class mod_expedition_ribera extends ModelNumRefExpedition
return 0;
}
$numFinal=get_next_value($db,$mask,'expedition','ref','',$objsoc->code_client,$shipment->date_expedition);
$date = $shipment->date_expedition;
$numFinal=get_next_value($db,$mask,'expedition','ref','',$objsoc,$date);
return $numFinal;
}
......
......@@ -88,9 +88,12 @@ class mod_propale_saphir extends ModeleNumRefPropales
global $conf,$langs,$mysoc;
$old_code_client=$mysoc->code_client;
$old_code_type=$mysoc->typent_code;
$mysoc->code_client='CCCCCCCCCC';
$mysoc->typent_code='TTTTTTTTTT';
$numExample = $this->getNextValue($mysoc,'');
$mysoc->code_client=$old_code_client;
$mysoc->typent_code=$old_code_type;
if (! $numExample)
{
......@@ -121,8 +124,8 @@ class mod_propale_saphir extends ModeleNumRefPropales
return 0;
}
$date=$propal->datep;
$customercode=$objsoc->code_client;
$date = $propal->date;
$numFinal=get_next_value($db,$mask,'propal','ref','',$objsoc,$date);
return $numFinal;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment