X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fmanage%2Fgl_accounts.php;h=345d3791fa8a17e21e71fbfc15858e30286932e9;hb=84e2db4845a51b074d9441520a0025987fdb4f70;hp=8944d385f35a311682e97a83e49197f0a969d0e5;hpb=46c5f7a65a7659a44ae8254c63152074363d3987;p=fa-stable.git diff --git a/gl/manage/gl_accounts.php b/gl/manage/gl_accounts.php index 8944d385..345d3791 100644 --- a/gl/manage/gl_accounts.php +++ b/gl/manage/gl_accounts.php @@ -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"); @@ -76,7 +76,11 @@ if (isset($_POST['add']) || isset($_POST['update'])) if ($selected_account) { - if (update_gl_account($_POST['account_code'], $_POST['account_name'], + 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'], 'chart_master', 'account_code');