<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Re:Tax (GST) payments or invoice basis (Alastair Robertson) 04/22/2013]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10742&amp;type=atom" />
	<updated>2026-10-12T10:09:05Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=10742</id>
		<entry>
			<title type="html"><![CDATA[Re:Tax (GST) payments or invoice basis (Alastair Robertson) 04/22/2013]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=43886#p43886" />
			<content type="html"><![CDATA[<p>Firstly, thank you Alastair for the module. This is not a new post but for some reason I was unable to reply to the post above. I may have downloaded the module from the wrong place, but on a payments-basis GST return, the input tax on a paid supplier invoice was added to the output tax instead of being deducted from it.</p><p>For example, output GST of 4,434.79 and input GST of 375.52 was reported as a net payable of 4,810.31. The correct net payable is 4,059.27.</p><p>FrontAccounting stores a supplier payment with a negative ov_amount. The input-tax part of the report joined supp_trans on the payment (trans_type_from) and divided by that payment total. Dividing by a negative amount flipped the sign of the input GST, so collectible + payable added the input tax instead of subtracting it.</p><p>The fix is to divide by the supplier invoice total (trans_type_to). The invoice amount is positive, the existing -1 then makes the input GST a deduction, and the net payable is correct.</p><p>File: includes/tax_cash_db.inc</p><p>In tax_cash_sql(), change the supplier-allocation block from:</p><p>ttd.net_amount*sa.amt/round(ov_amount+ov_gst+ov_discount,6)*ex_rate net_input,<br />-1*ttd.amount*sa.amt/round(ov_amount+ov_gst+ov_discount,6)*ex_rate collectible,<br />...<br />INNER JOIN &quot;.TB_PREF.&quot;supp_trans st<br />&nbsp; &nbsp; ON st.type = sa.trans_type_from<br />&nbsp; &nbsp; AND st.trans_no = sa.trans_no_from</p><p>to:</p><p>ttd.net_amount*sa.amt/round(inv.ov_amount+inv.ov_gst+inv.ov_discount,6)*ex_rate net_input,<br />-1*ttd.amount*sa.amt/round(inv.ov_amount+inv.ov_gst+inv.ov_discount,6)*ex_rate collectible,<br />...<br />INNER JOIN &quot;.TB_PREF.&quot;supp_trans inv<br />&nbsp; &nbsp; ON inv.type = sa.trans_type_to<br />&nbsp; &nbsp; AND inv.trans_no = sa.trans_no_to</p><p>After the change, the input line shows as a negative amount and the total payable is the output GST less the input GST. The same figure is used by the Tax Details (Cash Basis) report.</p>]]></content>
			<author>
				<name><![CDATA[DiggerNZ]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=48877</uri>
			</author>
			<updated>2026-10-12T10:09:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=43886#p43886</id>
		</entry>
</feed>
