{% load i18n %}
{# Hidden input to hold the year value #} {# Tabs for Categories/Tags/Entities #}
{% if data.items %}
{# Year dropdown - left aligned #} {% if data.available_years %}
{% endif %}
{% for month in data.months %} {% endfor %} {% for item_id, item in data.items.items %} {# Total column for this item #} {# Month columns #} {% for month in data.months %} {% endfor %} {% endfor %} {# Grand total #} {# Month totals #} {% for month in data.months %} {% endfor %}
{% if group_by == "categories" %} {% trans 'Category' %} {% elif group_by == "tags" %} {% trans 'Tag' %} {% else %} {% trans 'Entity' %} {% endif %} {% trans 'Total' %} {% if month == 1 %}{% trans 'Jan' %} {% elif month == 2 %}{% trans 'Feb' %} {% elif month == 3 %}{% trans 'Mar' %} {% elif month == 4 %}{% trans 'Apr' %} {% elif month == 5 %}{% trans 'May' %} {% elif month == 6 %}{% trans 'Jun' %} {% elif month == 7 %}{% trans 'Jul' %} {% elif month == 8 %}{% trans 'Aug' %} {% elif month == 9 %}{% trans 'Sep' %} {% elif month == 10 %}{% trans 'Oct' %} {% elif month == 11 %}{% trans 'Nov' %} {% elif month == 12 %}{% trans 'Dec' %} {% endif %}
{% 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 month_data=item.month_totals %} {% for m, m_data in month_data.items %} {% if m == month %} {% for currency_id, currency_data in m_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 month_total=data.month_totals %} {% for m, m_data in month_total.items %} {% if m == month %} {% for currency_id, currency_data in m_data.currencies.items %} {% if currency_data.exchanged %}
{% endif %} {% empty %} - {% endfor %} {% endif %} {% empty %} - {% endfor %} {% endwith %}
{% else %} {% endif %}