From 27f3acedc40e06f6bb6f7e03aa0a1c7d773f57a4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Jul 2005 23:53:52 +0000 Subject: [PATCH] =?UTF-8?q?Look:=20Modif=20esth=E9tique=20mineure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/fiche.php | 14 +++++++++----- htdocs/compta/commande/fiche.php | 5 +++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 98dcbeb62fa..ae4e7554421 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -356,18 +356,19 @@ if ($_GET["action"] == 'create' && $user->rights->commande->creer) print ''.$langs->trans("Ref").''.$langs->trans("Product").''; print ''.$langs->trans("Price").''.$langs->trans("Discount").''.$langs->trans("Qty").''; + $var=false; + $sql = "SELECT pt.rowid, p.label as product, p.ref, pt.price, pt.qty, p.rowid as prodid, pt.remise_percent"; $sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt, ".MAIN_DB_PREFIX."product as p WHERE pt.fk_product = p.rowid AND pt.fk_propal = $propalid"; $sql .= " ORDER BY pt.rowid ASC"; $result = $db->query($sql); if ($result) { - $num = $db->num_rows(); + $num = $db->num_rows($result); $i = 0; - $var=True; while ($i < $num) { - $objp = $db->fetch_object(); + $objp = $db->fetch_object($result); $var=!$var; print "[$objp->ref]\n"; print ''.img_object($langs->trans("ShowProduct"),"product").' '.$objp->product.''; @@ -608,10 +609,13 @@ else print '  '; print "\n"; } - $var=True; + + $var=true; while ($i < $num) { $objp = $db->fetch_object($result); + + $var=!$var; print ""; if ($objp->fk_product > 0) { @@ -910,5 +914,5 @@ else $db->close(); -llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index 997ec588b66..8e4d9efe3a9 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -200,6 +200,7 @@ if ($_GET["id"] > 0) while ($i < $num) { $objp = $db->fetch_object($result); + $var=!$var; print ""; if ($objp->fk_product > 0) { @@ -360,11 +361,11 @@ if ($_GET["id"] > 0) else { // Commande non trouvée - print "Commande inexistante ou accés refusé"; + print "Commande inexistante"; } } $db->close(); -llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter('$Date$ - $Revision$'); ?>