<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — What does Tax Algorithm do?]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7068&amp;type=atom" />
	<updated>2017-10-26T19:46:51Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7068</id>
		<entry>
			<title type="html"><![CDATA[Re: What does Tax Algorithm do?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29233#p29233" />
			<content type="html"><![CDATA[<p>Thanks apmuthu thats a lot clearer now</p>]]></content>
			<author>
				<name><![CDATA[poncho1234]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19944</uri>
			</author>
			<updated>2017-10-26T19:46:51Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29233#p29233</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: What does Tax Algorithm do?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29221#p29221" />
			<content type="html"><![CDATA[<p><strong>tax_algorithm</strong> is stored as a 1 (Taxes from Totals) / 2 (Sum per line taxes) value in <strong>sys_prefs</strong> table (ie., on a per company basis) with the former as the default.</p><p>The file <strong>includes/sysnames.inc</strong> lists the possible values as:<br /></p><div class="codebox"><pre><code>$tax_algorithms = array( 
    TCA_LINES =&gt; _(&quot;Sum per line taxes&quot;), 
    TCA_TOTALS =&gt; _(&quot;Taxes from totals&quot;)
);</code></pre></div><p>The <strong>function tax_algorithm_list()</strong> in the file <strong>includes/ui/ui_lists.inc</strong> gets the select box suitable populated with the above.</p><p>The file <strong>admin/gl_setup.php</strong> is currently the only file that calls the above function and provides the form and&nbsp; its processing code for the said field.</p><p><s>The Wiki page still shows the screeenshot and writeup for FA 2.3 where it was not available then.</s> Stands <a href="https://frontaccounting.com/fawiki/index.php?n=Help.SystemAndGeneralGLSetup">updated</a>.</p><p>Study the code in the <strong>function get_tax_for_items()</strong> in the file <strong>taxes/tax_calc.inc</strong>. The <strong>function round2()</strong> is used as the rounding function and is defined in <strong>includes/current_user.inc</strong>:<br /></p><div class="codebox"><pre><code>function round2($number, $decimals=0)
{
    $delta = ($number &lt; 0 ? -.0000000001 : .0000000001);
    return round($number+$delta, $decimals);
}</code></pre></div><p>In each case of it&#039;s use, the $decimals parameter was taken from the user choices using <strong>$dec = user_price_dec();</strong>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-10-26T11:41:12Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29221#p29221</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[What does Tax Algorithm do?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29189#p29189" />
			<content type="html"><![CDATA[<p>Hi, I&#039;ve searched for in the wiki and here in the forum and cannot find anything about Tax Algorithm in Setup -&gt; System and General GL Setup there&#039;s two options: Taxes from totals &amp; Sum per line taxes?</p><p>I&#039;m guessing it has something to do with rounding?</p><p>Any help appreciated.</p>]]></content>
			<author>
				<name><![CDATA[poncho1234]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19944</uri>
			</author>
			<updated>2017-10-25T02:10:47Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29189#p29189</id>
		</entry>
</feed>
