Files
notifications-admin/app/templates/views/dashboard/_usage.html
Ben Thorner e0aa51c306 Use new "cost" field in usage APIs
The previous, manual calculation could be incorrect depending on
which SMS rates the free allowance was attributed to.

The new field also supersedes the old "letter_total" bolt-on so we
can get cost information consistently for both types.
2022-04-27 17:06:12 +01:00

34 lines
893 B
HTML

{% from "components/big-number.html" import big_number %}
<div class='govuk-grid-row ajax-block-container'>
<div class='govuk-grid-column-one-third'>
<div class="keyline-block">
{{ big_number("Unlimited", 'free email allowance', smaller=True) }}
</div>
</div>
<div class='govuk-grid-column-one-third'>
<div class="keyline-block">
{% if sms_cost %}
{{ big_number(
sms_cost,
'spent on text messages',
currency="£",
smaller=True
) }}
{% else %}
{{ big_number(sms_allowance_remaining, 'free text messages left', smaller=True) }}
{% endif %}
</div>
</div>
<div class='govuk-grid-column-one-third'>
<div class="keyline-block">
{{ big_number(
letter_cost,
'spent on letters',
currency="£",
smaller=True
) }}
</div>
</div>
</div>