From 1aedcc54b5015bac945e54ec92084fb2edfef9f2 Mon Sep 17 00:00:00 2001 From: Vincent Dieltiens Date: Wed, 25 Aug 2021 17:25:15 +0200 Subject: [PATCH] Add hook to reception/list.php to allow add joins --- htdocs/reception/list.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index dd9f365c39a..9f06ce953e6 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -448,6 +448,12 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.rowid = ee.fk_target"; if (!$user->rights->societe->client->voir && !$socid) { // Internal user with no permission to see all $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } + +// Add joins from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; + $sql .= " WHERE e.entity IN (".getEntity('reception').")"; if (!$user->rights->societe->client->voir && !$socid) { // Internal user with no permission to see all $sql .= " AND e.fk_soc = sc.fk_soc";