{% extends "base.html" %} {% from "_macros.html" import state_badge, list_filters, branch_tag with context %} {% set title = {'customer': 'Customer Payments', 'vendor': 'Vendor Payments'}.get(ptype, 'Payments') %} {% block title %}{{ t(title) }}{% endblock %} {% block content %}

{{ t(title) }}

{% if can_write %}
+ {{ t('New Payment') }}
{% endif %}
{% set hidden %}{% if ptype %}{% endif %}{% endset %} {{ list_filters(f, ['posted', 'cancelled'], hidden) }}
{% for p in rows %} {% set cur = p.currency or (branches[p.branch_id].currency if p.branch_id in branches else none) %} {% else %}{% endfor %}
{{ t('Number') }}{{ t('Date') }}{{ t('Partner') }}{{ t('Branch') }}{{ t('Journal') }} {{ t('Type') }}{{ t('Document') }}{{ t('Amount') }}{{ t('Status') }}
{{ p.name }}{{ p.date }}{{ nm({'name_en': p.pname_en, 'name_ar': p.pname_ar}) }} {{ branch_tag(branches, p.branch_id) }}{{ p.jcode }} {{ t('Received') if p.payment_type == 'inbound' else t('Paid') }}{{ p.inv_number or '' }} {{ p.amount|money(cur) }} {{ cur }}{{ state_badge(p.state) }}
{{ t('Nothing yet.') }}
{% endblock %}