From f29bc5b94a64fd79cc589fa0744c06adfa00cb13 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Tue, 4 May 2010 09:10:47 +0000 Subject: [PATCH] [0000225] Supplier Payment Report showing paid invoices (rounding problem) --- CHANGELOG.txt | 6 +++++- reporting/rep203.php | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f732a28..e6cdb59 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,10 +19,14 @@ Legend: ! -> Note $ -> Affected files +04-May-2010 Joe Hunt +# [0000225] Supplier Payment Report showing paid invoices (rounding problem) +$ /reporting/rep203.php + 26-Apr-2010 Joe Hunt ! Allowing the Tax Report to be printed to Excel/OO Calc $ /reporting/rep709.php - /reports_main.php + /reporting/reports_main.php /reporting/includes/excel_report.inc 21-Apr-2010 Joe Hunt diff --git a/reporting/rep203.php b/reporting/rep203.php index 27eef02..7c90727 100644 --- a/reporting/rep203.php +++ b/reporting/rep203.php @@ -30,6 +30,7 @@ print_payment_report(); function getTransactions($supplier, $date) { $date = date2sql($date); + $dec = user_price_dec(); $sql = "SELECT ".TB_PREF."supp_trans.supp_reference, ".TB_PREF."supp_trans.tran_date, @@ -41,7 +42,8 @@ function getTransactions($supplier, $date) (ABS(".TB_PREF."supp_trans.ov_amount) + ABS(".TB_PREF."supp_trans.ov_gst) ) AS TranTotal FROM ".TB_PREF."supp_trans WHERE ".TB_PREF."supp_trans.supplier_id = '" . $supplier . "' - AND ABS(".TB_PREF."supp_trans.ov_amount) + ABS(".TB_PREF."supp_trans.ov_gst) - ".TB_PREF."supp_trans.alloc != 0 + AND ROUND(ABS(".TB_PREF."supp_trans.ov_amount),$dec) + ROUND(ABS(".TB_PREF."supp_trans.ov_gst),$dec) - + ROUND(".TB_PREF."supp_trans.alloc,$dec) != 0 AND ".TB_PREF."supp_trans.tran_date <='" . $date . "' ORDER BY ".TB_PREF."supp_trans.type, ".TB_PREF."supp_trans.trans_no"; -- 2.30.2