From 93bee7101478b3079edd1c868b361507a8b9915c Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 13 Oct 2013 19:27:54 +0200 Subject: [PATCH] Customer/Supplier Balances Reports: fixed error in recalculation to home currency value. --- reporting/rep101.php | 2 +- reporting/rep201.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reporting/rep101.php b/reporting/rep101.php index df34fe35..74b355d8 100644 --- a/reporting/rep101.php +++ b/reporting/rep101.php @@ -149,7 +149,7 @@ function print_customer_balances() if (!$convert && $currency != $myrow['curr_code']) continue; $accumulate = 0; - $rate = $convert ? get_exchange_rate_to_home_currency($myrow['curr_code'], Today()) : 1; + $rate = $convert ? get_exchange_rate_from_home_currency($myrow['curr_code'], Today()) : 1; $bal = get_open_balance($myrow['debtor_no'], $from, $convert); $init[0] = $init[1] = 0.0; $init[0] = round2(abs($bal['charges']*$rate), $dec); diff --git a/reporting/rep201.php b/reporting/rep201.php index d0b886bf..6fc122dd 100644 --- a/reporting/rep201.php +++ b/reporting/rep201.php @@ -179,7 +179,7 @@ function print_supplier_balances() while ($trans=db_fetch($res)) { if ($no_zeros && floatcmp(abs($trans['TotalAmount']), $trans['Allocated']) == 0) continue; - $rate = $convert ? get_exchange_rate_to_home_currency($myrow['curr_code'], Today()) : 1; + $rate = $convert ? get_exchange_rate_from_home_currency($myrow['curr_code'], Today()) : 1; $rep->NewLine(1, 2); $rep->TextCol(0, 1, $systypes_array[$trans['type']]); -- 2.30.2