diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 8c859e6e689..f41ecd820ad 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -59,8 +59,15 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $offset = $limit * $page; $upload_dir = $conf->bank->multidir_output[$object->entity ? $object->entity : $conf->entity]."/checkdeposits"; - -$filterdate = dol_mktime(0, 0, 0, GETPOST('fdmonth'), GETPOST('fdday'), GETPOST('fdyear')); +// filter by dates from / to +$search_date_start_day = GETPOST('search_date_start_day', 'int'); +$search_date_start_month = GETPOST('search_date_start_month', 'int'); +$search_date_start_year = GETPOST('search_date_start_year', 'int'); +$search_date_end_day = GETPOST('search_date_end_day', 'int'); +$search_date_end_month = GETPOST('search_date_end_month', 'int'); +$search_date_end_year = GETPOST('search_date_end_year', 'int'); +$search_date_start = dol_mktime(0, 0, 0, $search_date_start_month, $search_date_start_day, $search_date_start_year); +$search_date_end = dol_mktime(23, 59, 59, $search_date_end_month, $search_date_end_day, $search_date_end_year); $filteraccountid = GETPOST('accountid', 'int'); // Security check @@ -265,7 +272,15 @@ if ($action == 'builddoc' && $user->rights->banque->cheque) { */ if (GETPOST('removefilter')) { - $filterdate = ''; + // filter by dates from / to + $search_date_start_day = ''; + $search_date_start_month = ''; + $search_date_start_year = ''; + $search_date_end_day = ''; + $search_date_end_month = ''; + $search_date_end_year = ''; + $search_date_start = ''; + $search_date_end = ''; $filteraccountid = 0; } @@ -352,7 +367,13 @@ if ($action == 'new') { //print '