diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 17bbe55158c..cf7b068c974 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -210,7 +210,6 @@ if ($action == 'delbookkeepingyearconfirm') { $deljournal=0; } - if (! empty($delyear) || ! empty($deljournal)) { $result = $object->deleteByYearAndJournal($delyear,$deljournal); if ($result < 0) { @@ -219,6 +218,12 @@ if ($action == 'delbookkeepingyearconfirm') { Header("Location: list.php"); exit; } + else + { + setEventMessages("NothingDeleted", null, 'warnings'); + Header("Location: list.php"); + exit; + } } if ($action == 'delmouvconfirm') { @@ -227,7 +232,11 @@ if ($action == 'delmouvconfirm') { if (! empty($mvt_num)) { $result = $object->deleteMvtNum($mvt_num); if ($result < 0) { - setEventMessages($object->error, $object->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); + } + else + { + setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); } Header("Location: list.php"); exit; @@ -257,7 +266,8 @@ if ($action == 'export_csv') { * View */ -$title_page = $langs->trans("Bookkeeping") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end); +$title_page = $langs->trans("Bookkeeping"); +if ($search_date_start || $search_date_end) $title_page .= ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end); llxHeader('', $title_page); // List @@ -315,9 +325,9 @@ print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield print '