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;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
$old_code_client=$mysoc->code_client;
|
$old_code_client=$mysoc->code_client;
|
||||||
|
$old_code_type=$mysoc->typent_code;
|
||||||
$mysoc->code_client='CCCCCCCCCC';
|
$mysoc->code_client='CCCCCCCCCC';
|
||||||
|
$mysoc->typent_code='TTTTTTTTTT';
|
||||||
$numExample = $this->getNextValue($mysoc,'');
|
$numExample = $this->getNextValue($mysoc,'');
|
||||||
$mysoc->code_client=$old_code_client;
|
$mysoc->code_client=$old_code_client;
|
||||||
|
$mysoc->typent_code=$old_code_type;
|
||||||
|
|
||||||
if (! $numExample)
|
if (! $numExample)
|
||||||
{
|
{
|
||||||
@ -121,7 +124,9 @@ class mod_commande_saphir extends ModeleNumRefCommandes
|
|||||||
return 0;
|
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;
|
return $numFinal;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,9 +79,12 @@ class mod_expedition_ribera extends ModelNumRefExpedition
|
|||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
$old_code_client=$mysoc->code_client;
|
$old_code_client=$mysoc->code_client;
|
||||||
|
$old_code_type=$mysoc->typent_code;
|
||||||
$mysoc->code_client='CCCCCCCCCC';
|
$mysoc->code_client='CCCCCCCCCC';
|
||||||
|
$mysoc->typent_code='TTTTTTTTTT';
|
||||||
$numExample = $this->getNextValue($mysoc,'');
|
$numExample = $this->getNextValue($mysoc,'');
|
||||||
$mysoc->code_client=$old_code_client;
|
$mysoc->code_client=$old_code_client;
|
||||||
|
$mysoc->typent_code=$old_code_type;
|
||||||
|
|
||||||
if (! $numExample)
|
if (! $numExample)
|
||||||
{
|
{
|
||||||
@ -111,7 +114,9 @@ class mod_expedition_ribera extends ModelNumRefExpedition
|
|||||||
return 0;
|
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;
|
return $numFinal;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,9 +88,12 @@ class mod_propale_saphir extends ModeleNumRefPropales
|
|||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
$old_code_client=$mysoc->code_client;
|
$old_code_client=$mysoc->code_client;
|
||||||
|
$old_code_type=$mysoc->typent_code;
|
||||||
$mysoc->code_client='CCCCCCCCCC';
|
$mysoc->code_client='CCCCCCCCCC';
|
||||||
|
$mysoc->typent_code='TTTTTTTTTT';
|
||||||
$numExample = $this->getNextValue($mysoc,'');
|
$numExample = $this->getNextValue($mysoc,'');
|
||||||
$mysoc->code_client=$old_code_client;
|
$mysoc->code_client=$old_code_client;
|
||||||
|
$mysoc->typent_code=$old_code_type;
|
||||||
|
|
||||||
if (! $numExample)
|
if (! $numExample)
|
||||||
{
|
{
|
||||||
@ -121,8 +124,8 @@ class mod_propale_saphir extends ModeleNumRefPropales
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$date=$propal->datep;
|
$date = $propal->date;
|
||||||
$customercode=$objsoc->code_client;
|
|
||||||
$numFinal=get_next_value($db,$mask,'propal','ref','',$objsoc,$date);
|
$numFinal=get_next_value($db,$mask,'propal','ref','',$objsoc,$date);
|
||||||
|
|
||||||
return $numFinal;
|
return $numFinal;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user