{% extends "base.html" %} {% from "_macros.html" import doc_export, state_badge, attachments_card with context %} {% block title %}{{ p.name }}{% endblock %} {% block content %} {% set cur = p.currency or (branch.currency if branch else none) %}
{{ t('Customer Payments') if p.partner_type == 'customer' else t('Vendor Payments') }}

{{ p.name }} {{ state_badge(p.state) }}

{{ doc_export() }} {% if p.move_id %}{{ t('Journal Entry') }}{% endif %} {% if p.invoice_id %}{{ p.inv_number }}{% endif %} {% if can_write and p.state == 'posted' %}
{% endif %}
{{ t('Partner') }}
{{ nm({'name_en': p.pname_en, 'name_ar': p.pname_ar}) }}
{{ t('Type') }}
{{ t('Received') if p.payment_type == 'inbound' else t('Paid') }} ยท {{ t('Customer') if p.partner_type == 'customer' else t('Vendor') }}
{{ t('Amount') }}
{{ p.amount|money(cur) }} {{ cur }}{% if p.currency %}
1 {{ p.currency }} = {{ p.rate }} {{ branch.currency }}{% endif %}
{{ t('Date') }}
{{ p.date }}
{{ t('Branch') }}
{{ branch.code }} โ€” {{ nm(branch) }}
{{ t('Journal') }}
{{ p.jcode }} โ€” {{ nm({'name_en': p.jname_en, 'name_ar': p.jname_ar}) }}
{{ t('Reference') }}
{{ p.ref or 'โ€”' }}
{{ attachments_card('payment', p.id) }} {% endblock %}