mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix: set finished good item rate based on qty
This commit is contained in:
@@ -511,7 +511,7 @@ class StockEntry(StockController):
|
|||||||
bom_items = self.get_bom_raw_materials(finished_item_qty)
|
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()])
|
outgoing_items_cost = sum([flt(row.qty)*flt(row.rate) for row in bom_items.values()])
|
||||||
|
|
||||||
return flt(outgoing_items_cost - scrap_items_cost)
|
return flt((outgoing_items_cost - scrap_items_cost) / finished_item_qty)
|
||||||
|
|
||||||
def distribute_additional_costs(self):
|
def distribute_additional_costs(self):
|
||||||
# If no incoming items, set additional costs blank
|
# If no incoming items, set additional costs blank
|
||||||
|
|||||||
Reference in New Issue
Block a user