diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 1b8934edbcd..1cdef9af6a9 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -66,7 +66,7 @@ $formaccounting = new FormAccounting($db); $formother = new FormOther($db); $form = new Form($db); -if (empty($search_date_start)) +if (empty($search_date_start) && ! GETPOSTISSET('formfilteraction')) { $month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1); $year_start = dol_print_date(dol_now(), '%Y'); @@ -115,6 +115,7 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x', $search_accountancy_code_end = ''; $search_date_start = ''; $search_date_end = ''; + $filter = array(); } @@ -135,7 +136,8 @@ if ($action == 'export_csv') { setEventMessages($object->error, $object->errors, 'errors'); } - foreach ($object->lines as $line) { + foreach ($object->lines as $line) + { print length_accountg($line->numero_compte) . $sep; print $object->get_compte_desc($line->numero_compte) . $sep; print price($line->debit) . $sep; @@ -153,7 +155,8 @@ else { // List $nbtotalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) + { $nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter); if ($nbtotalofrecords < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -166,6 +169,13 @@ else { } print '