From 3027cc7da61c81b8b99ea672917766e5c0530fc7 Mon Sep 17 00:00:00 2001 From: casesolved-co-uk Date: Wed, 24 Mar 2021 04:30:28 +0000 Subject: [PATCH] fix: minor bug and tidy --- erpnext/accounts/report/tax_detail/tax_detail.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/tax_detail/tax_detail.js b/erpnext/accounts/report/tax_detail/tax_detail.js index 5da63dec57..391aacf391 100644 --- a/erpnext/accounts/report/tax_detail/tax_detail.js +++ b/erpnext/accounts/report/tax_detail/tax_detail.js @@ -172,8 +172,8 @@ erpnext.TaxDetail = class TaxDetail { } } set_value_label_from_filter() { - const section_name = this.controls['section_name'].value; - const fidx = this.controls['filter_index'].value; + const section_name = this.controls['section_name'].get_input_value(); + const fidx = this.controls['filter_index'].get_input_value(); if (section_name && fidx) { const fieldname = this.sections[section_name][fidx]['fieldname']; this.controls['value_field'].set_input(this.label_lookup[fieldname]); @@ -182,7 +182,7 @@ erpnext.TaxDetail = class TaxDetail { } } get_value_fieldname() { - const curlabel = this.controls['value_field'].value; + const curlabel = this.controls['value_field'].get_input_value(); return this.fieldname_lookup[curlabel]; } new_section(label) { @@ -203,6 +203,7 @@ erpnext.TaxDetail = class TaxDetail { } set_section(name) { // Sets the given section name and then reloads the data + this.controls['filter_index'].set_input(''); if (name && !this.sections[name]) { this.sections[name] = {}; } @@ -224,10 +225,10 @@ erpnext.TaxDetail = class TaxDetail { refresh = true; } } - this.reload_filter(); if (refresh) { this.qr.refresh(); } + this.reload_filter(); } reload_filter() { const section_name = this.controls['section_name'].get_input_value();