Text message parts
You have sent
{{ big_number(sms_sent, 'text message parts of your', smaller=True) }}
{{ big_number(sms_free_allowance, 'free message parts allowance.', smaller=True) }}
You have
{% if sms_free_allowance > 0 %}
{{ big_number(sms_allowance_remaining, 'message parts remaining.', smaller=True) }}
{% endif %}
{# {% for row in sms_breakdown %}
{% if row.charged_units > 0 %}
{{ big_number(
row.charged_units,
'at {:.2f} pence per message'.format(row.rate * 100),
smaller=True
) }}
{% endif %}
{% endfor %} #}
{#
Emails
{{ big_number(emails_sent, 'email disabled during SMS pilot', smaller=True) }}
{{ big_number("", '', smaller=True) }}
#}
{% call(item, row_index) list_table(
months,
caption="Total spend",
caption_visible=False,
empty_message='',
field_headings=[
'By month',
'Text message parts',
'Total message allowance',
],
field_headings_visible=True
) %}
{% call row_heading() %}
{{ item.month }}
{% endcall %}
{% for counts, template_type in [
(item.sms_counts.0, 'parts'),
] %}
{% call field(align='left') %}
{{ big_number(
counts.requested,
counts.requested|message_count_label(template_type, suffix=''),
smallest=True,
) }}
{% if counts.requested %}
{{ "{:,}".format(counts.failed) }} failed
{% else %}
–
{% endif %}
{% endcall %}
{% endfor %}
{% call field(align='left') %}
{% if item.sms_free_allowance_used %}
- {{ item.sms_free_allowance_used|format_thousands }} total {{ item.sms_free_count|message_count_label('parts', suffix='') }}
{% endif %}
{% for sms in item.sms_breakdown %}
- {{ sms.charged_units|message_count('sms') }} at
{{- ' {:.2f}p'.format(sms.rate * 100) }}
{% endfor %}
{% if not (item.sms_free_allowance_used or item.sms_cost) %}
- –
{% endif %}
{% endcall %}
{% endcall %}