X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fbanking.inc;h=53af3598b8580b7c3263d6fb46937a201e24a08b;hb=4052beb0e908e206956eee5b479de283173d1801;hp=21dbb8f6fc85516bc819ce47427cf5d00993e835;hpb=46c5f7a65a7659a44ae8254c63152074363d3987;p=fa-stable.git diff --git a/includes/banking.inc b/includes/banking.inc index 21dbb8f6..53af3598 100644 --- a/includes/banking.inc +++ b/includes/banking.inc @@ -163,7 +163,8 @@ function exchange_variation($pyt_type, $pyt_no, $type, $trans_no, $pyt_date, $am { $trans = get_customer_trans($trans_no, $type); $pyt_trans = get_customer_trans($pyt_no, $pyt_type); - $ar_ap_act = $trans['receivables_account']; + $cust_accs = get_branch_accounts($trans['branch_code']); + $ar_ap_act = $cust_accs['receivables_account']; $person_id = $trans['debtor_no']; $curr = $trans['curr_code']; $date = sql2date($trans['tran_date']); @@ -175,7 +176,7 @@ function exchange_variation($pyt_type, $pyt_no, $type, $trans_no, $pyt_date, $am $supp_accs = get_supplier_accounts($trans['supplier_id']); $ar_ap_act = $supp_accs['payable_account']; $person_id = $trans['supplier_id']; - $curr = $trans['SupplierCurrCode']; + $curr = $trans['curr_code']; $date = sql2date($trans['tran_date']); } if (is_company_currency($curr))