From a566ac67a7afae23c7e9e7979b87c4fe724ff5ff Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 17 Oct 2023 14:12:32 +1100 Subject: [PATCH] BOM Table - Fix pricing when subassembly is open (#5721) - Ignore pricing for sub-items - Fixes https://github.com/inventree/InvenTree/issues/5286 --- InvenTree/templates/js/translated/bom.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/InvenTree/templates/js/translated/bom.js b/InvenTree/templates/js/translated/bom.js index ebcae2004c..ebf1caec67 100644 --- a/InvenTree/templates/js/translated/bom.js +++ b/InvenTree/templates/js/translated/bom.js @@ -1107,6 +1107,11 @@ function loadBomTable(table, options={}) { var row = data[idx]; + // Do not include pricing for items which are associated with sub-assemblies + if (row.parentId != parent_id) { + continue; + } + // No pricing data available for this row if (row.pricing_min == null && row.pricing_max == null) { complete_pricing = false;