Skip to content

Commit

Permalink
fix central list for 7 and 30 contract notices
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 authored and btry committed Sep 18, 2024
1 parent 3c8803c commit bd215b8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Contract.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down

0 comments on commit bd215b8

Please sign in to comment.