Skip to content

Commit

Permalink
Fixed search option for late invoices. Added contributor details. (#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
W1W1-M authored Aug 20, 2024
1 parent 5590cc1 commit daf3566
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions htdocs/compta/facture/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Copyright (C) 2018 Charlene Benke <[email protected]>
* Copyright (C) 2019-2021 Alexandre Spangaro <[email protected]>
* Copyright (C) 2023 Nick Fragoulis
* Copyright (C) 2024 William Mead <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -146,8 +147,8 @@
$search_btn = GETPOST('button_search', 'alpha');
$search_remove_btn = GETPOST('button_removefilter', 'alpha');

$search_late = GETPOST('search_late');
if ($search_late == 'late') {
$search_option = GETPOST('search_option');
if ($search_option == 'late') {
$search_status = '1';
}
$filtre = GETPOST('filtre', 'alpha');
Expand Down Expand Up @@ -392,7 +393,7 @@
$toselect = array();
$search_array_options = array();
$search_categ_cus = 0;
$search_late = '';
$search_option = '';
$socid = 0;
}

Expand Down Expand Up @@ -832,7 +833,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 @@ -1148,8 +1149,8 @@
if ($show_files) {
$param .= '&show_files='.urlencode($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 @@ -1289,7 +1290,7 @@
}
// alert on due date
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('Alert').' <input type="checkbox" name="search_late" value="late"'.($search_late == 'late' ? ' checked' : '').'>';
$moreforfilter .= $langs->trans('Alert').' <input type="checkbox" name="search_option" value="late"'.($search_option == 'late' ? ' checked' : '').'>';
$moreforfilter .= '</div>';

$parameters = array();
Expand Down

0 comments on commit daf3566

Please sign in to comment.