mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 18:51:21 +00:00
fix: service item's cost showing incorrect amount in stock entry (#20105)
This commit is contained in:
committed by
Nabin Hait
parent
e76670562c
commit
2fcc51dece
@@ -767,7 +767,7 @@ def add_additional_cost(stock_entry, work_order):
|
|||||||
|
|
||||||
items = {}
|
items = {}
|
||||||
for d in bom.get(table):
|
for d in bom.get(table):
|
||||||
items.setdefault(d.item_code, d.rate)
|
items.setdefault(d.item_code, d.amount)
|
||||||
|
|
||||||
non_stock_items = frappe.get_all('Item',
|
non_stock_items = frappe.get_all('Item',
|
||||||
fields="name", filters={'name': ('in', list(items.keys())), 'ifnull(is_stock_item, 0)': 0}, as_list=1)
|
fields="name", filters={'name': ('in', list(items.keys())), 'ifnull(is_stock_item, 0)': 0}, as_list=1)
|
||||||
@@ -776,7 +776,7 @@ def add_additional_cost(stock_entry, work_order):
|
|||||||
stock_entry.append('additional_costs', {
|
stock_entry.append('additional_costs', {
|
||||||
'expense_account': expenses_included_in_valuation,
|
'expense_account': expenses_included_in_valuation,
|
||||||
'description': name[0],
|
'description': name[0],
|
||||||
'amount': items.get(name[0])
|
'amount': flt(items.get(name[0])) * flt(stock_entry.fg_completed_qty) / flt(bom.quantity)
|
||||||
})
|
})
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
|
|||||||
Reference in New Issue
Block a user