Stable branch merged up to 2.3.21
[fa-stable.git] / purchasing / supplier_payment.php
index b4e6c87864d7ee66a19765bd971386255c541e8d..75ab908a8d257422213fb24368718e0265450b50 100644 (file)
@@ -144,7 +144,7 @@ function check_inputs()
        }
 
        if (isset($_POST['charge']) && input_num('charge') > 0) {
-               $charge_acct = get_company_pref('bank_charge_act');
+               $charge_acct = get_bank_charge_account($_POST['bank_account']);
                if (get_gl_account($charge_acct) == false) {
                        display_error(_("The Bank Charge Account has not been set in System and General GL Setup."));
                        set_focus('charge');