{% load i18n %}
| {% if group_by == "categories" %} {% trans 'Category' %} {% elif group_by == "tags" %} {% trans 'Tag' %} {% else %} {% trans 'Entity' %} {% endif %} | {% trans 'Total' %} | {% for year in data.years %}{{ year }} | {% endfor %}
|---|---|---|
| {% if item.name %} {{ item.name }} {% else %} {% if group_by == "categories" %} {% trans 'Uncategorized' %} {% elif group_by == "tags" %} {% trans 'Untagged' %} {% else %} {% trans 'No entity' %} {% endif %} {% endif %} | {# Total column for this item #}
{% for currency_id, currency_data in item.total.currencies.items %}
|
{# Year columns #}
{% for year in data.years %}
{% with year_data=item.year_totals %}
{% for y, y_data in year_data.items %}
{% if y == year %}
{% for currency_id, currency_data in y_data.currencies.items %}
|
{% endfor %}
| {% trans 'Total' %} | {# Grand total #}
{% for currency_id, currency_data in data.grand_total.currencies.items %}
|
{# Year totals #}
{% for year in data.years %}
{% with year_total=data.year_totals %}
{% for y, y_data in year_total.items %}
{% if y == year %}
{% for currency_id, currency_data in y_data.currencies.items %}
|
{% endfor %}