From 3c419c5e05f4ba76e96b577f7ffaad4bfc9adfd1 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 16 Jul 2012 15:44:38 +0530 Subject: [PATCH] cur_frm.doc re-reference when is called --- erpnext/selling/doctype/quotation/quotation.js | 4 +++- public/js/all-app.js | 9 ++++++--- public/js/all-web.js | 4 +++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index 9a45c70091..774cc2fd66 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -63,7 +63,9 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) { // hide - unhide fields based on lead or customer.. // ======================================================================================================================= cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){ - hide_field(['lead', 'lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group', 'organization']); + hide_field(['lead', 'lead_name','customer','customer_address','contact_person', + 'customer_name','address_display','contact_display','contact_mobile','contact_email', + 'territory','customer_group', 'organization']); if(doc.quotation_to == 'Lead') unhide_field(['lead']); else if(doc.quotation_to == 'Customer') unhide_field(['customer']); diff --git a/public/js/all-app.js b/public/js/all-app.js index 69c3fc91f0..130ec39614 100644 --- a/public/js/all-app.js +++ b/public/js/all-app.js @@ -1314,7 +1314,9 @@ delete locals[dt][dn];} function get_local(dt,dn){return locals[dt]?locals[dt][dn]:null;} LocalDB.sync=function(list){if(list._kl)list=expand_doclist(list);if(list){LocalDB.clear_locals(list[0].doctype,list[0].name);} for(var i=0;i