From d796deddf84522996977afc5af6091bdbee63b07 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Thu, 29 Aug 2024 13:52:42 +0200 Subject: [PATCH] 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. --- corporate/views/plan_activity.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/corporate/views/plan_activity.py b/corporate/views/plan_activity.py index b555b20d76..a030ce04f3 100644 --- a/corporate/views/plan_activity.py +++ b/corporate/views/plan_activity.py @@ -47,9 +47,17 @@ 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), + ) + ) content = make_table(title, cols, rows, header=header_entries)