activity: Add invoiced through information to plan activity view.

Expands the header information on the plan activity view to include
the license ledger that was set as invoiced_through when the last
billing cycle generated an invoice.

Also, updates the name of the header information for the next
invoice date to match what's show in the support view for the plan.
This commit is contained in:
Lauryn Menard 2024-08-29 13:52:42 +02:00 committed by Tim Abbott
parent e86c02cd67
commit d796deddf8
1 changed files with 9 additions and 1 deletions

View File

@ -47,7 +47,15 @@ def get_plan_ledger(request: HttpRequest, plan_id: int) -> HttpResponse:
)
header_entries.append(
ActivityHeaderEntry(
name="Next invoice (UTC)", value=format_optional_datetime(plan.next_invoice_date, True)
name="Start of next billing cycle (UTC)",
value=format_optional_datetime(plan.next_invoice_date, True),
)
)
if plan.invoiced_through is not None:
header_entries.append(
ActivityHeaderEntry(
name="Entry for last invoice",
value=str(plan.invoiced_through),
)
)