diff --git a/erpnext/accounts/doctype/subscription_plan/subscription_plan.py b/erpnext/accounts/doctype/subscription_plan/subscription_plan.py index a1ca4e4425..4b8c8fcedd 100644 --- a/erpnext/accounts/doctype/subscription_plan/subscription_plan.py +++ b/erpnext/accounts/doctype/subscription_plan/subscription_plan.py @@ -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')