move bom based rate calculation to end (#9271)
This commit is contained in:
parent
489ab6d70d
commit
99a2db80ab
@ -138,8 +138,6 @@ class BOM(WebsiteGenerator):
|
||||
|
||||
if arg.get('scrap_items'):
|
||||
rate = self.get_valuation_rate(arg)
|
||||
elif arg['bom_no']:
|
||||
rate = self.get_bom_unitcost(arg['bom_no'])
|
||||
elif arg:
|
||||
if self.rm_cost_as_per == 'Valuation Rate':
|
||||
rate = self.get_valuation_rate(arg)
|
||||
@ -151,6 +149,9 @@ class BOM(WebsiteGenerator):
|
||||
rate = frappe.db.get_value("Item Price", {"price_list": self.buying_price_list,
|
||||
"item_code": arg["item_code"]}, "price_list_rate") or 0
|
||||
|
||||
if not rate and arg['bom_no']:
|
||||
rate = self.get_bom_unitcost(arg['bom_no'])
|
||||
|
||||
return rate
|
||||
|
||||
def update_cost(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user