From fff85845ae2899b1dbf4a39df94d3e6f27a4fa7e Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sat, 3 Dec 2016 23:14:30 +0100 Subject: [PATCH] Rerun Items Summary Report fix --- reporting/rep309.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reporting/rep309.php b/reporting/rep309.php index 17203424..2e3dfa67 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