Update customer.js

This commit is contained in:
rohitwaghchaure 2018-01-31 14:48:53 +05:30 committed by GitHub
parent 0c9a99a953
commit 2056ea6fb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,13 +44,13 @@ frappe.ui.form.on("Customer", {
}, },
customer_primary_address: function(frm){ customer_primary_address: function(frm){
if(!frm.doc.customer_primary_address){ if(!frm.doc.customer_primary_address){
frm.doc.primary_address = ""; frm.set_value("primary_address", "");
} }
}, },
customer_primary_contact: function(frm){ customer_primary_contact: function(frm){
if(!frm.doc.customer_primary_contact){ if(!frm.doc.customer_primary_contact){
frm.doc.mobile_no = ""; frm.set_value("mobile_no", "");
frm.doc.email_id = ""; frm.set_value("email_id", "");
} }
}, },
@ -92,4 +92,4 @@ frappe.ui.form.on("Customer", {
validate: function(frm) { validate: function(frm) {
if(frm.doc.lead_name) frappe.model.clear_doc("Lead", frm.doc.lead_name); if(frm.doc.lead_name) frappe.model.clear_doc("Lead", frm.doc.lead_name);
}, },
}); });