{% extends "_layout.html" %} {% set active_page = 'statistics' %} {% import 'macros/_account_macros.html' as account_macros with context %} {% macro copy_balance_directives_text() -%} {% for account in api.all_accounts_active -%} {% if account|uptodate_eligible %} {%- if api.account_uptodate_status(account) != "green" -%} {{- account_macros.balance_directive(account) }} {%- endif -%} {% endif %} {%- endfor -%} {%- endmacro %} {% block content %} {% set postings_by_account = api.postings_by_account() %}

{{ _('Postings per Account') }}

{% for account_name, num in postings_by_account|dictsort(false, 'value')|reverse %} {% endfor %}
{{ _('Account') }} {{ _('# Postings') }}
{{ num }}
{{ _('Total') }} {{ postings_by_account.values()|sum }}
{% set status_sortorder = { 'red': 5, 'yellow': 4, 'green': 3, '': 2 } %}

{{ _('Update Activity') }}

{% for account in api.all_accounts_active %} {% if account.startswith(api.options['name_assets']) or account.startswith(api.options['name_liabilities']) %} {% set last_entry = api.last_entry(account) %} {% if last_entry %} {% if account|uptodate_eligible %} {% else %} {% endif %} {% endif %} {% endif %} {% endfor %}
{{ _('Account') }} {{ _('Last Entry') }} {{ _('Balance') }}
{{ account_macros.indicator(account) }} {{ account_macros.last_account_activity(account) }} {{ last_entry.date }} {%- for position in (api.root_account|get_or_create(account)).balance -%} {{ position.units|format_amount }}
{% endfor -%}

{{ _('Entries per Type') }}

{% for group in api.entries|groupby('__class__.__name__') %} {% endfor %}
{{ _('Type') }} {{ _('# Entries') }}
{{ group.grouper }} {{ group.list|length }}
{{ _('Total') }} {{ api.entries|length }}
{% endblock %}