From: Joe Hunt Date: Sat, 26 Jun 2021 19:19:26 +0000 (+0200) Subject: Bug 5466: user qty decimals handled incorrectly by code that calls get_item_edit_info... X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=4679905de477c3481316a54e7c8792964e1292ea Bug 5466: user qty decimals handled incorrectly by code that calls get_item_edit_info. Fixed --- diff --git a/includes/db/inventory_db.inc b/includes/db/inventory_db.inc index 52c01674..4ffda2e7 100644 --- a/includes/db/inventory_db.inc +++ b/includes/db/inventory_db.inc @@ -93,7 +93,10 @@ function get_item_edit_info($stock_id) ." AND item.units=unit.abbr"; $result = db_query($sql, "The standard cost cannot be retrieved"); - return db_fetch($result); + $row = db_fetch($result); + if ($row['decimals'] == -1) + $row['decimals'] = user_qty_dec(); + return $row; } //--------------------------------------------------------------------------------------