<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Small error on supplier payment report]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=1295</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1295&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Small error on supplier payment report.]]></description>
		<lastBuildDate>Sun, 02 May 2010 18:18:59 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Small error on supplier payment report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5775#p5775</link>
			<description><![CDATA[<p>I just paid another invoice and the same thing happened.</p><p>In order to avoid confusion as to what has been paid and what hasn&#039;t I have modified the SQL of the report so that the results are rounded to two decimal places:</p><p>ROUND(ABS(&quot;.TB_PREF.&quot;supp_trans.ov_amount),2) + ROUND(ABS(&quot;.TB_PREF.&quot;supp_trans.ov_gst),2) - ROUND(&quot;.TB_PREF.&quot;supp_trans.alloc,2) != 0</p><p>This has now fixed the problem for me and the paid invoice have now been removed from the report.</p>]]></description>
			<author><![CDATA[null@example.com (kerrsmith)]]></author>
			<pubDate>Sun, 02 May 2010 18:18:59 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5775#p5775</guid>
		</item>
		<item>
			<title><![CDATA[Small error on supplier payment report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5766#p5766</link>
			<description><![CDATA[<p>I have been using FrontAccounting for a while now for my business and everything is going great.</p><p>Yesterday I did a Supplier Payment Report and noticed an entry appearing when all my invoices were paid.</p><p>I had a bit of a look at the code and manually used the SQL code in phpMyAdmin to see what was happing:</p><p>SELECT 0_supp_trans.supp_reference, 0_supp_trans.tran_date, 0_supp_trans.due_date, 0_supp_trans.trans_no, 0_supp_trans.type, 0_supp_trans.rate, (ABS(0_supp_trans.ov_amount) + ABS(0_supp_trans.ov_gst) - 0_supp_trans.alloc) AS Balance, (ABS(0_supp_trans.ov_amount) + ABS(0_supp_trans.ov_gst) ) AS TranTotal FROM 0_supp_trans WHERE 0_supp_trans.supplier_id = &#039;2&#039; AND ABS(0_supp_trans.ov_amount) + ABS(0_supp_trans.ov_gst) - 0_supp_trans.alloc != 0 AND 0_supp_trans.tran_date &lt;=&#039;2010-04-30&#039; ORDER BY 0_supp_trans.type, 0_supp_trans.trans_no</p><p>This produces the single line containing a balance of -3.5527136788005e-15</p><p>This balance should be zero but for some reason it is not quite getting there when doing the balance calculation:</p><p>(ABS(0_supp_trans.ov_amount) + ABS(0_supp_trans.ov_gst) - 0_supp_trans.alloc) AS Balance</p><p>(ABS(13.7) + ABS(2.4) - 16.1) = -3.5527136788005e-15</p><p>I doubt this will happen very often for anyone else but thought I would mention it just in case there is an easy fix to prevent it happing.</p>]]></description>
			<author><![CDATA[null@example.com (kerrsmith)]]></author>
			<pubDate>Fri, 30 Apr 2010 17:35:15 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5766#p5766</guid>
		</item>
	</channel>
</rss>
