Fix problem in type and customer code substitution in numbering module
This commit is contained in:
parent
f5ccd943f1
commit
9cc344f8cc
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user