{% extends "base.html" %} {% from "_macros.html" import approval_panel with context %} {% block title %}{{ t('Bank details change') }}{% endblock %} {% block content %}
{{ t('Bank detail changes') }}

{{ nm(c) }} {{ t({'pending': 'Waiting for approval', 'approved': 'Approved', 'rejected': 'Rejected'}.get(c.state, c.state)) }}

{{ t('Requested') }} {{ c.created_at[:16].replace('T', ' ') }} · {{ (t('by the vendor on the portal') ~ ' (' ~ c.portal_email ~ ')') if c.portal_user_id else c.requester }}
{{ t('Open vendor') }} {% if c.filename %}{{ icon('file') }}{{ t('Bank letter') }}{% endif %}
{{ icon('shield') }}{{ t('Call the vendor on a number you already have (not one in the request) to confirm the new account before approving. Changed bank details are a common fraud.') }}
{% for lbl, a, b in (('Bank name', c.old_bank_name, c.bank_name), ('Account name', c.old_account_name, c.account_name), ('IBAN', c.old_iban, c.iban), ('SWIFT', c.old_swift, c.swift)) %} {% endfor %}
{{ t('Current') }}{{ t('New') }}
{{ t(lbl) }}{{ a or '—' }}{{ b or '—' }}{% if a != b %} {{ t('changed') }}{% endif %}
{{ approval_panel('bank_change', c.id, url_for('vendors.bank_change', cid=c.id, do='approve'), url_for('vendors.bank_change', cid=c.id, do='reject')) }} {% set a = approval_status('bank_change', c.id) %} {% if can_write and c.state == 'pending' and not a %}

{{ t('Decision') }}

{% endif %} {% if c.reason %}
{{ t('Comment') }}: {{ c.reason }}
{% endif %} {% endblock %}