{% extends "base.html" %} {% block title %}{{ reg.number }}{% endblock %} {% block content %} {% set r = reg %}
{{ t('Supplier registrations') }}

{{ reg.company_en }} {% include "vendors/_reg_badge.html" %}

{{ reg.number }} · {{ t('Submitted') }} {{ (reg.submitted_at or '')[:16].replace('T', ' ') }}{% if reg.company_ar %} · {{ reg.company_ar }}{% endif %}
{% if reg.partner_id %}{{ t('Open vendor') }}{% endif %}
{% if dups %}
{{ icon('alert') }}{{ t('Possible duplicate') }}: {% for d in dups %}{{ d.name }} ({{ t('same') }} {{ d.field }}){{ ', ' if not loop.last }}{% endfor %}
{% endif %} {% if missing %}
{{ icon('alert') }}{{ t('Missing documents') }}: {% for m in missing %}{{ t(m) }}{{ ', ' if not loop.last }}{% endfor %}
{% endif %} {% if reg.state == 'info_requested' %}
{{ icon('mail') }}{{ t('Information requested') }}: {{ reg.info_message }}
{% endif %} {% if reg.state == 'rejected' %}
{{ icon('alert') }}{{ t('Rejected') }}: {{ reg.reject_reason }}
{% endif %}

{{ t('Company') }}

{{ t('Commercial registration no.') }}
{{ reg.cr_no or '—' }}
{{ t('VAT registration no.') }}
{{ reg.vat_no or '—' }}
{{ t('Category') }}
{{ reg.category or '—' }}
{{ t('Website') }}
{{ reg.website or '—' }}
{{ t('Address') }}
{{ ', '.join([reg.address or '', reg.city or '', reg.country or '']|select) or '—' }}

{{ t('Contact') }}

{{ t('Contact person') }}
{{ reg.contact_person or '—' }}
{{ t('Email') }}
{{ reg.email }}
{{ t('Phone') }}
{{ reg.phone or '—' }}

{{ t('Bank account') }}

{{ t('Bank name') }}
{{ reg.bank_name or '—' }}
{{ t('Account name') }}
{{ reg.account_name or '—' }}{% if reg.account_name and reg.account_name|lower != reg.company_en|lower %} {{ t('differs from the company name') }}{% endif %}
IBAN
{{ reg.iban or '—' }}
SWIFT
{{ reg.swift or '—' }}

{{ t('Check the IBAN and account name against the bank letter before approving.') }}

{% if reg.notes %}

{{ t('Notes from the supplier') }}

{{ reg.notes }}
{% endif %}

{{ t('Documents') }}

{% for d in docs %} {% else %}{% endfor %}
{{ icon('file') }} {{ t(d.doc_type) }}
{{ d.original_name }}{% if d.number %} · {{ d.number }}{% endif %}{% if d.expiry_date %} · {{ t('expires') }} {{ d.expiry_date }}{% endif %}
{{ t('Nothing yet.') }}
{% set a = approval_status('vendor_registration', reg.id) %} {% if a and a.req.state == 'pending' %}
{{ t('Approval') }}: {{ t('Step') }} {{ a.req.current_step }} — {% for st in a.steps if st.state == 'current' %}{{ st.step.name }}: {% for tk in st.tasks %}{{ tk.full_name or tk.username }} {% endfor %}{% endfor %}
{% endif %} {% if can_write and reg.state == 'submitted' %}

{{ t('Approve') }}

{{ t('Creates the vendor (approved) with its documents and bank details, and emails an activation link for the supplier portal.') }}

{% if a and a.can_override %}
{% endif %}

{{ t('Ask for more information') }}

{{ t('Reject') }}

{% endif %} {% endblock %}