{% for begin_date, end_date in dates %} {% if accumulate %} {% set time_filter = dates[-1][0]|format_date_filter + ' - ' + begin_date|format_date_filter %} {% else %} {% set time_filter = begin_date|format_date_filter %} {% endif %} {{ begin_date|format_date }} {% endfor %}
{% if account|length %}{% endif %} {{ account_macros.account_name(ledger, account.account, last_segment=True) }} {% for begin_date, end_date in dates %} {% if accumulate %}{% set begin_date = dates[-1][0] %}{% endif %} {% set budget = ledger.budgets.calculate(account.account, begin_date, end_date) %} {% set budget_children = ledger.budgets.calculate_children(account.account, begin_date, end_date) %} {% set current_account = interval_balances[loop.index0]|get_or_create(account.account) %} {% set balance = current_account.balance|cost_or_value(end_date) %} {% set balance_children = current_account|balance_children|cost_or_value(end_date) %} {% for pos in balance %} {{ render_budget(budget, pos.units.currency, pos.units.number) }} {{ commodity_macros.render_amount(ledger, pos.units, 'number') }} {% endfor %} {% for currency, number in budget.items() if currency not in balance.currencies() %} {{ render_budget(budget, currency) }} {% endfor %} {% for pos in balance_children %} {{ render_budget(budget_children, pos.units.currency, pos.units.number) }} {{ commodity_macros.render_amount(ledger, pos.units, 'number') }} {% endfor %} {% for currency, number in budget_children.items() if currency not in balance_children.currencies() %} {{ render_budget(budget_children, currency) }} {% endfor %} {% endfor %}