From 5fb0585fed8931145e34038debf2323d434f3b51 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sat, 3 Dec 2016 23:15:02 +0100 Subject: [PATCH] Rerun Items Summary Report --- reporting/rep309.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reporting/rep309.php b/reporting/rep309.php index 6b769bf3..67f4a07c 100644 --- a/reporting/rep309.php +++ b/reporting/rep309.php @@ -38,7 +38,7 @@ function getTransactions($category, $from, $to) item.stock_id, item.description, line.unit_price * trans.rate AS unit_price, - SUM(line.quantity) as quantity + SUM(IF(line.debtor_trans_type = ".ST_CUSTCREDIT.", -line.quantity, line.quantity)) AS quantity FROM ".TB_PREF."stock_master item, ".TB_PREF."stock_category category, ".TB_PREF."debtor_trans trans, -- 2.30.2