diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index ea33a5ec6fb..52f05347c6f 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -456,7 +456,7 @@ if ($_GET["id"] > 0) { if ($value > 0) { - $sql = "SELECT e.label as entrepot, ps.reel, p.label, p.ref, p.rowid as product_id"; + $sql = "SELECT e.rowid as entrepot_id, e.label as entrepot, ps.reel, p.label, p.ref, p.rowid as product_id"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e, ".MAIN_DB_PREFIX."product_stock as ps, ".MAIN_DB_PREFIX."product as p"; $sql .= " WHERE e.rowid = ps.fk_entrepot AND ps.fk_product = p.rowid AND ps.fk_product = $key"; $sql .= " AND e.statut = 1 AND reel < $value"; @@ -474,7 +474,8 @@ if ($_GET["id"] > 0) print ""; print ''; print ''.img_object($langs->trans("ShowProduct"),"product").' '.$obja->ref.' - '.$obja->label; - print ''.$obja->entrepot.'Stock : '.$obja->reel.'' .img_warning($langs->trans("Alert")).''; + print ''.$obja->entrepot.''; + print 'Stock : '.$obja->reel.'' .img_warning($langs->trans("Alert")).''; print "\n"; $i++; }