From: Joe Hunt Date: Sat, 3 Dec 2016 22:14:30 +0000 (+0100) Subject: Rerun Items Summary Report fix X-Git-Tag: 2.3-final~14 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=fff85845ae2899b1dbf4a39df94d3e6f27a4fa7e Rerun Items Summary Report fix --- 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,