From 61e231b2c93567c213dda636cfb2215c80dab903 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 31 May 2006 08:09:02 +0000 Subject: [PATCH] =?UTF-8?q?r=E9cup=E9ration=20de=20l'id=20de=20la=20comman?= =?UTF-8?q?de?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/commande.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index 161ba408049..63a0f8f9b33 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -959,7 +959,7 @@ class Commande function fetch_lignes($only_product=0) { $this->lignes = array(); - $sql = 'SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice'; + $sql = 'SELECT l.fk_product, l.fk_commande, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice'; if ($only_product==1) { $sql .= ' FROM '.MAIN_DB_PREFIX.'commandedet as l'; @@ -984,6 +984,7 @@ class Commande $ligne = new CommandeLigne(); $objp = $this->db->fetch_object($result); $ligne->id = $objp->rowid; + $ligne->commande_id = $objp->fk_commande; $ligne->qty = $objp->qty; $ligne->price = $objp->price; $ligne->tva_tx = $objp->tva_tx;