Improved error handling.
[fa-stable.git] / gl / inquiry / gl_trial_balance.php
index 580cefa3372b1d7c7b11df38a6aec406800f7557..c0a3e56ab1c15108466eb271e9c8250a5bf252eb 100644 (file)
@@ -14,9 +14,9 @@ $path_to_root="../..";
 
 include_once($path_to_root . "/includes/session.inc");
 
+include_once($path_to_root . "/includes/ui.inc");
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/admin/db/fiscalyears_db.inc");
-include_once($path_to_root . "/includes/ui.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
 
 include_once($path_to_root . "/gl/includes/gl_db.inc");
@@ -169,6 +169,8 @@ function display_trial_balance()
        end_row();
 
        end_table(1);
+       if (($pbal = round2($pbal, user_price_dec()))  != 0)
+               display_warning(_("The Opening Balance is not in balance, probably due to a non closed Previous Fiscalyear."));
        div_end();
 }