display_error( _("The account code must be numeric."));
set_focus('account_code');
}
-
if ($input_error != 1)
{
if ($accounts_alpha == 2)
display_notification(_("New account has been added."));
$selected_account = $_POST['AccountList'] = $_POST['account_code'];
}
+ else
+ display_error(_("Account not added, possible duplicate Account Code."));
}
$Ajax->activate('_page_body');
}
if ($selected_account == "")
return false;
- if (key_in_foreign_table($selected_account, 'gl_trans', 'account', true))
+ if (key_in_foreign_table($selected_account, 'gl_trans', 'account'))
{
display_error(_("Cannot delete this account because transactions have been created using this account."));
return false;
return false;
}
- if (key_in_foreign_table($selected_account, 'bank_accounts', 'account_code', true))
+ if (key_in_foreign_table($selected_account, 'bank_accounts', 'account_code'))
{
display_error(_("Cannot delete this account because it is used by a bank account."));
return false;