{% load i18n %}
| {% if group_by == "categories" %} {% trans 'Category' %} {% elif group_by == "tags" %} {% trans 'Tag' %} {% else %} {% trans 'Entity' %} {% endif %} | {% trans 'Total' %} | {% for month in data.months %}{% 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 %} | {% 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 %}
|
{# Month columns #}
{% for month in data.months %}
{% 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 %}
|
{% endfor %}
| {% trans 'Total' %} | {# Grand total #}
{% for currency_id, currency_data in data.grand_total.currencies.items %}
|
{# Month totals #}
{% for month in data.months %}
{% 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 %}
|
{% endfor %}