Fixes in sales reports to use debtor_trans.tax_included field instead of trans_tax_de...
[fa-stable.git] / purchasing / includes / db / supp_payment_db.inc
index f4a0e27f622162d1d1520902ae841438eda59a26..cec8f351b10b4c0fee198614a6c53719e62e2b1c 100644 (file)
@@ -62,7 +62,7 @@ function add_supp_payment($supplier_id, $date_, $bank_account,
 
        if ($supp_charge != 0)
        {
-               $charge_act = get_company_pref('bank_charge_act');
+               $charge_act = get_bank_charge_account($bank_account);
                $total += add_gl_trans_supplier($trans_type, $payment_id, $date_, $charge_act, 0, 0,
                        $supp_charge, $supplier_id, "", $rate);
        }