$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");
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'],
{
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."));