Skip to content

Commit

Permalink
Fix filter bug, overdue invoices from home page (#30214)
Browse files Browse the repository at this point in the history
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
  • Loading branch information
clementgde and eldy authored Jul 3, 2024
1 parent 7680504 commit be87065
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions htdocs/compta/facture/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@
$search_product_category = GETPOST('search_product_category', 'intcomma');
$search_fac_rec_source_title = GETPOST("search_fac_rec_source_title", 'alpha');

$search_late = GETPOST('search_late');
if ($search_late == 'late') {
$search_option = GETPOST('search_option');
if ($search_option == 'late') {
$search_status = '1';
}

Expand Down Expand Up @@ -398,7 +398,7 @@
$toselect = array();
$search_array_options = array();
$search_categ_cus = 0;
$search_late = '';
$search_option = '';
$socid = 0;
}

Expand Down Expand Up @@ -859,7 +859,7 @@
if ($search_datelimit_end) {
$sql .= " AND f.date_lim_reglement <= '".$db->idate($search_datelimit_end)."'";
}
if ($search_late == 'late') {
if ($search_option == 'late') {
$sql .= " AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->client->warning_delay)."'";
}
/*if ($search_sale > 0) {
Expand Down Expand Up @@ -1181,8 +1181,8 @@
if ($show_files) {
$param .= '&show_files='.urlencode((string) ($show_files));
}
if ($search_late) {
$param .= "&search_late=".urlencode($search_late);
if ($search_option) {
$param .= "&search_option=".urlencode($search_option);
}
if ($optioncss != '') {
$param .= '&optioncss='.urlencode($optioncss);
Expand Down Expand Up @@ -1322,7 +1322,7 @@
}
// alert on due date
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= '<label for="search_late">'.$langs->trans('Alert').' </label><input type="checkbox" name="search_late" id="search_late" value="late"'.($search_late == 'late' ? ' checked' : '').'>';
$moreforfilter .= '<label for="search_option">'.$langs->trans('Alert').' </label><input type="checkbox" name="search_option" id="search_option" value="late"'.($search_option == 'late' ? ' checked' : '').'>';
$moreforfilter .= '</div>';

$parameters = array();
Expand Down

0 comments on commit be87065

Please sign in to comment.