mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 22:49:19 +00:00
only generate invoice after_insert if subscription is not in trial period
This commit is contained in:
@@ -24,6 +24,8 @@ class Subscriptions(Document):
|
|||||||
def set_current_invoice_start(self, date=None):
|
def set_current_invoice_start(self, date=None):
|
||||||
if not date:
|
if not date:
|
||||||
self.current_invoice_start = nowdate()
|
self.current_invoice_start = nowdate()
|
||||||
|
elif self.trial_period_start and self.is_trialling():
|
||||||
|
self.current_invoice_start = self.trial_period_start
|
||||||
|
|
||||||
def set_current_invoice_end(self):
|
def set_current_invoice_end(self):
|
||||||
self.current_invoice_end = get_last_day(self.current_invoice_start)
|
self.current_invoice_end = get_last_day(self.current_invoice_start)
|
||||||
@@ -153,3 +155,5 @@ class Subscriptions(Document):
|
|||||||
)
|
)
|
||||||
return item_names
|
return item_names
|
||||||
|
|
||||||
|
def subscription_updated(self, invoice):
|
||||||
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user