mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
enhancement: do nothing if cancel_sbscription is called for cancelled subscription
This commit is contained in:
@@ -396,6 +396,7 @@ class Subscriptions(Document):
|
||||
This sets the subscription as cancelled. It will stop invoices from being generated
|
||||
but it will not affect already created invoices.
|
||||
"""
|
||||
if self.status != 'Canceled':
|
||||
to_generate_invoice = True if self.status == 'Active' else False
|
||||
to_prorate = frappe.db.get_single_value('Subscription Settings', 'prorate')
|
||||
self.status = 'Canceled'
|
||||
|
||||
Reference in New Issue
Block a user