{% extends "base.html" %} {% import "_bank.html" as bank with context %} {% block title %}{{ statement.statement_id }} — painfree{% endblock %} {% block body %} {# A `pain.002` read against the payment it answers. The rows below are the *message's*, not the report's. A bank reports by exception, so the report for a file it took whole names no transaction at all and rendering what it carries would leave this page empty in the ordinary case. The three status levels stay three. Every answer says which level it was read at, because a status inherited from the file is not the bank having spoken about that payment, and a page that let those look alike would be telling an operator something the document does not say. #} {% set known = status_codes.get(outcome.status or '') %} {# One chip per status, tinted by what this service does with the code rather than by the code itself: `PART` and `ACSP` are both acknowledgements and a reader should not have to know the vocabulary to see that. #} {% macro verdict(status) %} {% set code = status_codes.get(status or '') %} {{ status }} {%- endmacro %}
{% if order %}{{ t('statements.reports_on') }}
{{ order.order_id }}.
{% elif statement.order_id %}{{ t('statements.reports_on') }}
{{ statement.order_id }}.
{% endif %}
{{ statement.message_type }}. {{ t('response.received') }} {{ statement.ingested_at | moment }}.
{{ outcome.status }} {{ known.name }}:
{{ t.maybe('status_code.' ~ known.code, known.meaning) }}.
{{ t('response.not_settled') }}
{% elif known.disposition == 'partial' %}{{ t('response.part_note') }}
{% elif known.disposition == 'undecided' %}{{ t('response.undecided_note') }}
{% endif %} {% elif outcome.status %}{{ outcome.status }} {{ t('response.unknown_note') }}
{{ t('order.status_code_page') }}.
{{ t('response.silent_note') }}
{% endif %}{{ t('response.unmatched_heading') }}
{{ t('statement.no_order') }}
{{ statement.identification or '—' }}.
{{ t('response.unmatched_body') }}
GrpStsPmtInfSts{{ block.payment_information_id }}{% endif %}
{% else %}
{{ t('response.not_reported') }}
{% endfor %}
TxSts{{ t('response.we_sent') }} pain.001 |
{{ t('response.bank_said') }} {{ statement.message_type }} |
|||
|---|---|---|---|---|
| {{ t('order.creditor') }} | {{ t('order.amount') }} | {{ t('order.requested_execution') }} | {{ t('order.status') }} | {{ t('order.reason') }} |
{{ transfer.creditor.name or '—' }}
{% if transfer.creditor.iban %}{{ transfer.creditor.iban }}{% endif %}
{% if transfer.remittance %}{{ transfer.remittance }}{% endif %} {% if transfer.reference %} {{ transfer.reference_type }} {{ transfer.reference }}{% endif %} |
{{ transfer.amount | amount(transfer.currency) }}
{% if transfer.end_to_end_id %}{{ transfer.end_to_end_id }}{% endif %} |
{{ payment.execution_date | day }} | {% set code = answer.code %} {% if answer.status %} {{ verdict(answer.status) }} {%- if answer.inherited %}{{ code.name if code else t('response.unknown_status') }}, {% if answer.level == 'payment' %}{{ t('response.from_payment') }}{% else %}{{ t('response.from_group') }}{% endif %} {%- else %}{{ code.name if code else t('response.unknown_status') }}{% endif %} {% if answer.accepted_at %}{{ t('response.accepted_at') }} {{ answer.accepted_at }}{% endif %} {% else %}{{ t('response.unanswered') }}{% endif %} |
{% for reason in answer.reasons %}
{% if reason.get('code') or reason.get('proprietary') %}
{% if reason.get('originator') %}{{ reason.get('originator') }}{% endif %}
{% else %}—{% endfor %}
{{ reason.get('code') or reason.get('proprietary') }}{% endif %}
{{ bank.quiet((reason.get('additional_information') or []) | join(' ')) }} |
| {{ t('response.sent') }} | {{ total.count | count }} · {{ total.sent | amount(total.currency) }}
{% if total.refused_count %}
{{ t('order.rejected_count') }} {{ total.refused_count | count }} · {{ total.refused | amount(total.currency) }} {% endif %} |
{% if original.get('transactions') or original.get('control_sum') %} {% if original.get('transactions') and original.get('transactions') | int == sent_count %}{{ t('response.restated_matches') }} {% else %}{{ t('response.restated_differs') }}{% endif %} {% else %}{{ t('response.not_restated') }}{% endif %}
{{ t('bank.note') }}
{%- if sees_payment %}{{ t('response.no_transfers') }} {%- else %}{{ t('response.needs_payments_read') }}{% endif %}
{{ t('response.unsent_heading') }} {{ t('response.unsent_body') }}
{% for reference in unsent %}{{ reference }} {% endfor %}
| {{ t('common.connection') }} | {{ statement.connection_id }} |
| {{ t('statement.identification') }} | {{ statement.identification or '—' }} |
| {{ t('order.reported_at') }} | {{ statement.created_at | moment }} |
| {{ t('statement.download_run') }} | {{ statement.run_id or '—' }} |
| {{ t('statement.content_hash') }} | {{ statement.content_hash }} |
{{ statement.payload | pretty_json }}