Skip to content
Snippets Groups Projects
Commit 23974dac authored by Maxime Kohlhaas's avatar Maxime Kohlhaas
Browse files

Fix : shipping list SQL request was not filtering on shipping element

parent cf72c05a
Branches
Tags
No related merge requests found
...@@ -67,7 +67,7 @@ $sql = "SELECT e.rowid, e.ref"; ...@@ -67,7 +67,7 @@ $sql = "SELECT e.rowid, e.ref";
$sql.= ", s.nom, s.rowid as socid"; $sql.= ", s.nom, s.rowid as socid";
$sql.= ", c.ref as commande_ref, c.rowid as commande_id"; $sql.= ", c.ref as commande_ref, c.rowid as commande_id";
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e"; $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."commande as c ON el.fk_source = c.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc";
if (!$user->rights->societe->client->voir && !$socid) if (!$user->rights->societe->client->voir && !$socid)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment