diff --git a/erpnext/accounts/report/tax_detail/tax_detail.js b/erpnext/accounts/report/tax_detail/tax_detail.js index 098096ce0b..ed6fac4e60 100644 --- a/erpnext/accounts/report/tax_detail/tax_detail.js +++ b/erpnext/accounts/report/tax_detail/tax_detail.js @@ -273,7 +273,7 @@ erpnext.TaxDetail = class TaxDetail { click: () => { let cur_section = this.controls['section_name'].get_input_value(); if (cur_section) { - frappe.confirm(__('Are you sure you want to delete section ') + cur_section + '?', + frappe.confirm(__('Are you sure you want to delete section') + ' ' + cur_section + '?', () => {this.delete(cur_section, 'section')}); } } @@ -354,7 +354,7 @@ erpnext.TaxDetail = class TaxDetail { click: () => { const component = this.controls['component'].get_input_value(); if (component) { - frappe.confirm(__('Are you sure you want to delete component ') + component + '?', + frappe.confirm(__('Are you sure you want to delete component') + ' ' + component + '?', () => {this.delete(component, 'component')}); } } diff --git a/erpnext/accounts/report/tax_detail/tax_detail.py b/erpnext/accounts/report/tax_detail/tax_detail.py index fdecd269eb..18436de3d8 100644 --- a/erpnext/accounts/report/tax_detail/tax_detail.py +++ b/erpnext/accounts/report/tax_detail/tax_detail.py @@ -80,12 +80,12 @@ def run_report(report_name, data): report[section_name]['subtotal'] += row['amount'] if component['type'] == 'section': if component_name == section_name: - frappe.throw(_("A report component cannot refer to its parent section: ") + section_name) + frappe.throw(_("A report component cannot refer to its parent section") + ": " + section_name) try: report[section_name]['rows'] += report[component_name]['rows'] report[section_name]['subtotal'] += report[component_name]['subtotal'] except KeyError: - frappe.throw(_("A report component can only refer to an earlier section: ") + section_name) + frappe.throw(_("A report component can only refer to an earlier section") + ": " + section_name) if show_detail: new_data += report[section_name]['rows'] @@ -141,7 +141,7 @@ def filter_match(value, string): try: num = float(string) if string.strip() else 0 - return eval(f'{value} {operator} {num}') + return frappe.safe_eval(f'{value} {operator} {num}') except ValueError: if operator == '<': return True