FIX: filter by entity on contact is missing

This commit is contained in:
Florian HENRY 2024-01-19 09:17:21 +01:00
parent d04cfa89ce
commit 26bb72d12f

View file

@ -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