fix: Semgrep rules

(cherry picked from commit 547c8004eb)
This commit is contained in:
DHINESH00
2024-12-23 11:23:23 +05:30
committed by Mergify
parent 38cb5a98bf
commit 1d5a73a325

View File

@@ -1833,7 +1833,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')) {