From 946073cfd93c654b075e23798a325667eafc486e Mon Sep 17 00:00:00 2001 From: Jaswanth Sriram Date: Thu, 2 Oct 2025 14:13:45 +0530 Subject: [PATCH] perf: avoid unnecessary set_dynamic_labels updates --- erpnext/public/js/controllers/transaction.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 32c5451b6f7..7b41afcb621 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1679,6 +1679,17 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe ); var company_currency = this.get_company_currency(); + + if ( + this._last_company_currency === company_currency && + this._last_price_list_currency === this.frm.doc.price_list_currency + ) { + return; + } + + this._last_company_currency = company_currency; + this._last_price_list_currency = this.frm.doc.price_list_currency; + this.change_form_labels(company_currency); this.change_grid_labels(company_currency); this.frm.refresh_fields();