{% extends "core/base.jinja" %} {% macro monthly(objects) %}
{% for object in objects %} {% set link=url( 'core:user_account_detail', user_id=profile.id, year=object['grouped_date'].year, month=object['grouped_date'].month ) %} {% endfor %}
{% trans %}Year{% endtrans %} {% trans %}Month{% endtrans %} {% trans %}Total{% endtrans %}
{{ object["grouped_date"]|date("Y") }} {{ object["grouped_date"]|date("E") }} {{ "%.2f"|format(object["total"]) }} €
{% endmacro %} {% block title %} {% trans user_name=profile.get_display_name() %}{{ user_name }}'s account{% endtrans %} {% endblock %} {% block content %} {% if customer %}

{% trans %}User account{% endtrans %}

{% trans %}Amount: {% endtrans %}{{ customer.amount }} €

{% if buyings_month %}
{% trans %}Account purchases{% endtrans %}
{{ monthly(buyings_month) }} {% endif %} {% if refilling_month %}
{% trans %}Reloads{% endtrans %}
{{ monthly(refilling_month) }} {% endif %} {% if invoices_month %}
{% trans %}Eboutic invoices{% endtrans %}
{{ monthly(invoices_month) }} {% endif %} {% if etickets %}

{% trans %}Etickets{% endtrans %}

{% endif %}
{% else %}

{% trans %}User has no account{% endtrans %}

{% endif %} {% endblock %} {% block script %} {{ super() }} {% endblock %}