Use correct thirdparty for numbering module
This commit is contained in:
parent
f591e2b1b1
commit
d076ffe73b
@ -48,14 +48,24 @@ switch ($action)
|
|||||||
|
|
||||||
case 'valide_achat':
|
case 'valide_achat':
|
||||||
|
|
||||||
|
$thirdpartyid = $_SESSION['CASHDESK_ID_THIRDPARTY'];
|
||||||
|
|
||||||
$company=new Societe($db);
|
$company=new Societe($db);
|
||||||
$company->fetch($conf->global->CASHDESK_ID_THIRDPARTY);
|
$company->fetch($thirdpartyid);
|
||||||
|
|
||||||
$invoice=new Facture($db);
|
$invoice=new Facture($db);
|
||||||
$invoice->date=dol_now();
|
$invoice->date=dol_now();
|
||||||
$invoice->type= Facture::TYPE_STANDARD;
|
$invoice->type= Facture::TYPE_STANDARD;
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
// To use a specific numbering module for POS, reset $conf->global->FACTURE_ADDON and other vars here
|
||||||
|
// and restore after values just after
|
||||||
|
|
||||||
$num=$invoice->getNextNumRef($company);
|
$num=$invoice->getNextNumRef($company);
|
||||||
|
|
||||||
|
// TODO Restore save values
|
||||||
|
|
||||||
|
|
||||||
$obj_facturation->numInvoice($num);
|
$obj_facturation->numInvoice($num);
|
||||||
|
|
||||||
$obj_facturation->getSetPaymentMode($_POST['hdnChoix']);
|
$obj_facturation->getSetPaymentMode($_POST['hdnChoix']);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user