From a8148b8b4052a12b2e67d8697dd30483199b4aa6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 Jan 2016 20:56:20 +0100 Subject: [PATCH] FIX Bug: Delivery order and date are not displayed #4372 --- htdocs/expedition/list.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 00796add031..30e276cca20 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -102,7 +102,7 @@ if ($socid) { $sql.= " AND e.fk_soc = ".$socid; } -if ($viewstatut <> '') { +if ($viewstatut <> '' && $viewstatut >= 0) { $sql.= " AND e.fk_statut = ".$viewstatut; } if ($search_ref_exp) $sql .= natural_search('e.ref', $search_ref_exp); @@ -113,6 +113,7 @@ if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit + 1,$offset); +//print $sql; $resql=$db->query($sql); if ($resql) { @@ -225,7 +226,8 @@ if ($resql) if ($conf->livraison_bon->enabled) { $shipment->fetchObjectLinked($shipment->id,$shipment->element); - $receiving=(! empty($shipment->linkedObjects['delivery'][0])?$shipment->linkedObjects['delivery'][0]:''); + $receiving=''; + if (count($shipment->linkedObjects['delivery']) > 0) $receiving=reset($shipment->linkedObjects['delivery']); // Ref print '';