fix: set invoice start date to subscription start date (#45342)

This commit is contained in:
Diptanil Saha
2025-01-20 17:06:02 +05:30
committed by GitHub
parent 5fb158a6f7
commit 68fb1b28eb

View File

@@ -114,10 +114,10 @@ class Subscription(Document):
if self.trial_period_end and getdate(self.trial_period_end) > getdate(self.start_date):
_current_invoice_start = add_days(self.trial_period_end, 1)
elif self.trial_period_start and self.is_trialling():
_current_invoice_start = self.trial_period_start
elif date:
_current_invoice_start = date
elif self.trial_period_start and self.is_trialling():
_current_invoice_start = self.trial_period_start
else:
_current_invoice_start = nowdate()