{% extends "base.html" %} {% from "_macros.html" import report_filters with context %} {% block title %}{{ t(title) }}{% endblock %} {% block content %}

{{ t(title) }}{% if pa %} — {{ nm(pa) }}{% endif %}

{{ t('Receivable and payable movements per partner, from posted entries.') }}
{% if pa %}
{{ t('All partners') }} {{ t('Statement') }}
{% endif %}
{% set extra %} {% endset %} {{ report_filters(f, False, extra) }} {% if not pa %}
{% for r in summary %} {% else %}{% endfor %} {% if summary %}{% for cur in curs %}{% set sub = summary|selectattr('currency', 'equalto', cur)|list %} {% endfor %}{% endif %}
{{ t('Partner') }}{{ t('Currency') }}{{ t('Opening balance') }}{{ t('Debit') }}{{ t('Credit') }}{{ t('Closing balance') }}
{{ nm(r) }}{{ r.currency }}{{ r.opening|money(r.currency) }}{{ r.debit|money(r.currency, True) }} {{ r.credit|money(r.currency, True) }}{{ r.closing|money(r.currency) }}
{{ t('Nothing yet.') }}
{{ t('Total') }}{{ cur }}{{ sub|sum(attribute='opening')|money(cur) }}{{ sub|sum(attribute='debit')|money(cur) }} {{ sub|sum(attribute='credit')|money(cur) }}{{ sub|sum(attribute='closing')|money(cur) }}
{{ t('Debit balance = the partner owes us; credit balance = we owe the partner. Click a partner for every entry.') }}
{% else %}
{% for g in detail %}{% set cur = g.currency %} {% for r in g.rows %}{% endfor %} {% else %}{% endfor %}
{{ t('Date') }}{{ t('Entry') }}{{ t('Branch') }}{{ t('Label') }}{{ t('Debit') }}{{ t('Credit') }}{{ t('Balance') }}
{{ cur }}{{ g.debit|money(cur) }}{{ g.credit|money(cur) }}{{ g.closing|money(cur) }}
{{ t('Opening balance') }}{{ g.opening|money(cur) }}
{{ r.date }}{{ r.move_name or '' }}{{ r.bcode }} {{ r.label or r.ref or '' }}{{ r.debit|money(cur, True) }}{{ r.credit|money(cur, True) }}{{ r.balance|money(cur) }}
{{ t('Closing balance') }}{{ g.closing|money(cur) }}
{{ t('Nothing yet.') }}
{% endif %} {% endblock %}