{% 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 %}
{% trans %}Subscription type{% endtrans %} | {% for location in locations %}{{ location[1] }} | {% endfor %}{% trans %}Total{% endtrans %} | {% for type in subscriptions_types %}
---|---|---|
{{ subscriptions_types[type]['name'] }} | {% set subscriptions_total_type = subscriptions_total.filter(subscription_type=type) %} {% for location in locations %}
{% 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 %} |
{% endfor %}
{{subscriptions_total_type.count()}} |