{% extends "base.html" %} {% from "_macros.html" import report_filters with context %} {% set title = 'Aged Receivables' if side == 'receivable' else 'Aged Payables' %} {% block title %}{{ t(title) }}{% endblock %} {% block content %} {% set cur = currency %}

{{ t(title) }}

{% set extra %}{% endset %} {{ report_filters(f, True, extra) }}
{{ t('As of') }} {{ f.date_to }}{{ t('Amounts in') }} {{ cur }}
{% for k, lbl in buckets %}{% endfor %} {% for p in rows %} {% for k, lbl in buckets %}{% endfor %} {% for d in p.invoices %} {% for k, lbl in buckets %}{% endfor %} {% endfor %} {% else %}{% endfor %} {% for k, lbl in buckets %}{% endfor %}
{{ t('Partner') }}{{ t(lbl) }}{{ t('Total') }}
{{ p.name }}{{ p[k]|money(cur, true) }}{{ p.total|money(cur) }}
{{ d.inv.number }} {{ t('Due') }} {{ d.inv.due_date }}{{ d.amount|money(cur) if d.bucket == k else '' }}{{ d.amount|money(cur) }}
{{ t('Nothing open.') }}
{{ t('Total') }}{{ totals[k]|money(cur) }}{{ totals.total|money(cur) }}
{{ t('Buckets are days past the due date.') }}
{% endblock %}