From ba55f10ea2ab8338d533c96cdd902a9c8fa701ef Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Sep 2008 20:59:34 +0000 Subject: [PATCH] Fix: Duplicate rows return by fetch --- htdocs/fourn/commande/fiche.php | 6 +++--- htdocs/fourn/fournisseur.commande.class.php | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 68091000c7f..a1952410dbb 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -738,15 +738,15 @@ if ($id > 0) { print ' '; } - //Todo: Modifier la classe pour utiliser le champ total_ttc + print ''.price($objp->total_ht).''; if ($commande->statut == 0 && $user->rights->fournisseur->commande->creer) { - print 'rowid.'#'.$objp->rowid.'">'; + print 'id.'#'.$objp->id.'">'; print img_edit(); print ''; - print 'rowid.'">'; + print 'id.'">'; print img_delete(); print ''; } diff --git a/htdocs/fourn/fournisseur.commande.class.php b/htdocs/fourn/fournisseur.commande.class.php index f36541d78dc..951351f1d9a 100644 --- a/htdocs/fourn/fournisseur.commande.class.php +++ b/htdocs/fourn/fournisseur.commande.class.php @@ -142,6 +142,7 @@ class CommandeFournisseur extends Commande $ligne = new CommandeFournisseurLigne($this->db); + $ligne->id = $objp->rowid; $ligne->desc = $objp->description; // Description ligne $ligne->qty = $objp->qty; $ligne->tva_tx = $objp->tva_tx;