From 4776d3e0973162d28d177d3950aeada46235e3a9 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 18 Apr 2012 12:37:01 +0530 Subject: [PATCH] Update erpnext/production/doctype/bill_of_materials/bill_of_materials.js --- .../doctype/bill_of_materials/bill_of_materials.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/production/doctype/bill_of_materials/bill_of_materials.js b/erpnext/production/doctype/bill_of_materials/bill_of_materials.js index ae61147538..c49a9bc501 100644 --- a/erpnext/production/doctype/bill_of_materials/bill_of_materials.js +++ b/erpnext/production/doctype/bill_of_materials/bill_of_materials.js @@ -157,3 +157,8 @@ cur_frm.fields_dict['bom_materials'].grid.get_field('bom_no').get_query = functi return 'SELECT DISTINCT `tabBill Of Materials`.`name`, `tabBill Of Materials`.`remarks` FROM `tabBill Of Materials` WHERE `tabBill Of Materials`.`item` = "' + d.item_code + '" AND `tabBill Of Materials`.`is_active` = "Yes" AND `tabBill Of Materials`.docstatus = 1 AND `tabBill Of Materials`.`name` like "%s" ORDER BY `tabBill Of Materials`.`name` LIMIT 50'; } +cur_frm.cscript.validate = function(doc, dt, dn) { + calculate_op_cost(doc, dt, dn); + calculate_rm_cost(doc, dt, dn); + calculate_total(doc); +} \ No newline at end of file