From: Joe Date: Fri, 23 Dec 2022 08:38:00 +0000 (+0100) Subject: Inventory valuation report. 301 unit decimal -1 issue. Fixed. X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=d4c7f6c430d861a4c27f7734e285852e248a5a9a Inventory valuation report. 301 unit decimal -1 issue. Fixed. --- 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')