Fixed es_MX installer translation file.
[fa-stable.git] / includes / banking.inc
index 21dbb8f6fc85516bc819ce47427cf5d00993e835..53af3598b8580b7c3263d6fb46937a201e24a08b 100644 (file)
@@ -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))