From 23974daca47aee42dc14cf45e518b58fcaa6a3ee Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas <maxime@atm-consulting.fr> Date: Fri, 1 Aug 2014 09:57:08 +0200 Subject: [PATCH] Fix : shipping list SQL request was not filtering on shipping element --- htdocs/expedition/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 33082aa9193..b567773bc69 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -67,7 +67,7 @@ $sql = "SELECT e.rowid, e.ref"; $sql.= ", s.nom, s.rowid as socid"; $sql.= ", c.ref as commande_ref, c.rowid as commande_id"; $sql.= " FROM ".MAIN_DB_PREFIX."expedition as e"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'shipping'"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON el.fk_source = c.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; if (!$user->rights->societe->client->voir && !$socid) -- GitLab