Merge pull request #18504 from vincentjdc/reception-list-printFieldListFrom-hook

Add  hook printFieldListFrom to reception/list.php to allow add joins
This commit is contained in:
Laurent Destailleur 2021-08-28 17:44:53 +02:00 committed by GitHub
commit fa2a4e4713
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -491,6 +491,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";