New: Stock change on invoice validation support all warehouse into point
of sale module
This commit is contained in:
parent
05c177ef52
commit
3d01d77427
@ -217,7 +217,7 @@ switch ($action)
|
||||
$resultcreate=$invoice->create($user,0,0);
|
||||
if ($resultcreate > 0)
|
||||
{
|
||||
$resultvalid=$invoice->validate($user,$obj_facturation->num_facture());
|
||||
$resultvalid=$invoice->validate($user, $obj_facturation->num_facture(), (isset($_SESSION["CASHDESK_ID_WAREHOUSE"])?$_SESSION["CASHDESK_ID_WAREHOUSE"]:0));
|
||||
|
||||
$id = $invoice->id;
|
||||
|
||||
@ -235,7 +235,7 @@ switch ($action)
|
||||
{
|
||||
if (! $error)
|
||||
{
|
||||
$result=$payment->addPaymentToBank($user,'payment','(CustomerInvoicePayment)',$bankaccountid,'','');
|
||||
$result=$payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccountid, '', '');
|
||||
if (! $result > 0)
|
||||
{
|
||||
$errmsg=$paiement->error;
|
||||
|
||||
@ -1310,7 +1310,7 @@ class Facture extends CommonObject
|
||||
|
||||
/**
|
||||
* Tag la facture comme paye completement (close_code non renseigne) ou partiellement (close_code renseigne) + appel trigger BILL_PAYED
|
||||
*
|
||||
*
|
||||
* @param User $user Objet utilisateur qui modifie
|
||||
* @param string $close_code Code renseigne si on classe a payee completement alors que paiement incomplet (cas escompte par exemple)
|
||||
* @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple)
|
||||
@ -1372,7 +1372,7 @@ class Facture extends CommonObject
|
||||
* Tag la facture comme non payee completement + appel trigger BILL_UNPAYED
|
||||
* Fonction utilisee quand un paiement prelevement est refuse,
|
||||
* ou quand une facture annulee et reouverte.
|
||||
*
|
||||
*
|
||||
* @param User $user Object user that change status
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
@ -1494,6 +1494,7 @@ class Facture extends CommonObject
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||
|
||||
$error=0;
|
||||
dol_syslog(get_class($this).'::validate force_number='.$force_number,' idwarehouse='.$idwarehouse, LOG_WARNING);
|
||||
|
||||
// Check parameters
|
||||
if (! $this->brouillon)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user