{% extends "_layout.html" %} {% set active_page = 'trial_balance' %} {% import 'macros/_account_macros.html' as account_macros with context %} {% import 'macros/_interval_macros.html' as interval_macros with context %} {% import "_charts.html" as charts with context %} {% set page_title = account_macros.account_name_header(account_name) %} {% set short_title = account_name %} {% block content %}
{{ charts.skeleton() }} {{ charts.account_balance(account_name) }} {{ charts.interval_totals(interval, account_name, label='Changes') }} {% if not journal %} {{ charts.treemap(account_name) }} {{ charts.sunburst(account_name) }} {% endif %}

{% if not journal %}{{ _('Account Journal') }}{% else %}{{ _('Account Journal') }}{% endif %}

{% if not (not journal and not accumulate) %}{{ interval_macros.interval_label }} {{ _('Changes') }}{% else %}{{ interval_macros.interval_label }} {{ _('Changes') }}{% endif %}

{% if not (not journal and accumulate) %}{{ interval_macros.interval_label }} {{ _('Balances') }}{% else %}{{ interval_macros.interval_label }} {{ _('Balances') }}{% endif %}

{% if journal %} {% set journal = api.journal(account_name, with_change_and_balance=True, with_journal_children=config['journal-show-childentries']) %} {% with show_tablefilter=True, show_change_and_balance=True %} {% include "_journal_table.html" %} {% endwith %} {% else %} {% set interval_balances, dates = api.interval_balances(interval, account_name, accumulate) %} {% if interval_balances %} {% for begin_date, end_date in dates[-3:]|reverse %} {{ charts.treemap(account_name, begin_date, end_date, label=interval_macros.format_date(begin_date)) }} {% endfor %}
  1. {% for begin_date, end_date in dates|reverse %} {% if accumulate %} {% set time_filter = dates[0][0]|string + ' - ' + end_date|string %} {% else %} {% set time_filter = begin_date|string + ' - ' + end_date|string %} {% endif %} {{ interval_macros.format_date(begin_date) }} {% endfor %}

  2. {% for account in [interval_balances] recursive %}
  3. {% for balance, balance_children, budget, budget_children in account.balance_and_balance_children|reverse %} {% set begin_date, end_date = dates[::-1][loop.index0] %} {% if accumulate %}{% set begin_date = dates[0][0] %}{% endif %} {% for currency, number in balance.items() %} {{ account_macros.balance_with_budget(currency, number, budget, show_currency=True) }} {% endfor %} {% for currency, number in balance_children.items() %} {{ account_macros.balance_with_budget(currency, number, budget_children, show_currency=True, css_class="balance-children") }} {% endfor %} {% endfor %}

      {{ loop(account.children) }}
  4. {% endfor %}
  5. {% for _, balance_children, _, _ in interval_balances.balance_and_balance_children|reverse %} {% for currency, number in balance_children.items() %} {% if number %} {{ number|format_currency(currency) }} {{ currency }}
    {% endif %} {% endfor %}
    {% endfor %}

{% endif %} {% endif %}
{% endblock %}