Add filter for formatting a number as currency

This is used on the usage page, but is likely to become useful in other
places now that letter rates can be greater than £1.
This commit is contained in:
Katie Smith
2020-07-14 14:45:37 +01:00
parent 355e981028
commit 756a17f8db
4 changed files with 30 additions and 10 deletions

View File

@@ -110,7 +110,7 @@
{% for letter in month.letters%}
{% if letter.billing_units %}
<li class="tabular-numbers">{{ "{:,} {}".format(letter.billing_units, letter.postage_description) }} {{ message_count_label(letter.billing_units, 'letter', '') }}at
{{ letter.rate }}</li>
{{ letter.rate | format_number_in_pounds_as_currency }}</li>
{% endif %}
{% endfor %}
{% if not (month.free or month.paid or month.letters) %}