New: Stock change on invoice validation support all warehouse into point

of sale module
This commit is contained in:
Laurent Destailleur 2011-11-15 20:27:32 +01:00
parent 05c177ef52
commit 3d01d77427
2 changed files with 5 additions and 4 deletions

View File

@ -217,7 +217,7 @@ switch ($action)
$resultcreate=$invoice->create($user,0,0); $resultcreate=$invoice->create($user,0,0);
if ($resultcreate > 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; $id = $invoice->id;
@ -235,7 +235,7 @@ switch ($action)
{ {
if (! $error) if (! $error)
{ {
$result=$payment->addPaymentToBank($user,'payment','(CustomerInvoicePayment)',$bankaccountid,'',''); $result=$payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccountid, '', '');
if (! $result > 0) if (! $result > 0)
{ {
$errmsg=$paiement->error; $errmsg=$paiement->error;

View File

@ -1494,6 +1494,7 @@ class Facture extends CommonObject
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
$error=0; $error=0;
dol_syslog(get_class($this).'::validate force_number='.$force_number,' idwarehouse='.$idwarehouse, LOG_WARNING);
// Check parameters // Check parameters
if (! $this->brouillon) if (! $this->brouillon)