mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 12:39:18 +00:00
fix: promotional scheme not able to savce
This commit is contained in:
@@ -103,7 +103,7 @@ class PricingRule(Document):
|
|||||||
self.same_item = 1
|
self.same_item = 1
|
||||||
|
|
||||||
def validate_max_discount(self):
|
def validate_max_discount(self):
|
||||||
if self.rate_or_discount == "Discount Percentage" and self.items:
|
if self.rate_or_discount == "Discount Percentage" and self.get("items"):
|
||||||
for d in self.items:
|
for d in self.items:
|
||||||
max_discount = frappe.get_cached_value("Item", d.item_code, "max_discount")
|
max_discount = frappe.get_cached_value("Item", d.item_code, "max_discount")
|
||||||
if max_discount and flt(self.discount_percentage) > flt(max_discount):
|
if max_discount and flt(self.discount_percentage) > flt(max_discount):
|
||||||
|
|||||||
Reference in New Issue
Block a user