From 4f43d5d49aa02f3407328534491a119e5778f38b Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Thu, 7 Apr 2011 01:02:58 +0200 Subject: [PATCH] Rerun of Sales Summary Report --- reporting/rep114.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reporting/rep114.php b/reporting/rep114.php index 96f743e..1173598 100644 --- a/reporting/rep114.php +++ b/reporting/rep114.php @@ -34,7 +34,7 @@ function getTaxTransactions($from, $to, $tax_id) $todate = date2sql($to); $sql = "SELECT d.debtor_no, d.name AS cust_name, d.tax_id, - CASE WHEN net_amount IS NULL THEN + CASE WHEN net_amount IS NULL OR amount=0 THEN SUM(CASE WHEN dt.type=".ST_CUSTCREDIT." THEN (ov_amount+ov_freight+ov_discount)*-1 ELSE (ov_amount+ov_freight+ov_discount) END *dt.rate) ELSE SUM(CASE WHEN dt.type=".ST_CUSTCREDIT." THEN -net_amount ELSE net_amount END *ex_rate) END AS total, -- 2.30.2