Skip to content

Commit

Permalink
fix: Safe cast row.rate (in case of faulty exploded items, edge cas…
Browse files Browse the repository at this point in the history
…e but oh well)
  • Loading branch information
marination committed May 27, 2022
1 parent 767a775 commit 6d65e2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/manufacturing/doctype/bom/bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ def calculate_exploded_cost(self):
for row in self.get("exploded_items"):
old_rate = flt(row.rate)
row.rate = rm_rate_map.get(row.item_code)
row.amount = flt(row.stock_qty) * row.rate
row.amount = flt(row.stock_qty) * flt(row.rate)

if old_rate != row.rate:
# Only db_update if changed
Expand Down

0 comments on commit 6d65e2b

Please sign in to comment.