mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-13 09:50:08 -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
|
||||
)['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:
|
||||
|
||||
Reference in New Issue
Block a user