From: Janusz Dobrowolski Date: Sun, 13 Oct 2013 17:27:54 +0000 (+0200) Subject: Customer/Supplier Balances Reports: fixed error in recalculation to home currency... X-Git-Tag: 2.3-final~185 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=93bee7101478b3079edd1c868b361507a8b9915c;p=fa-stable.git Customer/Supplier Balances Reports: fixed error in recalculation to home currency value. --- 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']]);