From 51ae50f16f36e180689abb2d89526b1b36660ead Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 19 Nov 2003 15:05:03 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20section=20commande=20=E0=20traiter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/index.php | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 31f9d8a919a..2c1f85a12a7 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -77,7 +77,7 @@ if ( $db->query($sql) ) print ''; /* - * Commandes à traiter + * Dernières commandes */ $sql = "SELECT c.rowid, c.ref, s.nom, s.idp FROM llx_commande as c, llx_societe as s"; $sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut = 1"; @@ -85,6 +85,7 @@ if ($socidp) { $sql .= " AND c.fk_soc = $socidp"; } +$sql .= " ORDER BY c.rowid DESC"; if ( $db->query($sql) ) { @@ -94,7 +95,39 @@ if ( $db->query($sql) ) $i = 0; print ''; print ''; - print ''; + print ''; + + while ($i < $num) + { + $var=!$var; + $obj = $db->fetch_object($i); + print ""; + print ''; + $i++; + } + print "
'.translate("Commandes à traiter").'
Commandes à traiter
rowid\">$obj->ref'.$obj->nom.'

"; + } +} +/* + * Dernières commandes + */ +$sql = "SELECT c.rowid, c.ref, s.nom, s.idp FROM llx_commande as c, llx_societe as s"; +$sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut = 2 "; +if ($socidp) +{ + $sql .= " AND c.fk_soc = $socidp"; +} +$sql .= " ORDER BY c.rowid DESC"; +$sql .= $db->plimit(5, 0); +if ( $db->query($sql) ) +{ + $num = $db->num_rows(); + if ($num) + { + $i = 0; + print ''; + print ''; + print ''; while ($i < $num) { @@ -111,7 +144,7 @@ if ( $db->query($sql) ) * Commandes à traiter */ $sql = "SELECT c.rowid, c.ref, s.nom, s.idp FROM llx_commande as c, llx_societe as s"; -$sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut > 1 "; +$sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut > 2 "; if ($socidp) { $sql .= " AND c.fk_soc = $socidp";
5 dernières commandes