{% extends "core/base.jinja" %} {% block title %} {% trans %}Subscription stats{% endtrans %} {% endblock %} {% block head %} {{ super() }} {% endblock %} {% block content %}

{{ form.start_date.label }}
{{ form.start_date }}

{{ form.end_date.label }}
{{ form.end_date }}

{% trans %}Total subscriptions{% endtrans %} : {{ subscriptions_total.count() }}

{% trans %}Subscriptions by type{% endtrans %}

{% for location in locations %} {{ location[1] }} : {{ subscriptions_total.filter(location=location[0]).count() }}
{% endfor %}


{% for location in locations %} {% endfor %} {% for type in subscriptions_types %} {% set subscriptions_total_type = subscriptions_total.filter(subscription_type=type) %} {% for location in locations %} {% endfor %} {% endfor %}
{% trans %}Subscription type{% endtrans %}{{ location[1] }}{% trans %}Total{% endtrans %}
{{ subscriptions_types[type]['name'] }} {% set subscriptions_total_type_location = subscriptions_total_type.filter(location=location[0]) %} {% trans %}Total{% endtrans %} : {{ subscriptions_total_type_location.count()}}
{% for p_type in payment_types %} {{ p_type[1] }} : {{ subscriptions_total_type_location.filter(payment_method=p_type[0]).count()}}
{% endfor %}
{{subscriptions_total_type.count()}}
{% endblock %} {% block script %} {{ super() }} {% endblock %}