Close #17632
This commit is contained in:
parent
a0380c262e
commit
3e5e74c687
@ -338,10 +338,14 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Add where from hooks
|
// Add where from hooks
|
||||||
$parameters = array();
|
$parameters = array('search_dfyear' => $search_dfyear, 'search_op2df'=>$search_op2df);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters); // 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;
|
||||||
if ($search_dfyear > 0 && $search_op2df) {
|
// Add HAVING from hooks
|
||||||
|
$parameters = array('search_dfyear' => $search_dfyear, 'search_op2df'=>$search_op2df);
|
||||||
|
$reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
|
if (empty($reshook)) {
|
||||||
|
if ($search_dfyear > 0 && $search_op2df) {
|
||||||
if ($search_op2df == '<=') {
|
if ($search_op2df == '<=') {
|
||||||
$sql .= " HAVING MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") <= '".$db->idate(dol_get_last_day($search_dfyear, $search_dfmonth, false))."'";
|
$sql .= " HAVING MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") <= '".$db->idate(dol_get_last_day($search_dfyear, $search_dfmonth, false))."'";
|
||||||
} elseif ($search_op2df == '>=') {
|
} elseif ($search_op2df == '>=') {
|
||||||
@ -349,7 +353,9 @@ if ($search_dfyear > 0 && $search_op2df) {
|
|||||||
} else {
|
} else {
|
||||||
$sql .= " HAVING MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") <= '".$db->idate(dol_get_last_day($search_dfyear, $search_dfmonth, false))."' AND MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") >= '".$db->idate(dol_get_first_day($search_dfyear, $search_dfmonth, false))."'";
|
$sql .= " HAVING MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") <= '".$db->idate(dol_get_last_day($search_dfyear, $search_dfmonth, false))."' AND MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") >= '".$db->idate(dol_get_first_day($search_dfyear, $search_dfmonth, false))."'";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
$nbtotalofrecords = '';
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user