{% load i18n %}
{% if data.years %}
{% for year in data.years %} {% endfor %} {% for item_id, item in data.items.items %} {# Total column for this item #} {# Year columns #} {% for year in data.years %} {% endfor %} {% endfor %} {# Grand total #} {# Year totals #} {% for year in data.years %} {% endfor %}
{% if group_by == "categories" %} {% trans 'Category' %} {% elif group_by == "tags" %} {% trans 'Tag' %} {% else %} {% trans 'Entity' %} {% endif %} {% trans 'Total' %}{{ year }}
{% if item.name %} {{ item.name }} {% else %} {% if group_by == "categories" %} {% trans 'Uncategorized' %} {% elif group_by == "tags" %} {% trans 'Untagged' %} {% else %} {% trans 'No entity' %} {% endif %} {% endif %} {% for currency_id, currency_data in item.total.currencies.items %} {% if currency_data.exchanged %}
{% endif %} {% empty %} - {% endfor %}
{% 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 %} {% if currency_data.exchanged %}
{% endif %} {% empty %} - {% endfor %} {% endif %} {% empty %} - {% endfor %} {% endwith %}
{% trans 'Total' %} {% for currency_id, currency_data in data.grand_total.currencies.items %} {% if currency_data.exchanged %}
{% endif %} {% empty %} - {% endfor %}
{% 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 %} {% if currency_data.exchanged %}
{% endif %} {% empty %} - {% endfor %} {% endif %} {% empty %} - {% endfor %} {% endwith %}
{% else %} {% endif %}