<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Small error on supplier payment report]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1295&amp;type=atom" />
	<updated>2010-05-02T18:18:59Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=1295</id>
		<entry>
			<title type="html"><![CDATA[Re: Small error on supplier payment report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=5775#p5775" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[kerrsmith]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=491</uri>
			</author>
			<updated>2010-05-02T18:18:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=5775#p5775</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Small error on supplier payment report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=5766#p5766" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[kerrsmith]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=491</uri>
			</author>
			<updated>2010-04-30T17:35:15Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=5766#p5766</id>
		</entry>
</feed>
