From 5c68ab9e5df161bbabaa9a98bf7f3d46cc480b20 Mon Sep 17 00:00:00 2001 From: Andre Cianfarani Date: Tue, 21 Mar 2006 09:08:35 +0000 Subject: [PATCH] modif pour engendrer le decompte des stock pour le produit et sousproduit lors de cloture commande, si module sousproduit et stock sont actives --- htdocs/commande/commande.class.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index 04d6fa8ac06..731a90510ac 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -209,19 +209,15 @@ class Commande { foreach($prods_arbo as $key => $value) { - // print "id : ".$value[1].' :qty: '.$value[0].'
'; - + // on décompte le stock de tous les sousproduits $mouvS = new MouvementStock($this->db); $entrepot_id = "1"; - $result=$mouvS->livraison($user, $value[0], $entrepot_id, $value[1]); - /* - print "::".$value[1]; - print $result; - */ - // $this->add_product($value[1], $value[0]); - + $result=$mouvS->livraison($user, $value[1], $entrepot_id, $value[0]); + } } + // on décompte le stock du produit + $result=$mouvS->livraison($user, $this->lignes[$i]->product_id, $entrepot_id, $this->lignes[$i]->qty); } }