diff --git a/app/main/views/platform_admin.py b/app/main/views/platform_admin.py
index db5ec765f..22731c58a 100644
--- a/app/main/views/platform_admin.py
+++ b/app/main/views/platform_admin.py
@@ -294,9 +294,9 @@ def get_billing_report():
rows = [
[
r["organisation_id"], r["organisation_name"], r["service_id"], r["service_name"],
- r["sms_cost"], r["sms_chargeable_units"], r["total_letters"], r["letter_cost"], r["letter_breakdown"].strip(),
- r.get("purchase_order_number"), r.get("contact_names"), r.get("contact_email_addresses"),
- r.get("billing_reference")
+ r["sms_cost"], r["sms_chargeable_units"], r["total_letters"], r["letter_cost"],
+ r["letter_breakdown"].strip(), r.get("purchase_order_number"), r.get("contact_names"),
+ r.get("contact_email_addresses"), r.get("billing_reference")
]
for r in result
]
diff --git a/app/templates/views/platform-admin/get-billing-report.html b/app/templates/views/platform-admin/get-billing-report.html
index d5ecdfcc2..0a07f1aee 100644
--- a/app/templates/views/platform-admin/get-billing-report.html
+++ b/app/templates/views/platform-admin/get-billing-report.html
@@ -1,5 +1,6 @@
{% extends "views/platform-admin/_base_template.html" %}
{% from "components/form.html" import form_wrapper %}
+{% from "components/table.html" import mapping_table, row, text_field %}
{% block per_page_title %}
Billing Report
@@ -18,21 +19,28 @@
{% endcall %}
- Guidance for interpreting the report
+ Data included in the report
-
- Billing report shows data for period between start date and end date, inclusive of both dates.
-
-
- Explanation for more confusing column names in the report:
-
-
- - sms cost - cost accrued by a service through sending text messages after they run out of free allowance
- - sms chargeable units - sms fragments that go over free allowance multiplied by rate multiplier (so higher costs of sending international SMS are taken into consideration)
- - letter cost - cost accrued by a service through sending letters (number of letters * numbers of paper sheets * postage)
- - letter breakdown - amount and cost of letters sent by a service for each postage class
- - purchase order number, contact names, contact email addresses, billing reference - this data is manually filled in by us based on the information we get from services. You can help by filling it in (on Service Settings page)
-
-
+
+ {% call mapping_table(
+ caption='Descriptions of billing report data',
+ field_headings=['Name', 'Description'],
+ field_headings_visible=True,
+ caption_visible=False
+ ) %}
+ {% for message_length, charge in [
+ ('sms cost', 'The total cost of text messages sent after a service has used its free allowance.'),
+ ('sms chargeable units', 'The number of fragments sent after a service has used its free allowance. This number takes into account the cost multiplier for
sending international text messages.'),
+ ('letter cost', 'The total cost of letters sent by a service.'),
+ ('letter breakdown', 'The number and cost of letters sent by a service, grouped by postage.'),
+ ('purchase order number, contact names, contact email addresses and billing reference', 'We add this data manually based on the information we get from services. You can help by adding it to the service settings page.'),
+ ] %}
+ {% call row() %}
+ {{ text_field(message_length) }}
+ {{ text_field(charge | safe) }}
+ {% endcall %}
+ {% endfor %}
+ {% endcall %}
+
{% endblock %}