[minor] allow pricing rule to have negative discount
This commit is contained in:
parent
fcfced624a
commit
c438c1dec7
@ -59,7 +59,7 @@ class PricingRule(Document):
|
|||||||
self.set(f, None)
|
self.set(f, None)
|
||||||
|
|
||||||
def validate_price_or_discount(self):
|
def validate_price_or_discount(self):
|
||||||
for field in ["Price", "Discount Percentage"]:
|
for field in ["Price"]:
|
||||||
if flt(self.get(frappe.scrub(field))) < 0:
|
if flt(self.get(frappe.scrub(field))) < 0:
|
||||||
throw(_("{0} can not be negative").format(field))
|
throw(_("{0} can not be negative").format(field))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user