{% load i18n %}
{% if view_type == 'table' %}
{% endif %}
{% if total_table %} {% if view_type == "table" %}
{% for category in total_table.values %} {# Category row #} {% if show_tags %} {% for tag_id, tag in category.tags.items %} {% if tag.name or not tag.name and category.tags.values|length > 1 %} {# Entity rows #} {% if show_entities %} {% for entity_id, entity in tag.entities.items %} {% if entity.name or not entity.name and tag.entities.values|length > 1 %} {% endif %} {% endfor %} {% endif %} {% endif %} {% endfor %} {% endif %} {% endfor %}
{% trans 'Category' %} {% trans 'Income' %} {% trans 'Expense' %} {% trans 'Total' %}
{% if category.name %}{{ category.name }}{% else %}{% trans 'Uncategorized' %}{% endif %} {% for currency in category.currencies.values %} {% if showing == 'current' and currency.income_current != 0 %} {% elif showing == 'projected' and currency.income_projected != 0 %} {% elif showing == 'final' and currency.total_income != 0 %} {% else %}
-
{% endif %} {% endfor %}
{% for currency in category.currencies.values %} {% if showing == 'current' and currency.expense_current != 0 %} {% elif showing == 'projected' and currency.expense_projected != 0 %} {% elif showing == 'final' and currency.total_expense != 0 %} {% else %}
-
{% endif %} {% endfor %}
{% for currency in category.currencies.values %} {% if showing == 'current' and currency.total_current != 0 %} {% elif showing == 'projected' and currency.total_projected != 0 %} {% elif showing == 'final' and currency.total_final != 0 %} {% else %}
-
{% endif %} {% endfor %}
{% if tag.name %}{{ tag.name }}{% else %}{% trans 'Untagged' %}{% endif %} {% for currency in tag.currencies.values %} {% if showing == 'current' and currency.income_current != 0 %} {% elif showing == 'projected' and currency.income_projected != 0 %} {% elif showing == 'final' and currency.total_income != 0 %} {% else %}
-
{% endif %} {% endfor %}
{% for currency in tag.currencies.values %} {% if showing == 'current' and currency.expense_current != 0 %} {% elif showing == 'projected' and currency.expense_projected != 0 %} {% elif showing == 'final' and currency.total_expense != 0 %} {% else %}
-
{% endif %} {% endfor %}
{% for currency in tag.currencies.values %} {% if showing == 'current' and currency.total_current != 0 %} {% elif showing == 'projected' and currency.total_projected != 0 %} {% elif showing == 'final' and currency.total_final != 0 %} {% else %}
-
{% endif %} {% endfor %}
{% if entity.name %}{{ entity.name }}{% else %}{% trans 'No entity' %}{% endif %} {% for currency in entity.currencies.values %} {% if showing == 'current' and currency.income_current != 0 %} {% elif showing == 'projected' and currency.income_projected != 0 %} {% elif showing == 'final' and currency.total_income != 0 %} {% else %}
-
{% endif %} {% endfor %}
{% for currency in entity.currencies.values %} {% if showing == 'current' and currency.expense_current != 0 %} {% elif showing == 'projected' and currency.expense_projected != 0 %} {% elif showing == 'final' and currency.total_expense != 0 %} {% else %}
-
{% endif %} {% endfor %}
{% for currency in entity.currencies.values %} {% if showing == 'current' and currency.total_current != 0 %} {% elif showing == 'projected' and currency.total_projected != 0 %} {% elif showing == 'final' and currency.total_final != 0 %} {% else %}
-
{% endif %} {% endfor %}
{% elif view_type == "bars" %}
{{ total_table|json_script:"categoryOverviewData" }} {{ showing|json_script:"showingString" }} {% endif %} {% else %} {% endif %}