From 737d8a1e260027a16cc1e6bb5d42717372dbec1d Mon Sep 17 00:00:00 2001 From: marination Date: Mon, 25 Nov 2019 09:42:08 +0530 Subject: [PATCH] fix: Added comments --- erpnext/stock/doctype/stock_entry/stock_entry.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 6c82c8b6b2..96e74ccca1 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -416,9 +416,12 @@ frappe.ui.form.on('Stock Entry', { "label":__("Fetch exploded BOM (including sub-assemblies)"), "default":1}, {"fieldname":"fetch", "label":__("Get Items from BOM"), "fieldtype":"Button"} ] + + //Exclude field 'Target Warehouse' in case of Material Issue if (frm.doc.purpose == 'Material Issue'){ fields.splice(2,1); } + //Exclude field 'Source Warehouse' in case of Material Receipt else if(frm.doc.purpose == 'Material Receipt'){ fields.splice(1,1); }