From ed35a296ab09c3675bc20289e1a90c5a2dd3a26d Mon Sep 17 00:00:00 2001 From: saurabh-bhosale Date: Tue, 13 Feb 2018 14:40:59 +0530 Subject: [PATCH] closes #12872 (#12888) --- erpnext/selling/doctype/customer/customer.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js index 92734cc6f7..019e7ddafb 100644 --- a/erpnext/selling/doctype/customer/customer.js +++ b/erpnext/selling/doctype/customer/customer.js @@ -34,6 +34,12 @@ frappe.ui.form.on("Customer", { } }) }, + customer_primary_contact: function(frm){ + if(!frm.doc.customer_primary_contact){ + frm.set_value("mobile_no", ""); + frm.set_value("email_id", ""); + } + }, refresh: function(frm) { if(frappe.defaults.get_default("cust_master_name")!="Naming Series") { frm.toggle_display("naming_series", false);