fix: Semgrep rules

This commit is contained in:
DHINESH00
2024-12-23 11:23:23 +05:30
parent d541259da9
commit 547c8004eb

View File

@@ -1864,7 +1864,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
if (data && data.apply_rule_on_other_items && JSON.parse(data.apply_rule_on_other_items)) {
fields.push(frappe.scrub(data.pricing_rule_for))
me.frm.doc.items.forEach(d => {
if (in_list(JSON.parse(data.apply_rule_on_other_items), d[data.apply_rule_on])) {
if (JSON.parse(data.apply_rule_on_other_items).includes(d[data.apply_rule_on])) {
for(var k in data) {
if (in_list(fields, k) && data[k] && (data.price_or_product_discount === 'Price' || k === 'pricing_rules')) {