diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index c3dd606adb2..eb991d55543 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -46,6 +46,8 @@ $search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST( $search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); $search_date_creation_start = dol_mktime(0, 0, 0, GETPOST('date_creation_startmonth', 'int'), GETPOST('date_creation_startday', 'int'), GETPOST('date_creation_startyear', 'int')); $search_date_creation_end = dol_mktime(0, 0, 0, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int')); +$search_date_modification_start = dol_mktime(0, 0, 0, GETPOST('date_modification_startmonth', 'int'), GETPOST('date_modification_startday', 'int'), GETPOST('date_modification_startyear', 'int')); +$search_date_modification_end = dol_mktime(0, 0, 0, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int')); if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) { $action = 'delbookkeepingyear'; @@ -55,7 +57,6 @@ if (GETPOST("button_export_file_x") || GETPOST("button_export_file.x") || GETPOS } $search_accountancy_code = GETPOST("search_accountancy_code"); - $search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha'); if ($search_accountancy_code_start == - 1) { $search_accountancy_code_start = ''; @@ -66,7 +67,6 @@ if ($search_accountancy_code_end == - 1) { } $search_accountancy_aux_code = GETPOST("search_accountancy_aux_code"); - $search_accountancy_aux_code_start = GETPOST('search_accountancy_aux_code_start', 'alpha'); if ($search_accountancy_aux_code_start == - 1) { $search_accountancy_aux_code_start = ''; @@ -115,8 +115,10 @@ $arrayfields=array( 't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1), 't.code_journal'=>array('label'=>$langs->trans("Codejournal"), 'checked'=>1), 't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0), + 't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0), ); + /* * Actions */ @@ -145,6 +147,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x', $search_date_end = ''; $search_date_creation_start = ''; $search_date_creation_end = ''; + $search_date_modification_start = ''; + $search_date_modification_end = ''; } // Must be after the remove filter action, before the export. @@ -220,9 +224,19 @@ if (! empty($search_date_creation_start)) { } if (! empty($search_date_creation_end)) { $filter['t.date_creation<='] = $search_date_creation_end; - $tmp=dol_getdate($search_date_end); + $tmp=dol_getdate($search_date_creation_end); $param .= '&date_creation_endmonth=' . $tmp['mon'] . '&date_creation_endday=' . $tmp['mday'] . '&date_creation_endyear=' . $tmp['year']; } +if (! empty($search_date_modification_start)) { + $filter['t.tms>='] = $search_date_modification_start; + $tmp=dol_getdate($search_date_modification_start); + $param .= '&date_modification_startmonth=' . $tmp['mon'] . '&date_modification_startday=' . $tmp['mday'] . '&date_modification_startyear=' . $tmp['year']; +} +if (! empty($search_date_modification_end)) { + $filter['t.tms<='] = $search_date_modification_end; + $tmp=dol_getdate($search_date_modification_end); + $param .= '&date_modification_endmonth=' . $tmp['mon'] . '&date_modification_endday=' . $tmp['mday'] . '&date_modification_endyear=' . $tmp['year']; +} if ($action == 'delbookkeeping') { @@ -512,6 +526,20 @@ if (! empty($arrayfields['t.date_creation']['checked'])) print ''; print ''; } +// Date modification +if (! empty($arrayfields['t.tms']['checked'])) +{ + print '