<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — What does Tax Algorithm do?]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7068</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7068&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in What does Tax Algorithm do?.]]></description>
		<lastBuildDate>Thu, 26 Oct 2017 19:46:51 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: What does Tax Algorithm do?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29233#p29233</link>
			<description><![CDATA[<p>Thanks apmuthu thats a lot clearer now</p>]]></description>
			<author><![CDATA[null@example.com (poncho1234)]]></author>
			<pubDate>Thu, 26 Oct 2017 19:46:51 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29233#p29233</guid>
		</item>
		<item>
			<title><![CDATA[Re: What does Tax Algorithm do?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29221#p29221</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Thu, 26 Oct 2017 11:41:12 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29221#p29221</guid>
		</item>
		<item>
			<title><![CDATA[What does Tax Algorithm do?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29189#p29189</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (poncho1234)]]></author>
			<pubDate>Wed, 25 Oct 2017 02:10:47 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29189#p29189</guid>
		</item>
	</channel>
</rss>
