Skip to content
Snippets Groups Projects
Commit 402924f6 authored by Maxime Kohlhaas's avatar Maxime Kohlhaas
Browse files

Fix : no origin on stock mvmt when order set back to draft

parent db23a522
No related branches found
No related tags found
No related merge requests found
......@@ -464,6 +464,7 @@ class Commande extends CommonOrder
if ($this->lines[$i]->fk_product > 0)
{
$mouvP = new MouvementStock($this->db);
$mouvP->origin = &$this;
// 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));
if ($result < 0) { $error++; $this->error=$mouvP->error; break; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment