Added date check against closed fiscal year.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 26 Jan 2011 14:58:25 +0000 (14:58 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 26 Jan 2011 14:58:25 +0000 (14:58 +0000)
gl/manage/close_period.php

index 76fc317f237eda874a4fd33dc1a491cc85b991fc..fa21d00b05fdc4f22108fccf3326440bfa6fe739 100644 (file)
@@ -34,6 +34,12 @@ function check_data()
                set_focus('date');
                return false;
        }
+       if (!is_date_in_fiscalyears($date, false))
+       {
+               display_error(_("Selected date is not in fiscal year or the year is closed."));
+               set_focus('date');
+               return false;
+       }
        if (date1_greater_date2(sql2date(get_company_pref('gl_closing_date')), $_POST['date']))
        {
                if (!$allow_gl_reopen) {