diff --git a/src/Contract.php b/src/Contract.php index 93714d37ed09..dfb42c301533 100644 --- a/src/Contract.php +++ b/src/Contract.php @@ -1017,17 +1017,19 @@ public static function showCentral(bool $display = true) ]; $options['criteria'][0]['field'] = 13; - $options['criteria'][0]['value'] = '>0'; + $options['criteria'][0]['searchtype'] = 'morethan'; + $options['criteria'][0]['value'] = 'NOW'; $options['criteria'][1]['field'] = 13; - $options['criteria'][1]['value'] = '<7'; + $options['criteria'][1]['searchtype'] = 'lessthan'; + $options['criteria'][1]['value'] = '7DAY'; $twig_params['items'][] = [ 'link' => $CFG_GLPI["root_doc"] . "/front/contract.php?" . Toolbox::append_params($options), 'text' => __('Contracts where notice begins in less than 7 days'), 'count' => $contractpre7 ]; - $options['criteria'][0]['value'] = '>6'; - $options['criteria'][1]['value'] = '<30'; + $options['criteria'][0]['value'] = '6DAY'; + $options['criteria'][1]['value'] = '1MONTH'; $twig_params['items'][] = [ 'link' => $CFG_GLPI["root_doc"] . "/front/contract.php?" . Toolbox::append_params($options), 'text' => __('Contracts where notice begins in less than 30 days'),