From 6a7f75c3e3f9e16446dd79e451c45e9f12d1b5b8 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Wed, 10 Sep 2014 17:04:10 +0530 Subject: [PATCH] Cost of Production cycle --- erpnext/manufacturing/doctype/bom/bom.js | 5 +---- erpnext/manufacturing/doctype/workstation/workstation.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 32c176a857..cb96478735 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -155,8 +155,6 @@ erpnext.bom.calculate_fixed_cost = function(doc) { total_fixed_cost += flt(op[i].fixed_cycle_cost); } cur_frm.set_value("total_fixed_cost", total_fixed_cost); - doc.total_cost = flt(total_fixed_cost) + flt(doc.total_variable_cost); - refresh_field('total_cost'); } erpnext.bom.calculate_rm_cost = function(doc) { @@ -169,8 +167,7 @@ erpnext.bom.calculate_rm_cost = function(doc) { {'qty_consumed_per_unit': flt(rm[i].qty)/flt(doc.quantity)}, 'bom_materials'); total_rm_cost += amt; } - doc.raw_material_cost = total_rm_cost; - refresh_field('raw_material_cost'); + cur_frm.set_value("raw_material_cost", total_rm_cost); } diff --git a/erpnext/manufacturing/doctype/workstation/workstation.py b/erpnext/manufacturing/doctype/workstation/workstation.py index 935e7509d4..ec026c5c29 100644 --- a/erpnext/manufacturing/doctype/workstation/workstation.py +++ b/erpnext/manufacturing/doctype/workstation/workstation.py @@ -20,4 +20,4 @@ class Workstation(Document): frappe.db.set(self, 'overhead', flt(self.hour_rate_electricity) + flt(self.hour_rate_consumable) + flt(self.hour_rate_rent)) frappe.db.set(self, 'hour_rate', flt(self.hour_rate_labour) + flt(self.overhead)) - self.update_bom_operation() + self.update_bom_operation() \ No newline at end of file