From d749c4aac2207393f1bc7e58be412daa72c06b56 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 9 Jan 2023 23:35:11 +0530 Subject: [PATCH] Revert "feat: Add operating cost based on bom quanity without creating job card" --- erpnext/manufacturing/doctype/bom/bom.js | 28 ++++++------------- erpnext/manufacturing/doctype/bom/bom.json | 24 +--------------- erpnext/manufacturing/doctype/bom/bom.py | 28 +++++++------------ erpnext/manufacturing/doctype/bom/test_bom.py | 27 ------------------ .../doctype/bom/test_records.json | 26 ----------------- 5 files changed, 19 insertions(+), 114 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 5ee98de376..4dd8205a70 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -65,13 +65,7 @@ frappe.ui.form.on("BOM", { }); }, - validate: function(frm) { - if (frm.doc.fg_based_operating_cost && frm.doc.with_operations) { - frappe.throw({message: __("Please check either with operations or FG Based Operating Cost."), title: __("Mandatory")}); - } - }, - - onload_post_render: function(frm) { + onload_post_render(frm) { frm.get_field("items").grid.set_multiple_add("item_code", "qty"); }, @@ -542,20 +536,14 @@ erpnext.bom.calculate_op_cost = function(doc) { doc.operating_cost = 0.0; doc.base_operating_cost = 0.0; - if(doc.with_operations) { - for(var i=0;i