<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Function for even out rounding problems]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8930&amp;type=atom" />
	<updated>2020-08-31T14:37:45Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8930</id>
		<entry>
			<title type="html"><![CDATA[Re: Function for even out rounding problems]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38237#p38237" />
			<content type="html"><![CDATA[<p>Check if some rounding off error got missed out in the computation sequence first. If such occurrences are few and far between, make a compensating Journal Entry for the adjustment each time for now.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2020-08-31T14:37:45Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38237#p38237</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Function for even out rounding problems]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38232#p38232" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>apmuthu wrote:</cite><blockquote><p>If there is a non-exchange rate related error that arises from just tax computation, which account do you want the error to get into or <br />how do we balance it?</p></blockquote></div><p>We want it to go into some &quot;tax variance account&quot; which we can define in the system.</p>]]></content>
			<author>
				<name><![CDATA[djgayasri]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45650</uri>
			</author>
			<updated>2020-08-31T10:50:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38232#p38232</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Function for even out rounding problems]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38157#p38157" />
			<content type="html"><![CDATA[<p>Try to change the <em>php.ini</em> value for <strong>precision</strong> from the default 14 to 17 and restart your webserver and test it.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2020-08-25T16:43:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38157#p38157</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Function for even out rounding problems]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38108#p38108" />
			<content type="html"><![CDATA[<p>Well, I thought this was taken care off. But if this is a huge problem, I would have to look closer into that.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2020-08-22T00:46:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38108#p38108</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Function for even out rounding problems]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38104#p38104" />
			<content type="html"><![CDATA[<p>If there is a non-exchange rate related error that arises from just tax computation, which account do you want the error to get into or how do we balance it?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2020-08-21T17:21:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38104#p38104</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Function for even out rounding problems]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38099#p38099" />
			<content type="html"><![CDATA[<p>@apmuthu: What do you mean account? This happened when we enter the customer invoice. All services are billing on local currency.</p>]]></content>
			<author>
				<name><![CDATA[djgayasri]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45650</uri>
			</author>
			<updated>2020-08-21T04:41:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38099#p38099</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Function for even out rounding problems]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38086#p38086" />
			<content type="html"><![CDATA[<p>@djgatasri: Which account do you want this error to get into (or split into) especially when tax can be computed with an exchange rate as well.</p><p>@joe: any thoughts?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2020-08-20T18:37:23Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38086#p38086</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Function for even out rounding problems]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38057#p38057" />
			<content type="html"><![CDATA[<p>I need a clarification of the following function.</p><div class="codebox"><pre><code>function add_gl_balance($type, $trans_id, $date_, $amount, $person_type_id=null, $person_id=null)
{
    $amount = round2($amount, user_price_dec());

    if (floatcmp($amount, 0))
    {
        error_log(sprintf( _(&quot;Rounding error %s encountered for trans_type:%s,trans_no:%s&quot;), $amount, $type, $trans_id));
        return add_gl_trans($type, $trans_id, $date_, get_company_pref(&#039;exchange_diff_act&#039;), 0, 0, &quot;&quot;,
            $amount, null, $person_type_id, $person_id, &quot;The balanced GL transaction could not be inserted&quot;);
    } else
        return 0;
}</code></pre></div><p>This function is placed on the file <strong>gl/includes/db/gl_db_trans.inc</strong>. And it is for even out the rounding problems.</p><p>When round off error occurred due to tax calculation on the sales invoice, that error amount will pass to this function. </p><p>So then rounding off error due to tax calculation will be going to <strong>exchange_diff_act</strong>. That is actually not an exchange rate given at all. </p><p>Is there any suggestion to handle those kinds of rounding problems.</p>]]></content>
			<author>
				<name><![CDATA[djgayasri]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45650</uri>
			</author>
			<updated>2020-08-17T09:07:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38057#p38057</id>
		</entry>
</feed>
