Topic: Exchange Rate Setting Bugs
When I manually enter the exchange rate,
For example.
I enter the current date rate of HKD ex rate as 0.12820513 (exchange rate at 8 decomail places) with respect to USD.
FA then display it as 0.12820613,
there is a difference of 0.00000100 difference.
When I search the phpmyadmin mysql table, the 0.12820513 is entered in rate-buy and rate-sell of the 0_exchange_rates table.
There must be somewhere wrong.
I search the code and find that
this function manipulate the display result in the homepage
function number_format2($number, $decimals=0)
{
global $thoseps, $decseps;
$tsep = $thoseps[$_SESSION["wa_current_user"]->prefs->tho_sep()];
$dsep = $decseps[$_SESSION["wa_current_user"]->prefs->dec_sep()];
//return number_format($number, $decimals, $dsep, $tsep);
$delta = ($number < 0 ? -.000001 : .000001);
return number_format($number+$delta, $decimals, $dsep, $tsep);
}
Why use this number_format2 instead of normal number_format?
Why use $delta which is the cause of error?
Pls help!!!