adds validation to billing_interval_count in Subscription Plan

This commit is contained in:
tundebabzy 2018-02-27 14:12:39 +01:00
parent 3c26a7e862
commit c634ca8737

View File

@ -7,4 +7,9 @@ import frappe
from frappe.model.document import Document
class SubscriptionPlan(Document):
pass
def validate(self):
self.validate_interval_count()
def validate_interval_count(self):
if self.billing_interval_count < 1:
frappe.throw('Billing Interval Count cannot be less than 1')