{% 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/_charts.html" as charts with context %} {% block title %}Account {{ account_name }}{% endblock %} {% block content %} {{ account_macros.account_name_header(account_name) }} {% include "charts/_chart_skeleton.html" %} {% with linechart_data=api.linechart_data(account_name) %} {% include "charts/_chart_account_balance.html" %} {% endwith %} {% with label="Changes", interval_totals=api.interval_totals(interval, account_name) %} {% include "charts/_chart_interval_totals.html" %} {% endwith %} {% if not journal %} {{ charts.treemap(account_name) }} {% endif %}

{% if not journal %}Journal{% else %}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) %} {% for begin_date, end_date in dates[-3:]|reverse %} {{ charts.treemap(account_name, begin_date, end_date, label=interval_macros.format_date(end_date)) }} {% endfor %} {% for begin_date, _ in dates|reverse %} {% endfor %} {% for row in interval_balances %} {% with account_level = row[0].account|account_level %} {% for entry in row|reverse %} {% endfor %} {% endwith %} {% endfor %} {% for entry in interval_balances[0]|reverse %} {% endfor %}
Account Expand all{{ interval_macros.format_date(begin_date) }}
{% if entry.balance %} {% for currency, number in entry.balance.items() %} {{ number|format_currency(currency) }} {{ currency }}
{% endfor %}
{% endif %} {% if entry.balance_children %} {% for currency, number in entry.balance_children.items() %} {{ number|format_currency(currency) }} {{ currency }}
{% endfor %}
{% endif %}
  {% for currency, number in entry.balance_children.items() %} {% if number %} {{ number|format_currency(currency) }} {{ currency }}
{% endif %} {% endfor %}
{% endif %} {% endblock %}