fix: incorrect outgoing rates when material_consumption enabled
This commit is contained in:
parent
37c318a65f
commit
7f3e6d149a
@ -545,7 +545,7 @@ class StockEntry(StockController):
|
||||
scrap_items_cost = sum([flt(d.basic_amount) for d in self.get("items") if d.is_scrap_item])
|
||||
|
||||
# Get raw materials cost from BOM if multiple material consumption entries
|
||||
if frappe.db.get_single_value("Manufacturing Settings", "material_consumption", cache=True):
|
||||
if not outgoing_items_cost and frappe.db.get_single_value("Manufacturing Settings", "material_consumption", cache=True):
|
||||
bom_items = self.get_bom_raw_materials(finished_item_qty)
|
||||
outgoing_items_cost = sum([flt(row.qty)*flt(row.rate) for row in bom_items.values()])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user