@@ -713,7 +713,9 @@ def apply_pricing_rule_for_free_items(doc, pricing_rule_args):
|
|||||||
args.pop((item.item_code, item.pricing_rules))
|
args.pop((item.item_code, item.pricing_rules))
|
||||||
|
|
||||||
for free_item in args.values():
|
for free_item in args.values():
|
||||||
if frappe.get_value("Pricing Rule", free_item["pricing_rules"], "enforce_free_item_qty"):
|
if doc.is_new() or frappe.get_value(
|
||||||
|
"Pricing Rule", free_item["pricing_rules"], "enforce_free_item_qty"
|
||||||
|
):
|
||||||
doc.append("items", free_item)
|
doc.append("items", free_item)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user