Topic: Small error on supplier payment report
I have been using FrontAccounting for a while now for my business and everything is going great.
Yesterday I did a Supplier Payment Report and noticed an entry appearing when all my invoices were paid.
I had a bit of a look at the code and manually used the SQL code in phpMyAdmin to see what was happing:
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 = '2' AND ABS(0_supp_trans.ov_amount) + ABS(0_supp_trans.ov_gst) - 0_supp_trans.alloc != 0 AND 0_supp_trans.tran_date <='2010-04-30' ORDER BY 0_supp_trans.type, 0_supp_trans.trans_no
This produces the single line containing a balance of -3.5527136788005e-15
This balance should be zero but for some reason it is not quite getting there when doing the balance calculation:
(ABS(0_supp_trans.ov_amount) + ABS(0_supp_trans.ov_gst) - 0_supp_trans.alloc) AS Balance
(ABS(13.7) + ABS(2.4) - 16.1) = -3.5527136788005e-15
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.