<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=5684</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5684&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Editing a Journal Entry results in a duplicate entry on Tax Report.]]></description>
		<lastBuildDate>Mon, 10 Apr 2017 11:56:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27692#p27692</link>
			<description><![CDATA[<p>Thanks @joe.</p><p>@itronics committed it on <a href="https://github.com/FrontAccountingERP/FA/commit/acb313fc11ab4aa40e48b46c1534d09114638f6c">2015-07-10</a>.</p><p>This now stands cross referenced. The <strong>name</strong> field / column can be backquoted in the sql.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 10 Apr 2017 11:56:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27692#p27692</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27689#p27689</link>
			<description><![CDATA[<p>I have talked with Janusz and he claims that this bug has already been fixed.<br />And this is correct. Look into the sql in the committed rep709 and you will see the correction.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 09 Apr 2017 17:47:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27689#p27689</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27688#p27688</link>
			<description><![CDATA[<p>In the demo data, there is no element with <strong>gl.amount = 0</strong> and hence I have not tested it out. Generally this occurs when a transaction is edited, the old one&#039;s amount becomes 0&nbsp; and the current (edited) value becomes the gl.amount in the new record.</p><p>@joe: does this merit inclusion in the base code?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 09 Apr 2017 16:22:58 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27688#p27688</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27686#p27686</link>
			<description><![CDATA[<p>I found this bug 2 years ago but I cannot find the cause. Just today that I tried to fix it again and found that the SQL in report709.php seems to be unreasonable as the following.</p><div class="codebox"><pre><code>    $sql = &quot;SELECT tt.name as taxname, taxrec.*, taxrec.amount*ex_rate AS amount,
                taxrec.net_amount*ex_rate AS net_amount,
                IF(taxrec.trans_type=&quot;.ST_BANKPAYMENT.&quot; OR taxrec.trans_type=&quot;.ST_BANKDEPOSIT.&quot;, 
                    IF(gl.person_type_id&lt;&gt;&quot;.PT_MISC.&quot;, gl.memo_, gl.person_id), 
                    IF(ISNULL(supp.supp_name), debt.name, supp.supp_name)) as name,
                branch.br_name
        FROM &quot;.TB_PREF.&quot;trans_tax_details taxrec
        LEFT JOIN &quot;.TB_PREF.&quot;tax_types tt
            ON taxrec.tax_type_id=tt.id
        LEFT JOIN &quot;.TB_PREF.&quot;gl_trans gl 
            ON taxrec.trans_type=gl.type AND taxrec.trans_no=gl.type_no AND 
            (tt.purchasing_gl_code=gl.account OR tt.sales_gl_code=gl.account)
        LEFT JOIN &quot;.TB_PREF.&quot;supp_trans strans
            ON taxrec.trans_no=strans.trans_no AND taxrec.trans_type=strans.type
        LEFT JOIN &quot;.TB_PREF.&quot;suppliers as supp ON strans.supplier_id=supp.supplier_id
        LEFT JOIN &quot;.TB_PREF.&quot;debtor_trans dtrans
            ON taxrec.trans_no=dtrans.trans_no AND taxrec.trans_type=dtrans.type
        LEFT JOIN &quot;.TB_PREF.&quot;debtors_master as debt ON dtrans.debtor_no=debt.debtor_no
        LEFT JOIN &quot;.TB_PREF.&quot;cust_branch as branch ON dtrans.branch_code=branch.branch_code
        WHERE (taxrec.amount &lt;&gt; 0 OR taxrec.net_amount &lt;&gt; 0)
            AND taxrec.trans_type &lt;&gt; &quot;.ST_CUSTDELIVERY.&quot;
            AND taxrec.tran_date &gt;= &#039;$fromdate&#039;
            AND taxrec.tran_date &lt;= &#039;$todate&#039;
        ORDER BY taxrec.trans_type, taxrec.tran_date, taxrec.trans_no, taxrec.ex_rate&quot;;</code></pre></div><p>When there are 2 records in tax_trans (The amount value in one record is not 0 and the other one is 0) which linked to the same record in debtor_trans, this SQL will generate 2 records after joining.</p><p>In tax_trans, the record of amount value 0 is filtered out by WHERE parameters, and only 1 tax_tran will be activated to join. But in joining gl_trans, the record of amount 0 is not filtered out so they all will be joined with this 1 tax_tran and get 2 transactions in the report.</p><p>Solution:<br />Just add &quot; AND (gl.amount &lt;&gt; 0)&quot; into the LEFT JOIN of gl_trans. This is what I have done so far. However, I do not really know the side effect as I have never thoroughly get into the codes of FrontAccounting.</p>]]></description>
			<author><![CDATA[null@example.com (zybersup)]]></author>
			<pubDate>Sun, 09 Apr 2017 08:19:11 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27686#p27686</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25110#p25110</link>
			<description><![CDATA[<p>We cannot reproduce the problem, I guess it is somewhat specific to tax setup on your system. <br />Please send minimal database content on which you observe the issue to our contributions mailbox, together with the problem description. This will allow us fix the issue.</p><p>Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Thu, 28 Jan 2016 08:46:52 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25110#p25110</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25103#p25103</link>
			<description><![CDATA[<p>Kindly state the Mantis Bug Number and full link for ease of access.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 27 Jan 2016 19:10:54 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25103#p25103</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25090#p25090</link>
			<description><![CDATA[<p>I have contacted Janusz again for a reminder.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Tue, 26 Jan 2016 16:11:49 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25090#p25090</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25089#p25089</link>
			<description><![CDATA[<p>Hi Joe,</p><p>Has this bug been corrected already ?<br />We experienced the same issue as Seahawk.</p><p>The only work around we found was to void and recreate the invoices impacted.</p><p>Thanks,<br />René</p>]]></description>
			<author><![CDATA[null@example.com (renengs)]]></author>
			<pubDate>Tue, 26 Jan 2016 13:17:32 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25089#p25089</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=23863#p23863</link>
			<description><![CDATA[<p>This bug has also been reported on <a href="http://mantis.frontaccounting.com">Mantis</a>.</p><p>I have asked Janusz to take care of this. Hopefully he will do that asap.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Fri, 10 Jul 2015 07:47:16 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=23863#p23863</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=23862#p23862</link>
			<description><![CDATA[<p><em>Subscribed.</em></p><p>MarkAndrew and seahawk, thank you for discovery and reporting this bug.</p><p>Is there a plan to fix this and what is the time frame?</p>]]></description>
			<author><![CDATA[null@example.com (RandomName)]]></author>
			<pubDate>Fri, 10 Jul 2015 06:46:59 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=23862#p23862</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=23816#p23816</link>
			<description><![CDATA[<p>The tax report has the same problem if you do an inquiry on sales/Customer Transaction Inquiry and you open an invoice or you open a credit note, it will duplicate that as a transaction if you update anything, even if nothing has changed. </p><p>That results in the the credit note number and invoice number displaying twice doubling the amount of tax payable for the period.</p><p>I have installed the update as recommended above, but the problem still persists. It seems it was fixed only for the purchases not sales. If I did an inquiry on an invoice, it will duplicate the invoice when updated. </p><p>I agree that this have serious implications for someone who will claim double deduction or has to pay double the amount especially if they do not print the detail in the report and verify the number of invoices on Output Vat and Input vat.</p><p>Any help or fix in this regard will really be appreciated.</p>]]></description>
			<author><![CDATA[null@example.com (seahawk)]]></author>
			<pubDate>Sun, 05 Jul 2015 07:17:50 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=23816#p23816</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=23267#p23267</link>
			<description><![CDATA[<p>Thx</p>]]></description>
			<author><![CDATA[null@example.com (MarkAndrew)]]></author>
			<pubDate>Mon, 13 Apr 2015 17:50:21 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=23267#p23267</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=23253#p23253</link>
			<description><![CDATA[<p>The issue has been fixed in the core itself and the changes have been bundled and <a href="https://frontaccounting.com/punbb/viewtopic.php?pid=23145#p23145">attached</a> to the release announcement post. Just overwrite your FA v2.3.24 files with them.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 13 Apr 2015 07:20:30 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=23253#p23253</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=23247#p23247</link>
			<description><![CDATA[<p>I followed the link to the fix but I have no idea what to do as I don&#039;t understand code.<br />is there any way this can be included in next update?</p>]]></description>
			<author><![CDATA[null@example.com (MarkAndrew)]]></author>
			<pubDate>Mon, 13 Apr 2015 05:24:52 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=23247#p23247</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editing a Journal Entry results in a duplicate entry on Tax Report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=23200#p23200</link>
			<description><![CDATA[<p>thanks, your reply is really appreciated but still doesn&#039;t mean much to me - sorry.<br />main point is that there&#039;s a bug that makes the VAT report wrong if a transaction has been edited - if a transaction has been edited then it&#039;s included twice on the VAT report instead of once.<br />the VAT report is used to make the VAT return and claiming the same input VAT twice is a problem that can have serious implications with the tax authorities.<br />any change of this real fix being included in a release so that Front&#039;s VAT report is reliable?<br />it&#039;s a pretty bad bug.</p>]]></description>
			<author><![CDATA[null@example.com (MarkAndrew)]]></author>
			<pubDate>Thu, 09 Apr 2015 19:15:01 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=23200#p23200</guid>
		</item>
	</channel>
</rss>
