{% macro item(e) %}
{{ e.short_id }} {% for a in e.assets %}{{ a.moved.text }} {% endfor %}moved {{ e.time }}
{% for a in e.assets %}
{{ a.code }} {% if not a.balanced %}unbalanced{% endif %}
Debit
{% for l in a.debits %}{{ self::line(l=l) }}{% endfor %} {% if not a.debits %}
nothing consumed
{% endif %}
Σ {{ a.debit_total.text }}
Credit
{% for l in a.credits %}{{ self::line(l=l) }}{% endfor %} {% if not a.credits %}
nothing created
{% endif %}
Σ {{ a.credit_total.text }}
{% endfor %}
{% endmacro item %} {% macro line(l) %}
{{ l.account.name }} {{ l.money.text }} {{ l.note }}{% if l.payer %} {{ l.payer.name }}{% endif %}
{% endmacro line %}