mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-13 20:05:09 +00:00
fix: divide sub-assembly cost by qty to get per-unit rate in BOM Creator (#54090)
Co-authored-by: Ravindu Gajanayaka <ravindu2012@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user