fix: divide sub-assembly cost by qty to get per-unit rate in BOM Creator (backport #54090) (#54091)

This commit is contained in:
mergify[bot]
2026-04-07 05:55:55 +00:00
committed by GitHub
parent ff262655bb
commit 454271ad68

View File

@@ -203,7 +203,9 @@ class BOMCreator(Document):
self,
)
else:
row.rate = flt(self.get_raw_material_cost(row.item_code) * row.conversion_factor)
row.rate = flt(
self.get_raw_material_cost(row.item_code) / flt(row.qty or 1) * row.conversion_factor
)
row.amount = flt(row.rate) * flt(row.qty)
amount += flt(row.amount)