diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js index 54f974cc20f..0f8602a9bea 100644 --- a/erpnext/selling/doctype/customer/customer.js +++ b/erpnext/selling/doctype/customer/customer.js @@ -42,6 +42,17 @@ frappe.ui.form.on("Customer", { } }) }, + customer_primary_address: function(frm){ + if(!frm.doc.customer_primary_address){ + frm.doc.primary_address = "" + } + }, + customer_primary_contact: function(frm){ + if(!frm.doc.customer_primary_contact){ + frm.doc.mobile_no = ""; + frm.doc.email_id = ""; + } + }, refresh: function(frm) { if(frappe.defaults.get_default("cust_master_name")!="Naming Series") {