<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Banking and GL - Tax Inquiry summation problem]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7087</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7087&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Banking and GL - Tax Inquiry summation problem.]]></description>
		<lastBuildDate>Tue, 31 Oct 2017 14:43:58 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Banking and GL - Tax Inquiry summation problem]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29376#p29376</link>
			<description><![CDATA[<p>Use the GL Inquiry if you want Bank Payment and Deposit entries.<br />Use Tax Inquiry only for the Taxes alone.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 31 Oct 2017 14:43:58 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29376#p29376</guid>
		</item>
		<item>
			<title><![CDATA[Re: Banking and GL - Tax Inquiry summation problem]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29374#p29374</link>
			<description><![CDATA[<p>The Tax Inquiry and General Ledger Inquiry produce inconsistent results for taxes.&nbsp; General Ledger Inquiry results are correct while Tax Inquiry is omitting Bank Payment and Deposit type of transactions.</p>]]></description>
			<author><![CDATA[null@example.com (andijani)]]></author>
			<pubDate>Tue, 31 Oct 2017 14:10:55 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29374#p29374</guid>
		</item>
		<item>
			<title><![CDATA[Re: Banking and GL - Tax Inquiry summation problem]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29357#p29357</link>
			<description><![CDATA[<p>This is now fixed and Repo is <a href="https://github.com/FrontAccountingERP/FA/commit/ea3fd3b07585cbf1438ed587125e38051262819b">updated</a>.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Tue, 31 Oct 2017 09:00:35 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29357#p29357</guid>
		</item>
		<item>
			<title><![CDATA[Re: Banking and GL - Tax Inquiry summation problem]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29354#p29354</link>
			<description><![CDATA[<p>The existing SQL to debug is:<br /></p><div class="codebox"><pre><code>SELECT 
    SUM(IF(trans_type=21,-1,1) *
    IF((reg_type=0) || ((trans_type IN (20,21) OR (trans_type=0 AND reg_type=1))
        ), net_amount*ex_rate,0)
    ) net_output

    , SUM(IF(trans_type=21,-1,1) *
    IF((reg_type=0) || ((trans_type IN (20,21) OR (trans_type=0 AND reg_type=1))
        ), amount*ex_rate,0)) payable

    , SUM(IF(trans_type IN (21),-1,1) *
    IF(reg_type=1 AND tax_type_id AND taxrec.rate, net_amount*ex_rate, 0)) net_input


    , SUM(IF(trans_type IN (21),-1,1) *
    IF(reg_type=1 AND tax_type_id AND taxrec.rate, amount*ex_rate, 0)) collectible,
    taxrec.rate,
    ttype.id,
    ttype.name

FROM 0_trans_tax_details taxrec LEFT JOIN 0_tax_types ttype ON taxrec.tax_type_id=ttype.id
WHERE taxrec.trans_type IN (10, 11, 20, 21, 0)
-- AND taxrec.tran_date &gt;= &#039;$fromdate&#039;
-- AND taxrec.tran_date &lt;= &#039;$todate&#039;
GROUP BY ttype.id;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 31 Oct 2017 08:02:20 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29354#p29354</guid>
		</item>
		<item>
			<title><![CDATA[Re: Banking and GL - Tax Inquiry summation problem]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29350#p29350</link>
			<description><![CDATA[<p>I am working on this. </p><p>The reason for rewrite is the new option for adding AR/AP transactions direct into Journal Entry.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Tue, 31 Oct 2017 07:41:05 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29350#p29350</guid>
		</item>
		<item>
			<title><![CDATA[Re: Banking and GL - Tax Inquiry summation problem]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29342#p29342</link>
			<description><![CDATA[<p>This issue does not prevail in FA 2.3 and hence the above fix only addresses the output and not the underlying db fetch function in FA 2.4. Attached is the FA 2.3 output without the above fix and it works perfectly.</p><p>Therefore the function <strong><a href="https://github.com/FrontAccountingERP/FA/blob/master/gl/includes/db/gl_db_trans.inc#L510">get_tax_summary()</a></strong> in <strong>gl/includes/db/gl_db_trans.inc</strong> needs to be investigated and it is different from it&#039;s <a href="https://github.com/apmuthu/frontaccounting/blob/master/core/gl/includes/db/gl_db_trans.inc#L431">FA 2.3 counterpart</a>.</p><p>The new avatar has an extra parameter <strong>$also_zero_purchases</strong> set to false by default.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 31 Oct 2017 06:46:19 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29342#p29342</guid>
		</item>
		<item>
			<title><![CDATA[Re: Banking and GL - Tax Inquiry summation problem]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29340#p29340</link>
			<description><![CDATA[<p>Good catch @andijani.</p><p>The Tax Inquiry page is at <strong>gl/inquiry/tax_inquiry.php</strong>. and it&#039;s line 91:<br /></p><div class="codebox"><pre><code>        $collectible = $tx[&#039;collectible&#039;];</code></pre></div><p>should be: <br /></p><div class="codebox"><pre><code>        $collectible = -$tx[&#039;collectible&#039;];</code></pre></div><p>If the <strong>Outputs/Inputs</strong> column too should get the appropriate signs, then make line 104 show the negative value.</p><p><s>This issue prevails in FA 2.3.x (line 95) as well and wonder how it went unchecked for so many years.</s></p><p>@joe: can commit it.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 31 Oct 2017 05:00:40 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29340#p29340</guid>
		</item>
		<item>
			<title><![CDATA[Banking and GL - Tax Inquiry summation problem]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29335#p29335</link>
			<description><![CDATA[<p>FA 2.4.2 Tax summing is not correct in Tax Inquiry page.&nbsp; Supplier invoice taxes also show up as sales invoice taxes and they are added instead of being subtracted. </p><p>Example.</p><p>Type&nbsp; &nbsp; Description&nbsp; &nbsp; Amount&nbsp; &nbsp; Outputs/Inputs</p><p>GST / TPS 5%&nbsp; &nbsp; Charged on sales (Output Tax):&nbsp; &nbsp; 82.80&nbsp; &nbsp; 1,656.00<br />GST / TPS 5%&nbsp; &nbsp; Paid on purchases (Input Tax):&nbsp; &nbsp; 82.80&nbsp; &nbsp; 1,656.00<br />GST / TPS 5%&nbsp; &nbsp; Net payable or collectible:&nbsp; &nbsp; 165.60</p>]]></description>
			<author><![CDATA[null@example.com (andijani)]]></author>
			<pubDate>Tue, 31 Oct 2017 01:50:52 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29335#p29335</guid>
		</item>
	</channel>
</rss>
