From 0e13cda9e5b9e8e37d17abb68578ab0249b899b1 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 25 Nov 2021 10:04:21 +0000 Subject: [PATCH] Split out unit and monetary columns This is so we can treat them slightly differently later on. --- app/main/views/organisations.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/main/views/organisations.py b/app/main/views/organisations.py index c54b9444a..aaa6e1bea 100644 --- a/app/main/views/organisations.py +++ b/app/main/views/organisations.py @@ -175,15 +175,22 @@ def download_organisation_usage_report(org_id): financial_year=selected_year )['services'] - column_names = OrderedDict([ + unit_column_names = OrderedDict([ ('service_id', 'Service ID'), ('service_name', 'Service Name'), ('emails_sent', 'Emails sent'), ('sms_remainder', 'Free text message allowance remaining'), + ]) + + monetary_column_names = OrderedDict([ ('sms_cost', 'Spent on text messages (£)'), ('letter_cost', 'Spent on letters (£)') ]) + column_names = OrderedDict( + list(unit_column_names.items()) + list(monetary_column_names.items()) + ) + org_usage_data = [[x for x in column_names.values()]] for service in services_usage: