Fix reception set-draft with stock rule enabled.
This commit is contained in:
parent
79d3a35789
commit
636d594301
@ -1944,7 +1944,7 @@ class Reception extends CommonObject
|
|||||||
|
|
||||||
// We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record
|
// We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record
|
||||||
$inventorycode = '';
|
$inventorycode = '';
|
||||||
$result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ReceptionBackToDraftInDolibarr", $this->ref), '', '', '', '', 0, $inventorycode);
|
$result = $mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ReceptionBackToDraftInDolibarr", $this->ref), '', '', '', '', 0, $inventorycode);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$this->error = $mouvS->error;
|
$this->error = $mouvS->error;
|
||||||
$this->errors = $mouvS->errors;
|
$this->errors = $mouvS->errors;
|
||||||
@ -1956,7 +1956,7 @@ class Reception extends CommonObject
|
|||||||
|
|
||||||
// We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record
|
// We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record
|
||||||
$inventorycode = '';
|
$inventorycode = '';
|
||||||
$result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ReceptionBackToDraftInDolibarr", $this->ref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, '', 0, $inventorycode);
|
$result = $mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ReceptionBackToDraftInDolibarr", $this->ref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, '', 0, $inventorycode);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$this->error = $mouvS->error;
|
$this->error = $mouvS->error;
|
||||||
$this->errors = $mouvS->errors;
|
$this->errors = $mouvS->errors;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user