From edfba96ce1e9a9c1b27cfd3a74675ae2a93bd5ec Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 5 Aug 2013 11:56:54 +0530 Subject: [PATCH] [fix] [minor] show company currency fields if included_in_print_rate is checked --- selling/doctype/sales_common/sales_common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js index b3ae0fe17af..964a9847494 100644 --- a/selling/doctype/sales_common/sales_common.js +++ b/selling/doctype/sales_common/sales_common.js @@ -605,7 +605,10 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ // toggle columns var item_grid = this.frm.fields_dict[this.fname].grid; - var show = this.frm.doc.currency != company_currency; + var show = (this.frm.doc.currency != company_currency) || + (wn.model.get_doclist(cur_frm.doctype, cur_frm.docname, + {parentfield: "other_charges", included_in_print_rate: 1}).length); + $.each(["basic_rate", "base_ref_rate", "amount"], function(i, fname) { if(wn.meta.get_docfield(item_grid.doctype, fname)) item_grid.set_column_disp(fname, show);