From 5013dcb12cc18ba38d69813602ae1af49db1b745 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 5 Aug 2013 12:16:04 +0530 Subject: [PATCH] [fix] [minor] change_grid_labels --- public/js/transaction.js | 1 + selling/doctype/sales_common/sales_common.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/public/js/transaction.js b/public/js/transaction.js index 4a647adc1c..6348e5a30e 100644 --- a/public/js/transaction.js +++ b/public/js/transaction.js @@ -195,6 +195,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ var company_currency = this.get_company_currency(); this.change_form_labels(company_currency); this.change_grid_labels(company_currency); + this.frm.refresh_fields(); }, recalculate: function() { diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js index 964a984749..20d3a2323c 100644 --- a/selling/doctype/sales_common/sales_common.js +++ b/selling/doctype/sales_common/sales_common.js @@ -617,7 +617,9 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ // set labels var $wrapper = $(this.frm.wrapper); $.each(field_label_map, function(fname, label) { - $wrapper.find('[data-grid-fieldname="'+fname+'"]').text(label); + fname = fname.split("-"); + var df = wn.meta.get_docfield(fname[0], fname[1], me.frm.doc.name); + if(df) df.label = label; }); },