From 26bb72d12ff8db230f23641968233df8a16b6154 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 19 Jan 2024 09:17:21 +0100 Subject: [PATCH] FIX: filter by entity on contact is missing --- htdocs/core/lib/company.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 3ae98a259f5..f905fbe7262 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -71,6 +71,7 @@ function societe_prepare_head(Societe $object) $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql .= " WHERE p.fk_soc = ".((int) $object->id); + $sql .= " AND entity IN (".getEntity($object->element).")"; // Add where from hooks $parameters = array('contacttab' => true); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook