From 067b4b3742b0e5df24cba2becf2a2654777e1cc6 Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Wed, 12 Oct 2022 20:16:22 +0000 Subject: [PATCH] swap dollar symbols for pound symbols --- app/formatters.py | 1 + app/main/views/organisations.py | 4 ++-- app/templates/views/dashboard/_usage.html | 4 ++-- .../organisations/organisation/index.html | 8 ++++---- app/templates/views/usage.html | 6 +++--- .../views/organisations/test_organisations.py | 18 +++++++++--------- tests/app/main/views/test_dashboard.py | 14 +++++++------- 7 files changed, 28 insertions(+), 27 deletions(-) diff --git a/app/formatters.py b/app/formatters.py index fad4e542c..21c26e3d7 100644 --- a/app/formatters.py +++ b/app/formatters.py @@ -300,6 +300,7 @@ def nl2br(value): return '' +# this formatter appears to only be used in the letter module def format_number_in_pounds_as_currency(number): if number >= 1: return f"£{number:,.2f}" diff --git a/app/main/views/organisations.py b/app/main/views/organisations.py index 13b8a21ae..df009dddd 100644 --- a/app/main/views/organisations.py +++ b/app/main/views/organisations.py @@ -182,8 +182,8 @@ def download_organisation_usage_report(org_id): ]) monetary_column_names = OrderedDict([ - ('sms_cost', 'Spent on text messages (£)'), - ('letter_cost', 'Spent on letters (£)') + ('sms_cost', 'Spent on text messages ($)'), + ('letter_cost', 'Spent on letters ($)') ]) org_usage_data = [ diff --git a/app/templates/views/dashboard/_usage.html b/app/templates/views/dashboard/_usage.html index 4046e6c91..84a5af39b 100644 --- a/app/templates/views/dashboard/_usage.html +++ b/app/templates/views/dashboard/_usage.html @@ -12,7 +12,7 @@ {{ big_number( sms_cost, 'spent on text messages', - currency="£", + currency="$", smaller=True ) }} {% else %} @@ -25,7 +25,7 @@ {{ big_number( letter_cost, 'spent on letters', - currency="£", + currency="$", smaller=True ) }} diff --git a/app/templates/views/organisations/organisation/index.html b/app/templates/views/organisations/organisation/index.html index 7b9d89c9f..b10efba95 100644 --- a/app/templates/views/organisations/organisation/index.html +++ b/app/templates/views/organisations/organisation/index.html @@ -33,7 +33,7 @@ {{ big_number( total_sms_cost, 'spent', - currency="£", + currency="$", smaller=True ) }} @@ -44,7 +44,7 @@ {{ big_number( total_letter_cost, 'spent', - currency="£", + currency="$", smaller=True ) }} @@ -82,7 +82,7 @@ {{ big_number( service.sms_cost, 'spent on text messages', - currency="£", + currency="$", smallest=True ) }} {% else %} @@ -97,7 +97,7 @@ {{ big_number( service.letter_cost, 'spent on letters', - currency="£", + currency="$", smallest=True ) }} diff --git a/app/templates/views/usage.html b/app/templates/views/usage.html index 4bd7f6c77..87bf2cf1e 100644 --- a/app/templates/views/usage.html +++ b/app/templates/views/usage.html @@ -63,7 +63,7 @@ {{ big_number( sms_cost, 'spent', - currency="£", + currency="$", smaller=True ) }} @@ -73,7 +73,7 @@ {{ big_number( letter_cost, 'spent', - currency="£", + currency="$", smaller=True ) }} @@ -100,7 +100,7 @@ {% call field(align='left') %} {{ big_number( item.sms_cost + item.letter_cost, - currency="£", + currency="$", smallest=True ) }}