From d4c7f6c430d861a4c27f7734e285852e248a5a9a Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 23 Dec 2022 09:38:00 +0100 Subject: [PATCH] Inventory valuation report. 301 unit decimal -1 issue. Fixed. --- reporting/rep301.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reporting/rep301.php b/reporting/rep301.php index 5d04754b..57350d8c 100644 --- a/reporting/rep301.php +++ b/reporting/rep301.php @@ -91,6 +91,7 @@ function getTransactions($category, $location, $date) { $date = date2sql($date); + $dec = user_qty_dec(); $sql = "SELECT item.category_id, category.description AS cat_description, item.stock_id, @@ -117,7 +118,7 @@ function getTransactions($category, $location, $date) $sql .= "move.loc_code, "; $sql .= "item.stock_id, item.description - HAVING ROUND(SUM(move.qty), units.decimals) != 0"; + HAVING ROUND(SUM(move.qty), IF(units.decimals <> -1, units.decimals, $dec)) != 0"; if ($category != 0) $sql .= " AND item.category_id = ".db_escape($category); if ($location != 'all') -- 2.30.2