update cost as per LPR and standard rate
This commit is contained in:
parent
6715172211
commit
b5b39f0e48
@ -91,14 +91,12 @@ class DocType:
|
|||||||
|
|
||||||
arg = eval(arg)
|
arg = eval(arg)
|
||||||
item = self.get_item_det(arg['item_code'])
|
item = self.get_item_det(arg['item_code'])
|
||||||
|
|
||||||
self.validate_rm_item(item)
|
self.validate_rm_item(item)
|
||||||
|
|
||||||
arg['bom_no'] = arg['bom_no'] or item and cstr(item[0]['default_bom']) or ''
|
arg['bom_no'] = arg['bom_no'] or item and cstr(item[0]['default_bom']) or ''
|
||||||
arg.update(item[0])
|
arg.update(item[0])
|
||||||
|
|
||||||
rate = self.get_rm_rate(arg)
|
rate = self.get_rm_rate(arg)
|
||||||
|
|
||||||
ret_item = {
|
ret_item = {
|
||||||
'description' : item and arg['description'] or '',
|
'description' : item and arg['description'] or '',
|
||||||
'stock_uom' : item and arg['stock_uom'] or '',
|
'stock_uom' : item and arg['stock_uom'] or '',
|
||||||
@ -209,7 +207,7 @@ class DocType:
|
|||||||
"""Fetch RM rate as per today's valuation rate and calculate totals"""
|
"""Fetch RM rate as per today's valuation rate and calculate totals"""
|
||||||
total_rm_cost = 0
|
total_rm_cost = 0
|
||||||
for d in getlist(self.doclist, 'bom_materials'):
|
for d in getlist(self.doclist, 'bom_materials'):
|
||||||
if self.doc.rm_cost_as_per == 'Valuation Rate':
|
#if self.doc.rm_cost_as_per == 'Valuation Rate':
|
||||||
arg = {'item_code': d.item_code, 'qty': d.qty, 'bom_no': d.bom_no}
|
arg = {'item_code': d.item_code, 'qty': d.qty, 'bom_no': d.bom_no}
|
||||||
ret = self.get_bom_material_detail(cstr(arg))
|
ret = self.get_bom_material_detail(cstr(arg))
|
||||||
for k in ret:
|
for k in ret:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user