X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=inline;f=gl%2Fmanage%2Fgl_accounts.php;h=c78becaa1605fd725238840aeddb6cec4bcd915e;hb=ce80130dd1e2226e9d1efd57611f0c34af2eea95;hp=363c1bd2f41f7d0ab77cda2b1c9d65a9bcd8945f;hpb=f9a5e41b07e0692301a89b475b6e1fce680e0c8d;p=fa-stable.git diff --git a/gl/manage/gl_accounts.php b/gl/manage/gl_accounts.php index 363c1bd2..c78becaa 100644 --- a/gl/manage/gl_accounts.php +++ b/gl/manage/gl_accounts.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 10; $path_to_root="../.."; include($path_to_root . "/includes/session.inc"); @@ -62,17 +71,21 @@ 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'], $_POST['tax_code']); + 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'], $_POST['tax_code']); + 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.")); - $Ajax->activate('_page_body'); } - + $Ajax->activate('_page_body'); } } @@ -186,7 +199,7 @@ if (isset($_POST['delete'])) { delete_gl_account($selected_account); $selected_account = $_POST['account_code'] = $_POST['AccountList'] = ''; - display_notification("Selected account has been deleted"); + display_notification(_("Selected account has been deleted")); $Ajax->activate('_page_body'); } } @@ -197,11 +210,17 @@ start_form(); if (db_has_gl_accounts()) { - echo "