{% extends "./layout/default" %} {% block breadcrumbs %} {{ Breadcrumbs.render(Route.getCurrentRoute.getName, accountIds, budgetIds, start, end) }} {% endblock %} {% block content %}

{{ 'accounts'|_ }}

{% set sum = 0 %} {% for account in accounts %} {% if accountSummary[account.id] %} {% set sum = sum + accountSummary[account.id] %} {% else %} {% endif %} {% endfor %}
{{ 'name'|_ }} {{ 'spent'|_ }}
{{ account.name }} {{ accountSummary[account.id]|formatAmount }}{{ 0|formatAmount }}
{{ 'sum'|_ }} {{ sum|formatAmount }}

{{ 'budgets'|_ }}

{% for budget in budgets %} {% if budgetSummary[budget.id] %} {% else %} {% endif %} {% endfor %}
{{ 'name'|_ }} {{ 'spent'|_ }}
{{ budget.name }} {{ budgetSummary[budget.id]|formatAmount }}{{ 0|formatAmount }}
{{ 'sum'|_ }} {{ budgetSummary.sum|formatAmount }}
{% if budgets.count > 1 %}

{{ 'expense_per_budget'|_ }}

{% endif %}

{{ 'expense_per_account'|_ }}

{{ 'income_and_expenses'|_ }}

{# Here be a chart with the budget limits as well if relevant.
amount spent vs budget limit reps
over the entire period the amount spent would rise and the budget limit rep would be like a heart beat jumping up and down
needs to be two axes to work
#}
{% if averageExpenses|length > 0 %}

{{ 'average_spending_per_account'|_ }}

{% set totalCount = 0 %} {% set totalSum = 0 %} {% for row in averageExpenses %} {% set totalCount = totalCount+ row.count %} {% set totalSum = totalSum + row.sum %} {% if loop.index > listLength %} {% else %} {% endif %} {% endfor %} {% if averageExpenses|length > listLength %} {% endif %}
{{ 'account'|_ }} {{ 'spent_average'|_ }} {{ 'total'|_ }} {{ 'transaction_count'|_ }}
{{ row.name }} {{ row.average|formatAmount }} {{ row.sum|formatAmount }} {{ row.count }}
{{ trans('firefly.show_full_list',{number:incomeTopLength}) }}
{{ 'sum'|_ }} {{ totalSum|formatAmount }} {{ totalCount }}
{% endif %} {% if topExpenses.count > 0 %}

{{ 'expenses'|_ }} ({{ trans('firefly.topX', {number: listLength}) }})

{% set totalSum = 0 %} {% for row in topExpenses %} {% set totalSum = totalSum + row.transaction_amount %} {% if loop.index > listLength %} {% else %} {% endif %} {% endfor %} {% if topExpenses|length > listLength %} {% endif %}
{{ 'description'|_ }} {{ 'date'|_ }} {{ 'account'|_ }} {{ 'amount'|_ }}
{% if row.transaction_description|length > 0 %} {{ row.transaction_description }} ({{ row.description }}) {% else %} {{ row.description }} {% endif %} {{ row.date.formatLocalized(monthAndDayFormat) }} {{ row.opposing_account_name }} {{ row.transaction_amount|formatAmount }}
{{ trans('firefly.show_full_list',{number:incomeTopLength}) }}
{{ 'sum'|_ }} {{ totalSum|formatAmount }}
{% endif %}
{% endblock %} {% block scripts %} {% endblock %} {% block styles %} {% endblock %}