From 5e2684bac044d7d9d98fdf612442ddafea5593d9 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sun, 3 Apr 2005 15:53:27 +0000 Subject: [PATCH] =?UTF-8?q?Gestion=20du=20cas=20ou=20aucun=20entreport=20n?= =?UTF-8?q?'a=20=E9t=E9=20d=E9finit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/expedition/commande.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index 4f9d0618fae..3c43635cf2d 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -228,7 +228,16 @@ if ($_GET["id"] > 0) $html->select_array("entrepot_id",$entrepot->list_array()); print ''; */ - print ''; + print ''; + if (sizeof($entrepot->list_array())) + { + print ''; + } + else + { + print 'Aucun entrpôt définit, definissez en un'; + } + print ''; } print ""; print "\n"; @@ -294,10 +303,10 @@ if ($_GET["id"] > 0) $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd , ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."expedition as e"; $sql .= " WHERE cd.fk_commande = ".$commande->id." AND cd.rowid = ed.fk_commande_ligne AND ed.fk_expedition = e.rowid"; $sql .= " ORDER BY cd.fk_product"; - $result = $db->query($sql); - if ($result) + $resql = $db->query($sql); + if ($resql) { - $num = $db->num_rows(); + $num = $db->num_rows($resql); $i = 0; $total = 0; if ($num) @@ -313,7 +322,7 @@ if ($_GET["id"] > 0) $var=True; while ($i < $num) { - $objp = $db->fetch_object(); + $objp = $db->fetch_object($resql); print ""; if ($objp->fk_product > 0) {