mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 17:45:32 -04:00
Split out unit and monetary columns
This is so we can treat them slightly differently later on.
This commit is contained in:
@@ -175,15 +175,22 @@ def download_organisation_usage_report(org_id):
|
|||||||
financial_year=selected_year
|
financial_year=selected_year
|
||||||
)['services']
|
)['services']
|
||||||
|
|
||||||
column_names = OrderedDict([
|
unit_column_names = OrderedDict([
|
||||||
('service_id', 'Service ID'),
|
('service_id', 'Service ID'),
|
||||||
('service_name', 'Service Name'),
|
('service_name', 'Service Name'),
|
||||||
('emails_sent', 'Emails sent'),
|
('emails_sent', 'Emails sent'),
|
||||||
('sms_remainder', 'Free text message allowance remaining'),
|
('sms_remainder', 'Free text message allowance remaining'),
|
||||||
|
])
|
||||||
|
|
||||||
|
monetary_column_names = OrderedDict([
|
||||||
('sms_cost', 'Spent on text messages (£)'),
|
('sms_cost', 'Spent on text messages (£)'),
|
||||||
('letter_cost', 'Spent on letters (£)')
|
('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()]]
|
org_usage_data = [[x for x in column_names.values()]]
|
||||||
|
|
||||||
for service in services_usage:
|
for service in services_usage:
|
||||||
|
|||||||
Reference in New Issue
Block a user