added function to hide/unhide contact section of a buying form

This commit is contained in:
Anand Doshi 2012-08-06 18:23:45 +05:30
parent 41c4d19279
commit 280e0ce263

View File

@ -122,7 +122,6 @@ var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) {
cur_frm.cscript.dynamic_label = function(doc, cdt, cdn, callback1) {
var base_currency = wn.boot.company[doc.company].default_currency || sys_defaults['currency'];
if (doc.currency === base_currency) {
set_multiple(cdt, cdn, {conversion_rate:1});
hide_field(['conversion_rate', 'net_total_import','grand_total_import',
@ -634,3 +633,7 @@ cur_frm.cscript.check_charge_type_and_get_tax_amount = function(doc, tax, t, cl,
}
}
}
cur_frm.cscript.toggle_contact_section = function(doc) {
doc.supplier ? unhide_field("contact_section") : hide_field("contact_section");
}