From e306a1f5e1c44701ae9416f4e817a639676fe419 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 1 Mar 2012 19:25:33 +0530 Subject: [PATCH] fix in sales and purchase common column hide --- erpnext/buying/doctype/purchase_common/purchase_common.js | 8 +++++--- erpnext/selling/doctype/sales_common/sales_common.js | 6 +++--- erpnext/startup/js/feature_setup.js | 6 +++--- js/all-app.js | 2 +- version.num | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js index 317df513c2..88fba5c6fa 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -100,17 +100,19 @@ var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) { for (d in item_cols_import) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_import[d]+' ('+doc.currency+')'); var hide = (doc.currency == sys_defaults['currency']) ? false : true; - for (f in item_cols_base) cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide); + for (f in item_cols_import) { + cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide); + } if (doc.doctype == 'Payable Voucher') { $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-rate"]').html('Rate ('+base_curr+')'); - cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('rate', hide); + //cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('rate', hide); // advance table flds adv_cols = {'advance_amount': 'Advance Amount', 'allocated_amount': 'Allocated Amount', 'tds_amount': 'TDS Amount', 'tds_allocated': 'TDS Allocated'} for (d in adv_cols) $('[data-grid-fieldname="Advance Allocation Detail-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')'); } else { $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-purchase_rate"]').html('Rate ('+base_curr+')'); - cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('purchase_rate', hide); + //cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('purchase_rate', hide); } //tax table flds diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js index b9bff5c37a..4865b3fdf8 100644 --- a/erpnext/selling/doctype/sales_common/sales_common.js +++ b/erpnext/selling/doctype/sales_common/sales_common.js @@ -119,7 +119,9 @@ var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) { for (d in item_cols_export) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_export[d]+' ('+doc.currency+')'); var hide = (doc.currency == sys_defaults['currency']) ? false : true; - for (f in item_cols_base) cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide); + for (f in item_cols_export) { + cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide); + } //tax table flds tax_cols = {'tax_amount': 'Amount', 'total': 'Total'}; @@ -555,11 +557,9 @@ cur_frm.cscript.consider_incl_rate = function(doc, other_fname) { var tax_list = getchildren('RV Tax Detail', doc.name, other_fname, doc.doctype); for(var i=0; i