invoice list - ajust hooks

This commit is contained in:
Alexis LAURIER 2021-03-18 17:00:57 +01:00
parent 06bc999614
commit ada5d728b5

View File

@ -693,19 +693,18 @@ if (!$sall) {
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : '');
} }
} }
} else {
$sql .= natural_search(array_keys($fieldstosearchall), $sall);
}
// Add GroupBy from hooks // Add GroupBy from hooks
$parameters = array('all' => $all, 'fieldstosearchall' => $fieldstosearchall); $parameters = array('all' => $all, 'fieldstosearchall' => $fieldstosearchall);
$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint; $sql .= $hookmanager->resPrint;
} else {
$sql .= natural_search(array_keys($fieldstosearchall), $sall);
}
// Add HAVING from hooks // Add HAVING from hooks
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint; $sql .= !empty($hookmanager->resPrint) ? (' HAVING 1=1 AND ' . $hookmanager->resPrint) : '';
$sql .= ' ORDER BY '; $sql .= ' ORDER BY ';
$listfield = explode(',', $sortfield); $listfield = explode(',', $sortfield);