Merge pull request #6711 from atm-maxime/fix_stockmvt_origin
Fix : no origin on stock mvmt when order set back to draft
This commit is contained in:
commit
f059ab0042
@ -464,6 +464,7 @@ class Commande extends CommonOrder
|
|||||||
if ($this->lines[$i]->fk_product > 0)
|
if ($this->lines[$i]->fk_product > 0)
|
||||||
{
|
{
|
||||||
$mouvP = new MouvementStock($this->db);
|
$mouvP = new MouvementStock($this->db);
|
||||||
|
$mouvP->origin = &$this;
|
||||||
// We increment stock of product (and sub-products)
|
// We increment stock of product (and sub-products)
|
||||||
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("OrderBackToDraftInDolibarr",$this->ref));
|
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("OrderBackToDraftInDolibarr",$this->ref));
|
||||||
if ($result < 0) { $error++; $this->error=$mouvP->error; break; }
|
if ($result < 0) { $error++; $this->error=$mouvP->error; break; }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user