Merge pull request #17081 from rohitwaghchaure/fix_pos_pricing_rule_code_cleanup

fix: code cleanup
This commit is contained in:
rohitwaghchaure
2019-04-01 10:53:52 +05:30
committed by GitHub

View File

@@ -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>")
.format(item.idx, pr_doc.title, item.item_code))
if rule_applied and doc.pricing_rules:
for d in doc.pricing_rules:
if rule_applied and doc.get("pricing_rules"):
for d in doc.get("pricing_rules"):
key = (d.child_docname, d.pricing_rule)
if key in rule_applied:
d.rule_applied = 1