Topic: The Currency in Bank Accounts is Not Updated

If i create a new Bank Account with any Currency. Just after creation I realized a mistake that the Currency was wrongly selected and I need to change the currency from USD to CAD (for e.g.) then this change is not accepted by FA. I tried this in FA 2.3.25 but same problem.

www.boxygen.pk

Re: The Currency in Bank Accounts is Not Updated

Ok Finally I got the reason of this bug. The hidden text and the select had the same names and the hidden text values were passing in the arguments. So I just renamed the hidden text name.

Below is the code component that I changed on gl\manage\bank_accounts.php on Line 160

start_table(TABLESTYLE2);

if ($selected_id != -1)
{
  if ($Mode == 'Edit') {   
    $myrow = get_bank_account($selected_id);

    $_POST['account_code'] = $myrow["account_code"];
    $_POST['account_type'] = $myrow["account_type"];
    $_POST['bank_name']  = $myrow["bank_name"];
    $_POST['bank_account_name']  = $myrow["bank_account_name"];
    $_POST['bank_account_number'] = $myrow["bank_account_number"];
    $_POST['bank_address'] = $myrow["bank_address"];
    $_POST['BankAccountCurrency'] = $myrow["bank_curr_code"];
    $_POST['dflt_curr_act'] = $myrow["dflt_curr_act"];
  }
    hidden('selected_id', $selected_id);
    hidden('account_code');
    hidden('account_type');
    hidden('BankAccountCurrency-hidden', $_POST['BankAccountCurrency']);    //Bug removed by Faisal on Line 160
    set_focus('bank_account_name');
}

www.boxygen.pk

Re: The Currency in Bank Accounts is Not Updated

I would request senior members to check whether this change has no adverse impact on any other feature.

www.boxygen.pk

Re: The Currency in Bank Accounts is Not Updated

Yes, indeed this is a bug. Correct solution has been sent to git repos
Thank you.

Janusz