X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fincludes%2Fdb%2Fsupp_payment_db.inc;h=cec8f351b10b4c0fee198614a6c53719e62e2b1c;hb=9a98bb3bc7a94f1a8e47f8dab45a87c8b4212080;hp=9628ac76c7783e1098b017a019e7177c4ce76fd8;hpb=cb94dfbeb6c9ca86a05399a7c92a76260697eb20;p=fa-stable.git diff --git a/purchasing/includes/db/supp_payment_db.inc b/purchasing/includes/db/supp_payment_db.inc index 9628ac76..cec8f351 100644 --- a/purchasing/includes/db/supp_payment_db.inc +++ b/purchasing/includes/db/supp_payment_db.inc @@ -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); } @@ -78,7 +78,7 @@ function add_supp_payment($supplier_id, $date_, $bank_account, /*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");