diff --git a/subscription/templates/subscription/stats.jinja b/subscription/templates/subscription/stats.jinja
index c695d996..a1dd22d0 100644
--- a/subscription/templates/subscription/stats.jinja
+++ b/subscription/templates/subscription/stats.jinja
@@ -13,12 +13,6 @@
- {% 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 %}Total{% endtrans %} | +||||
|---|---|---|---|---|
| {% trans %}All subscriptions{% endtrans %} | + {% for location in locations %} +{{ total_location[location[0]] }} |
+ {% endfor %}
+ {{ total_location.values()|sum }} | +||
| {{ subscriptions_types[type]['name'] }} | - {% set subscriptions_total_type = subscriptions_total.filter(subscription_type=type) %} +{{ subscriptions_types[type]['name'] }} | {% 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()}} + {% set subtotal = subscriptions[type][location[0]][p_type[0]] %} + {% if subtotal > 0 %} + {{ p_type[1] }} : {{ subtotal }} + {% endif %} {% endfor %} |
{% endfor %}
- {{subscriptions_total_type.count()}} | +{{ total_type[type] }} |