From 01f8a4966ab0bb7b38a953613b90c0ab7f2381f9 Mon Sep 17 00:00:00 2001 From: Khushal Trivedi Date: Wed, 16 Oct 2019 11:40:27 +0530 Subject: [PATCH] [Fix] - making customer/supplier field manadatory on order type condition --- erpnext/manufacturing/doctype/blanket_order/blanket_order.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/manufacturing/doctype/blanket_order/blanket_order.js b/erpnext/manufacturing/doctype/blanket_order/blanket_order.js index 0bbf689d4a..1e18678eb0 100644 --- a/erpnext/manufacturing/doctype/blanket_order/blanket_order.js +++ b/erpnext/manufacturing/doctype/blanket_order/blanket_order.js @@ -51,11 +51,13 @@ frappe.ui.form.on('Blanket Order', { set_tc_name_filter: function(frm) { if (frm.doc.blanket_order_type === 'Selling') { + frm.set_df_property("customer","reqd", 1) frm.set_query("tc_name", function() { return { filters: { selling: 1 } }; }); } if (frm.doc.blanket_order_type === 'Purchasing') { + frm.set_df_property("customer","reqd", 1) frm.set_query("tc_name", function() { return { filters: { buying: 1 } }; });