From 06bc9996148450ef8c4daef0809cfa05be626fff Mon Sep 17 00:00:00 2001 From: Alexis LAURIER Date: Thu, 18 Mar 2021 16:51:02 +0100 Subject: [PATCH] Add group by and having hooks on invoice list --- htdocs/compta/facture/list.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 3722cb3a98a..81225b289bf 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -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);