From 44653eda86262fc9ca91902f179adb1f19d34e56 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Dec 2005 21:16:18 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20bug=20#15118=20overview:=20liste=20des=20?= =?UTF-8?q?exp=E9ditions=20en=20mode=20utilisateur=20externe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/expedition/liste.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/expedition/liste.php b/htdocs/expedition/liste.php index d72698f8b1e..910122caa3a 100644 --- a/htdocs/expedition/liste.php +++ b/htdocs/expedition/liste.php @@ -18,7 +18,6 @@ * * $Id$ * $Source$ - * */ /** @@ -58,17 +57,17 @@ $offset = $limit * $_GET["page"] ; llxHeader('',$langs->trans('ListOfSendings'),'ch-expedition.html'); $sql = "SELECT e.rowid, e.ref,".$db->pdate("e.date_expedition")." as date_expedition, e.fk_statut" ; -$sql .= " FROM ".MAIN_DB_PREFIX."expedition as e "; +$sql .= " FROM ".MAIN_DB_PREFIX."expedition as e"; +if ($socidp) $sql.=", ".MAIN_DB_PREFIX."commande as c"; $sql_add = " WHERE "; if ($socidp) { - $sql .= $sql_add . " s.idp = $socidp"; + $sql.= $sql_add . " e.fk_commande = c.rowid AND c.fk_soc = ".$socidp; $sql_add = " AND "; } - if (strlen($_POST["sf_ref"]) > 0) { - $sql .= $sql_add . " e.ref like '%".$_POST["sf_ref"] . "%'"; + $sql.= $sql_add . " e.ref like '%".$_POST["sf_ref"] . "%'"; } $expedition = new Expedition($db);