Fixed bug in Bank Accounts edition.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 19 May 2016 20:35:19 +0000 (22:35 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 19 May 2016 20:35:19 +0000 (22:35 +0200)
gl/manage/bank_accounts.php

index 9dda5cd367a1c4e452cfc600226feebd9ff620f8..73486b1d64bb3d9e6fcb197ecfea5058910ca7b8 100644 (file)
@@ -154,9 +154,7 @@ if ($selected_id != -1)
        $_POST['dflt_curr_act'] = $myrow["dflt_curr_act"];
   }
        hidden('selected_id', $selected_id);
-       hidden('account_code');
-       hidden('account_type');
-       hidden('BankAccountCurrency', $_POST['BankAccountCurrency']);   
+       }
        set_focus('bank_account_name');
 } 
 
@@ -165,6 +163,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 
 {
@@ -173,6 +172,7 @@ else
 if ($is_used) 
 {
        label_row(_("Bank Account Currency:"), $_POST['BankAccountCurrency']);
+       hidden('BankAccountCurrency', $_POST['BankAccountCurrency']);
 } 
 else 
 {
@@ -182,8 +182,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);
 
 text_row(_("Bank Name:"), 'bank_name', null, 50, 60);