diff --git a/app/main/forms.py b/app/main/forms.py index fd0e85f50..df00bcd9b 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1962,6 +1962,11 @@ class RequiredDateFilterForm(StripWhitespaceForm): end_date = GovukDateField("End Date") +class BillingReportDateFilterForm(StripWhitespaceForm): + start_date = GovukDateField("First day covered by report") + end_date = GovukDateField("Last day covered by report") + + class SearchByNameForm(StripWhitespaceForm): search = GovukSearchField( diff --git a/app/main/views/platform_admin.py b/app/main/views/platform_admin.py index 22731c58a..37d97e9e2 100644 --- a/app/main/views/platform_admin.py +++ b/app/main/views/platform_admin.py @@ -18,6 +18,7 @@ from app import ( from app.extensions import redis_client from app.main import main from app.main.forms import ( + BillingReportDateFilterForm, ClearCacheForm, DateFilterForm, RequiredDateFilterForm, @@ -272,7 +273,7 @@ def notifications_sent_by_service(): @main.route("/platform-admin/reports/usage-for-all-services", methods=['GET', 'POST']) @user_is_platform_admin def get_billing_report(): - form = RequiredDateFilterForm() + form = BillingReportDateFilterForm() if form.validate_on_submit(): start_date = form.start_date.data diff --git a/app/templates/views/platform-admin/get-billing-report.html b/app/templates/views/platform-admin/get-billing-report.html index 0a07f1aee..8e77016d1 100644 --- a/app/templates/views/platform-admin/get-billing-report.html +++ b/app/templates/views/platform-admin/get-billing-report.html @@ -13,8 +13,8 @@ {% call form_wrapper() %} - {{ form.start_date(param_extensions={"hint": {"text": "Enter start date in format YYYY-MM-DD"}}) }} - {{ form.end_date(param_extensions={"hint": {"text": "Enter end date in format YYYY-MM-DD"}}) }} + {{ form.start_date(param_extensions={"hint": {"text": "Use the format YYYY-MM-DD"}}) }} + {{ form.end_date(param_extensions={"hint": {"text": "Use the format YYYY-MM-DD"}}) }} {{ page_footer('Download report') }} {% endcall %} @@ -32,7 +32,7 @@ ('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.'), + ('letter breakdown', 'The number of letters sent by a service, grouped by postage and unit cost.'), ('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() %}