Bug [0000045] Cannot close fiscal year
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 2 Sep 2008 23:05:24 +0000 (23:05 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 2 Sep 2008 23:05:24 +0000 (23:05 +0000)
CHANGELOG.txt
admin/fiscalyears.php

index b796eaaf196d33afe305ece190920b9e553b6681..050348e34f5178fb41118c00ba3256c6d8054f95 100644 (file)
@@ -21,10 +21,12 @@ $ -> Affected files
 
 03-Sep-2008 Joe Hunt
 # Bug [0000043] Inventory Adjustment Session doesn't update standard cost
-# Bug [0000044]Standard Cost error on credit note
+# Bug [0000044] Standard Cost error on credit note
 $ /inventory/includes/db/items_adjust_db.inc
   /purchasing/includes/db/grn_db.inc
   /purchasing/includes/invoice_db.inc
+# Bug [0000045] Cannot close fiscal year 
+$ /admin/fiscalyears.php
 
 02-Sep-2008 Joe Hunt
 # Bug when selecting report, List of Journal Entries, by type. Nothing selected.
index 9bbf4040579ac14c45f0a948c0675593b8251e55..8dfe4a8f5197d6c084d6558e07f0c9ab45896337 100644 (file)
@@ -52,16 +52,15 @@ function handle_submit()
 {
        global $selected_id, $Mode;
 
-       if (!check_data())
-               return false;
-
        if ($selected_id != -1)
        {
-               update_fiscalyear($_POST['from_date'], $_POST['closed']);
+               update_fiscalyear($selected_id, $_POST['closed']);
                display_notification(_('Selected fiscal year has been updated'));
        }
        else
        {
+               if (!check_data())
+                       return false;
                add_fiscalyear($_POST['from_date'], $_POST['to_date'], $_POST['closed']);
                display_notification(_('New fiscal year has been added'));
        }