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);
}
/*now enter the bank_trans entry */
add_bank_trans($trans_type, $payment_id, $bank_account, $ref,
- $date_, -($amount + $charge), PT_SUPPLIER,
+ $date_, -($amount + $supp_charge), PT_SUPPLIER,
$supplier_id, $bank_account_currency,
"Could not add the supplier payment bank transaction");