mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-16 08:05:00 +00:00
fix: add is_new in if condition
This commit is contained in:
@@ -713,7 +713,9 @@ def apply_pricing_rule_for_free_items(doc, pricing_rule_args):
|
||||
args.pop((item.item_code, item.pricing_rules))
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user