Merge pull request #49848 from Jaswanth-Sriram-Veturi/perf/transaction-set-dynamic-labels

perf: avoid unnecessary set_dynamic_labels updates
This commit is contained in:
ruthra kumar
2025-10-09 10:15:01 +05:30
committed by GitHub

View File

@@ -1692,6 +1692,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();