Merged changes from stable branch up to 2.3.12
[fa-stable.git] / gl / manage / gl_accounts.php
index d211a491798cbbc7d0f60efa4f972ff9de54dfb1..99d2a8aba073f3c8ebb60f56222217dbc1100bb7 100644 (file)
@@ -12,7 +12,7 @@
 $page_security = 'SA_GLACCOUNT';
 $path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
+
 page(_($help_context = "Chart of Accounts"));
 
 include($path_to_root . "/includes/ui.inc");
@@ -78,7 +78,7 @@ if (isset($_POST['add']) || isset($_POST['update']))
                        if (get_post('inactive') == 1 && is_bank_account($_POST['account_code']))
                        {
                                display_error(_("The account belongs to a bank account and cannot be inactivated."));
-                       }       
+                       }
                elseif (update_gl_account($_POST['account_code'], $_POST['account_name'], 
                                $_POST['account_type'], $_POST['account_code2'])) {
                                update_record_status($_POST['account_code'], $_POST['inactive'],
@@ -128,32 +128,31 @@ function can_delete($selected_account)
        {
                display_error(_("Cannot delete this account because it is used by a bank account."));
                return false;
-       }       
+       }
 
        if (gl_account_in_stock_category($selected_account))
        {
                display_error(_("Cannot delete this account because it is used by one or more Item Categories."));
                return false;
-       }       
-       
+       }
+
        if (gl_account_in_stock_master($selected_account))
        {
                display_error(_("Cannot delete this account because it is used by one or more Items."));
                return false;
-       }       
-       
+       }
+
        if (gl_account_in_tax_types($selected_account))
        {
                display_error(_("Cannot delete this account because it is used by one or more Taxes."));
                return false;
-       }       
-       
+       }
+
        if (gl_account_in_cust_branch($selected_account))
        {
                display_error(_("Cannot delete this account because it is used by one or more Customer Branches."));
                return false;
-       }               
-       
+       }
        if (gl_account_in_suppliers($selected_account))
        {
                display_error(_("Cannot delete this account because it is used by one or more suppliers."));