Task 1074 : add link to source document on stock movement

This commit is contained in:
Maxime Kohlhaas
2014-03-15 02:18:39 +01:00
parent 85f33a66a3
commit 67342486a6
8 changed files with 71 additions and 4 deletions

View File

@@ -253,6 +253,7 @@ class Commande extends CommonOrder
if ($this->lines[$i]->fk_product > 0)
{
$mouvP = new MouvementStock($this->db);
$mouvP->origin = &$this;
// We decrement stock of product (and sub-products)
$result=$mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("OrderValidatedInDolibarr",$num));
if ($result < 0) { $error++; }