X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=inline;f=gl%2Fmanage%2Fgl_accounts.php;h=c78becaa1605fd725238840aeddb6cec4bcd915e;hb=ce80130dd1e2226e9d1efd57611f0c34af2eea95;hp=459c37667369188fc1438ba54d16315c5daf1a85;hpb=4d4371fb200bb27fd6b680ebd2d1aaa450a0be7e;p=fa-stable.git diff --git a/gl/manage/gl_accounts.php b/gl/manage/gl_accounts.php index 459c3766..c78becaa 100644 --- a/gl/manage/gl_accounts.php +++ b/gl/manage/gl_accounts.php @@ -71,12 +71,17 @@ if (isset($_POST['add']) || isset($_POST['update'])) $_POST['account_code'] = strtoupper($_POST['account_code']); if ($selected_account) { - update_gl_account($_POST['account_code'], $_POST['account_name'], $_POST['account_type'], $_POST['account_code2']); + 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'); + $Ajax->activate('account_code'); // in case of status change display_notification(_("Account data has been updated.")); } else { - add_gl_account($_POST['account_code'], $_POST['account_name'], $_POST['account_type'], $_POST['account_code2']); + add_gl_account($_POST['account_code'], $_POST['account_name'], + $_POST['account_type'], $_POST['account_code2']); $selected_account = $_POST['AccountList'] = $_POST['account_code']; display_notification(_("New account has been added.")); } @@ -205,11 +210,17 @@ start_form(); if (db_has_gl_accounts()) { - echo "