<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Supplier Payment Entry(Rounding Problem)]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6031&amp;type=atom" />
	<updated>2015-12-09T13:18:46Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6031</id>
		<entry>
			<title type="html"><![CDATA[Re: Supplier Payment Entry(Rounding Problem)]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24888#p24888" />
			<content type="html"><![CDATA[<p>Thanks @joe.</p><p><a href="https://github.com/FrontAccountingERP/FA/commit/085bf05f7c33a3e20a418f2b04e6426c2096cb2c">FA 2.3 commit</a><br /><a href="https://github.com/FrontAccountingERP/FA/commit/3a556450989741a0bd49233479b362a7842a54a5">FA 2.4 commit</a></p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-12-09T13:18:46Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24888#p24888</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Supplier Payment Entry(Rounding Problem)]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24887#p24887" />
			<content type="html"><![CDATA[<p>This ugly&nbsp; bastard is now fixed in both 2.3.24 and 2.4 Beta.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2015-12-09T13:10:08Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24887#p24887</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Supplier Payment Entry(Rounding Problem)]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24882#p24882" />
			<content type="html"><![CDATA[<p>This is possibly done to increase the precision for computing to avoid rounding errors / deltas where unit amounts are computed from large quantities based bulk pricing.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-12-09T03:32:14Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24882#p24882</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Supplier Payment Entry(Rounding Problem)]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24881#p24881" />
			<content type="html"><![CDATA[<p>Speaking of <strong>includes/ui/ui_input.inc</strong>, what&#039;s this supposed to do?</p><div class="codebox"><pre><code>//JAM  Allow entered unit prices to be fractional
function unit_amount_cells($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
{
    if (!isset($dec))
          $dec = user_price_dec()+2;
    amount_cells_ex($label, $name, 15, 15, $init, $params, $post_label, $dec+2);
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[tm]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17873</uri>
			</author>
			<updated>2015-12-08T19:48:47Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24881#p24881</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Supplier Payment Entry(Rounding Problem)]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24872#p24872" />
			<content type="html"><![CDATA[<p>Line 310 in <strong>purchasing/supplier_payment.php</strong> is hardcoded with number of decimals and hence it did not use the chosen 3 decimal places you set in the preferences for Prices/Amounts.</p><p>This appears to be the only hardcoded place left in FA 2.3.</p><p>Omitting the last argument (<strong>$dec</strong>) will automatically take the preference value set when the <strong><em>function</em> amount_row()</strong> which finally calls the <strong><em>function</em> amount_cells_ex()</strong> is executed. These functions are defined in <strong>includes/ui/ui_input.inc</strong> file.</p><p>Hence Line 310 in <strong>purchasing/supplier_payment.php</strong> :<br /></p><div class="codebox"><pre><code>        amount_row(_(&quot;Bank Amount:&quot;), &#039;bank_amount&#039;, null, &#039;&#039;, $bank_currency, 2);</code></pre></div><p>should be changed to:</p><div class="codebox"><pre><code>        amount_row(_(&quot;Bank Amount:&quot;), &#039;bank_amount&#039;, null, &#039;&#039;, $bank_currency);</code></pre></div><p>It stands committed in <a href="https://github.com/apmuthu/frontaccounting/commit/3d2d9e5ae32212a3353f2361516444411d0b841d">FAMods in my unofficial FA 2.3 repo</a>.</p><p>@joe: Kindly do the needful in FA 2.3 and in Line 304 in FA 2.4.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-12-08T15:40:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24872#p24872</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Supplier Payment Entry(Rounding Problem)]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24871#p24871" />
			<content type="html"><![CDATA[<p>I already had the Decimal Places for Prices/Amounts set to 3, but it did solve the problem,this happens only for the bank amount field,the remaining fields are fine.</p>]]></content>
			<author>
				<name><![CDATA[farhath]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20371</uri>
			</author>
			<updated>2015-12-08T12:45:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24871#p24871</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Supplier Payment Entry(Rounding Problem)]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24815#p24815" />
			<content type="html"><![CDATA[<p>Instead, just change the Decimal Places for Prices/Amounts to 3 in Setup =&gt; Display Setup.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-11-26T16:43:40Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24815#p24815</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Supplier Payment Entry(Rounding Problem)]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24803#p24803" />
			<content type="html"><![CDATA[<p>I managed to fix the problem by changing one Line<br />The original source is:<br />&nbsp; &nbsp; if ($bank_currency != $supplier_currency) <br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; amount_row(_(&quot;Bank Amount:&quot;), &#039;bank_amount&#039;, null, &#039;&#039;, $bank_currency, 2);<br />&nbsp; &nbsp; }</p><p>Changed to (Just removed the &#039;,2&#039;:<br />&nbsp; &nbsp; if ($bank_currency != $supplier_currency) <br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; amount_row(_(&quot;Bank Amount:&quot;), &#039;bank_amount&#039;, null, &#039;&#039;, $bank_currency);<br />&nbsp; &nbsp; }</p>]]></content>
			<author>
				<name><![CDATA[farhath]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20371</uri>
			</author>
			<updated>2015-11-23T19:15:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24803#p24803</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Supplier Payment Entry(Rounding Problem)]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24800#p24800" />
			<content type="html"><![CDATA[<p>When making a Payment to a Supplier, The bank Amount is rounded to 2 Digits. Example:<br />A payment of 100.555 is rounded to 100.560,&nbsp; this is fine for currency with 2 digits, but our currency is 3 digits.</p><br /><p>The rounding error happens only for the the (Bank Amount - entry) whereas the (Bank Charge - entry) is fine.</p><p>Any Help.</p>]]></content>
			<author>
				<name><![CDATA[farhath]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20371</uri>
			</author>
			<updated>2015-11-23T08:55:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24800#p24800</id>
		</entry>
</feed>
