fixes in quotation

This commit is contained in:
Nabin Hait 2012-05-03 14:55:21 +05:30
parent 16b6386648
commit dc7ffe47b2

View File

@ -42,7 +42,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(doc.quotation_to) { if(doc.quotation_to) {
if(doc.quotation_to == 'Customer') { if(doc.quotation_to == 'Customer') {
hide_field(['lead', 'lead_name', 'organization']); hide_field(['lead', 'lead_name']);
} }
else if (doc.quotation_to == 'Lead') { else if (doc.quotation_to == 'Lead') {
hide_field(['customer','customer_address','contact_person', 'customer_name','contact_display', 'customer_group']); hide_field(['customer','customer_address','contact_person', 'customer_name','contact_display', 'customer_group']);
@ -61,11 +61,11 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
// hide - unhide fields based on lead or customer.. // hide - unhide fields based on lead or customer..
// ======================================================================================================================= // =======================================================================================================================
cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){ 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']);
if(doc.quotation_to == 'Lead') unhide_field(['lead']); if(doc.quotation_to == 'Lead') unhide_field(['lead']);
else if(doc.quotation_to == 'Customer') unhide_field(['customer']); else if(doc.quotation_to == 'Customer') unhide_field(['customer']);
doc.lead = doc.lead_name = doc.customer = doc.customer_name = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = doc.organization = ""; doc.lead = doc.lead_name = doc.customer = doc.customer_name = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
} }