mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-06 15:00:27 +00:00
bom fix
This commit is contained in:
@@ -25,7 +25,7 @@ class DocType:
|
|||||||
def update_bom_operation(self):
|
def update_bom_operation(self):
|
||||||
bom_list = sql(" select DISTINCT parent from `tabBOM Operation` where workstation = '%s'" % self.doc.name)
|
bom_list = sql(" select DISTINCT parent from `tabBOM Operation` where workstation = '%s'" % self.doc.name)
|
||||||
for bom_no in bom_list:
|
for bom_no in bom_list:
|
||||||
sql("update `tabBOM Operation` set hour_rate = '%s' where parent = '%s' and workstation = '%s'"%( self.doc.hour_rate, bom_no, self.doc.name))
|
sql("update `tabBOM Operation` set hour_rate = '%s' where parent = '%s' and workstation = '%s'"%( self.doc.hour_rate, bom_no[0], self.doc.name))
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
set(self.doc, 'overhead', flt(self.doc.hour_rate_electricity) + flt(self.doc.hour_rate_consumable) + flt(self.doc.hour_rate_rent))
|
set(self.doc, 'overhead', flt(self.doc.hour_rate_electricity) + flt(self.doc.hour_rate_consumable) + flt(self.doc.hour_rate_rent))
|
||||||
|
|||||||
Reference in New Issue
Block a user