Add group by and having hooks on invoice list

This commit is contained in:
Alexis LAURIER 2021-03-18 16:51:02 +01:00
parent c3f8e0e397
commit 06bc999614

View File

@ -697,6 +697,16 @@ if (!$sall) {
$sql .= natural_search(array_keys($fieldstosearchall), $sall);
}
// Add GroupBy from hooks
$parameters = array('all' => $all, 'fieldstosearchall' => $fieldstosearchall);
$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
// Add HAVING from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= ' ORDER BY ';
$listfield = explode(',', $sortfield);
$listorder = explode(',', $sortorder);