<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Exchange Rate Setting Bugs]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1362&amp;type=atom" />
	<updated>2010-06-03T07:30:36Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=1362</id>
		<entry>
			<title type="html"><![CDATA[Re: Exchange Rate Setting Bugs]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=6096#p6096" />
			<content type="html"><![CDATA[<p>There are 2 reasons for using our own decimal format. <br />1. to eliminate de declaration of the global variables.<br />2. a rounding bug in Windows IIS detected a couple of years ago.</p><p>I will try to increase the decimals from 6 to 10 for this operation. Hopefully this will help.</p><p>The CS Main trunk has been updated. You can download the new file here:</p><br /><br /><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2010-06-03T07:30:36Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=6096#p6096</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Exchange Rate Setting Bugs]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=6095#p6095" />
			<content type="html"><![CDATA[<p>When I manually enter the exchange rate,</p><p>For example.</p><p>I enter the current date rate of HKD ex rate as 0.12820513 (exchange rate at 8 decomail places) with respect to USD.</p><p>FA then display it as 0.12820613,<br />there is a difference of 0.00000100 difference.</p><p>When I search the phpmyadmin mysql table, the 0.12820513 is entered in rate-buy and rate-sell of the 0_exchange_rates table.</p><p>There must be somewhere wrong.</p><p>I search the code and find that<br />this function manipulate the display result in the homepage</p><p>function number_format2($number, $decimals=0)<br />{<br />&nbsp; &nbsp; global $thoseps, $decseps;<br />&nbsp; &nbsp; $tsep = $thoseps[$_SESSION[&quot;wa_current_user&quot;]-&gt;prefs-&gt;tho_sep()];<br />&nbsp; &nbsp; $dsep = $decseps[$_SESSION[&quot;wa_current_user&quot;]-&gt;prefs-&gt;dec_sep()];<br />&nbsp; &nbsp; //return number_format($number, $decimals, $dsep,&nbsp; &nbsp; $tsep);<br />&nbsp; &nbsp; $delta = ($number &lt; 0 ? -.000001 : .000001);<br />&nbsp; &nbsp; return number_format($number+$delta, $decimals, $dsep,&nbsp; &nbsp; $tsep);<br />}</p><p>Why use this number_format2 instead of normal number_format?</p><p>Why use $delta which is the cause of error?</p><p>Pls help!!!</p>]]></content>
			<author>
				<name><![CDATA[thhui]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=376</uri>
			</author>
			<updated>2010-06-03T07:00:29Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=6095#p6095</id>
		</entry>
</feed>
