From d0705545829baac385b175240a7e70010a93bb30 Mon Sep 17 00:00:00 2001 From: Tim Schofield Date: Tue, 6 Mar 2018 09:52:13 +0000 Subject: [PATCH] Show stock adjustments and internal stock requests as per http://www.weberp.org/forum/showthread.php?tid=8111 --- StockUsage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/StockUsage.php b/StockUsage.php index 6c789d01a..3aeb88a90 100644 --- a/StockUsage.php +++ b/StockUsage.php @@ -107,7 +107,7 @@ $sql = "SELECT periods.periodno, periods.lastdate_in_period, canview, - SUM(CASE WHEN (stockmoves.type=10 Or stockmoves.type=11 OR stockmoves.type=28) + SUM(CASE WHEN (stockmoves.type=10 OR stockmoves.type=11 OR stockmoves.type=17 OR stockmoves.type=28 OR stockmoves.type=38) AND stockmoves.hidemovt=0 AND stockmoves.stockid = '" . $StockID . "' THEN -stockmoves.qty ELSE 0 END) AS qtyused @@ -121,7 +121,7 @@ } else { $sql = "SELECT periods.periodno, periods.lastdate_in_period, - SUM(CASE WHEN (stockmoves.type=10 Or stockmoves.type=11 OR stockmoves.type=28) + SUM(CASE WHEN (stockmoves.type=10 OR stockmoves.type=11 OR stockmoves.type=17 OR stockmoves.type=28 OR stockmoves.type=38) AND stockmoves.hidemovt=0 AND stockmoves.stockid = '" . $StockID . "' AND stockmoves.loccode='" . $_POST['StockLocation'] . "'