X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep302.php;h=cdfd0e9a21e89d81a92422c3d063453f77f6d2ae;hb=5a3cbfe6d2df1c8c32edcab8bf93e8a8432a15fc;hp=bfb515f1257ef238fdb0bb74b746eb3aa5fb148f;hpb=f44132511cc91b83f20f91af0625d4b112b4c26e;p=fa-stable.git diff --git a/reporting/rep302.php b/reporting/rep302.php index bfb515f1..cdfd0e9a 100644 --- a/reporting/rep302.php +++ b/reporting/rep302.php @@ -36,7 +36,7 @@ function getTransactions($category, $location) item.stock_id, item.description, item.inactive, IF(move.stock_id IS NULL, '', move.loc_code) AS loc_code, - SUM(IFNULL(move.stock_id, 0)) AS qty_on_hand + SUM(IF(move.stock_id IS NULL, 0, move.qty)) AS qty_on_hand FROM (".TB_PREF."stock_master item," .TB_PREF."stock_category category) LEFT JOIN ".TB_PREF."stock_moves move ON item.stock_id=move.stock_id