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

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

(cherry picked from commit 68fb1b28eb)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
This commit is contained in:
mergify[bot]
2025-01-20 17:34:20 +05:30
committed by GitHub
parent 03219142e0
commit 7045c2cc3d

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()