{% extends "base.html" %} {% from "_macros.html" import list_filters, branch_tag, order_badge, progress_badge with context %} {% block title %}{{ t(info.title) }}{% endblock %} {% block content %}

{{ t(info.title) }}

{% if can_write %}
+ {{ t('New ' ~ info.draft) }}
{% endif %}
{% set todo_label = 'To deliver' if kind == 'sale' else 'To receive' %} {% for code, lbl in [('', 'All'), ('deliver', todo_label), ('invoice', 'To invoice')] %} {{ t(lbl) }} {% endfor %}
{% set hidden %}{% if todo %}{% endif %}{% endset %} {{ list_filters(f, ['draft', 'confirmed', 'cancelled'], hidden) }}
{% for o in rows %} {% set cur = branches[o.branch_id].currency if o.branch_id in branches else none %} {% else %}{% endfor %}
{{ t('Number') }}{{ t('Customer') if kind == 'sale' else t('Vendor') }}{{ t('Branch') }} {{ t('Date') }}{{ t('Total') }}{{ t('Status') }} {{ t('Delivery') if kind == 'sale' else t('Receipt') }}{{ t('Invoicing') }}
{{ o.number }}{% if o.ref %}
{{ o.ref }}{% endif %}
{{ nm({'name_en': o.pname_en, 'name_ar': o.pname_ar}) }}{{ branch_tag(branches, o.branch_id) }} {{ o.date }}{{ o.amount_total|money(cur) }} {{ cur }} {{ order_badge(o.state, kind) }}{{ progress_badge(o.deliv) }}{{ progress_badge(o.inv) }}
{{ t('Nothing yet.') }}
{% endblock %}