mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-28 01:14:46 +00:00
fix(subscription): complete subscription if no outstanding invoices
This commit is contained in:
@@ -223,7 +223,11 @@ class Subscription(Document):
|
|||||||
"""
|
"""
|
||||||
if self.is_trialling():
|
if self.is_trialling():
|
||||||
self.status = "Trialing"
|
self.status = "Trialing"
|
||||||
elif self.status == "Active" and self.end_date and getdate(posting_date) > getdate(self.end_date):
|
elif (
|
||||||
|
not self.has_outstanding_invoice()
|
||||||
|
and self.end_date
|
||||||
|
and getdate(posting_date) > getdate(self.end_date)
|
||||||
|
):
|
||||||
self.status = "Completed"
|
self.status = "Completed"
|
||||||
elif self.is_past_grace_period():
|
elif self.is_past_grace_period():
|
||||||
self.status = self.get_status_for_past_grace_period()
|
self.status = self.get_status_for_past_grace_period()
|
||||||
|
|||||||
Reference in New Issue
Block a user