X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fmanage%2Fbank_accounts.php;h=fee5e89daefc58acfec9ff9e4456836d974b7c53;hb=b8ca787d4997e98d29af963f9e23534796381c44;hp=b10c408e3f4aa9f72df146d96c73c4a43c585b40;hpb=53d942f2a0d20cce5e9c409c6485867ce0869e4d;p=fa-stable.git diff --git a/gl/manage/bank_accounts.php b/gl/manage/bank_accounts.php index b10c408e..fee5e89d 100644 --- a/gl/manage/bank_accounts.php +++ b/gl/manage/bank_accounts.php @@ -36,7 +36,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') if ($Mode=='ADD_ITEM' && (gl_account_in_bank_accounts(get_post('account_code')) || key_in_foreign_table(get_post('account_code'), 'gl_trans', 'account'))) { $input_error = 1; - display_error(_("The GL account selected is already in use. Select another GL account.")); + display_error(_("The GL account selected is already in use or has transactions. Select another empty GL account.")); set_focus('account_code'); } if ($input_error != 1) @@ -158,9 +158,6 @@ if ($selected_id != -1) $_POST['bank_charge_act'] = $myrow["bank_charge_act"]; } hidden('selected_id', $selected_id); - hidden('account_code'); - hidden('account_type'); - hidden('BankAccountCurrency', $_POST['BankAccountCurrency']); set_focus('bank_account_name'); } @@ -169,6 +166,7 @@ text_row(_("Bank Account Name:"), 'bank_account_name', null, 50, 100); if ($is_used) { label_row(_("Account Type:"), $bank_account_types[$_POST['account_type']]); + hidden('account_type'); } else { @@ -177,6 +175,7 @@ else if ($is_used) { label_row(_("Bank Account Currency:"), $_POST['BankAccountCurrency']); + hidden('BankAccountCurrency', $_POST['BankAccountCurrency']); } else { @@ -186,8 +185,10 @@ else yesno_list_row(_("Default currency account:"), 'dflt_curr_act'); if($is_used) +{ label_row(_("Bank Account GL Code:"), $_POST['account_code']); -else + hidden('account_code'); +} else gl_all_accounts_list_row(_("Bank Account GL Code:"), 'account_code', null); gl_all_accounts_list_row(_("Bank Charges Account:"), 'bank_charge_act', null, true); @@ -202,4 +203,3 @@ submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); end_page(); -?>