mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
fix: lint
This commit is contained in:
@@ -273,7 +273,7 @@ erpnext.TaxDetail = class TaxDetail {
|
|||||||
click: () => {
|
click: () => {
|
||||||
let cur_section = this.controls['section_name'].get_input_value();
|
let cur_section = this.controls['section_name'].get_input_value();
|
||||||
if (cur_section) {
|
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')});
|
() => {this.delete(cur_section, 'section')});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -354,7 +354,7 @@ erpnext.TaxDetail = class TaxDetail {
|
|||||||
click: () => {
|
click: () => {
|
||||||
const component = this.controls['component'].get_input_value();
|
const component = this.controls['component'].get_input_value();
|
||||||
if (component) {
|
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')});
|
() => {this.delete(component, 'component')});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,12 +80,12 @@ def run_report(report_name, data):
|
|||||||
report[section_name]['subtotal'] += row['amount']
|
report[section_name]['subtotal'] += row['amount']
|
||||||
if component['type'] == 'section':
|
if component['type'] == 'section':
|
||||||
if component_name == section_name:
|
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:
|
try:
|
||||||
report[section_name]['rows'] += report[component_name]['rows']
|
report[section_name]['rows'] += report[component_name]['rows']
|
||||||
report[section_name]['subtotal'] += report[component_name]['subtotal']
|
report[section_name]['subtotal'] += report[component_name]['subtotal']
|
||||||
except KeyError:
|
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:
|
if show_detail:
|
||||||
new_data += report[section_name]['rows']
|
new_data += report[section_name]['rows']
|
||||||
@@ -141,7 +141,7 @@ def filter_match(value, string):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
num = float(string) if string.strip() else 0
|
num = float(string) if string.strip() else 0
|
||||||
return eval(f'{value} {operator} {num}')
|
return frappe.safe_eval(f'{value} {operator} {num}')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
if operator == '<':
|
if operator == '<':
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user