Merge pull request #17081 from rohitwaghchaure/fix_pos_pricing_rule_code_cleanup
fix: code cleanup
This commit is contained in:
commit
451f25d5c2
@ -497,8 +497,8 @@ def apply_pricing_rule(doc, pr_doc, item_row, value, do_not_validate=False):
|
|||||||
frappe.msgprint(_("Row {0}: user has not applied rule <b>{1}</b> on the item <b>{2}</b>")
|
frappe.msgprint(_("Row {0}: user has not applied rule <b>{1}</b> on the item <b>{2}</b>")
|
||||||
.format(item.idx, pr_doc.title, item.item_code))
|
.format(item.idx, pr_doc.title, item.item_code))
|
||||||
|
|
||||||
if rule_applied and doc.pricing_rules:
|
if rule_applied and doc.get("pricing_rules"):
|
||||||
for d in doc.pricing_rules:
|
for d in doc.get("pricing_rules"):
|
||||||
key = (d.child_docname, d.pricing_rule)
|
key = (d.child_docname, d.pricing_rule)
|
||||||
if key in rule_applied:
|
if key in rule_applied:
|
||||||
d.rule_applied = 1
|
d.rule_applied = 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user