diff --git a/core/templates/core/user_account.jinja b/core/templates/core/user_account.jinja
index 1ecaa8d9..88c21d6d 100644
--- a/core/templates/core/user_account.jinja
+++ b/core/templates/core/user_account.jinja
@@ -12,13 +12,13 @@
{% for array in obj %}
- {% for tuple in array %}
- {% if tuple[0] != 0 %}
- {% set link=url('core:user_account_detail', user_id=profile.id, year=tuple[1].year, month=tuple[1].month) %}
+ {% for dict in array %}
+ {% if dict['sum'] != 0 %}
+ {% set link=url('core:user_account_detail', user_id=profile.id, year=dict['date'].year, month=dict['date'].month) %}
- {{ tuple[1].year }} |
- {{ tuple[1]|date("E") }} |
- {{ tuple[0] }} € |
+ {{ dict['date'].year }} |
+ {{ dict['date']|date("E") }} |
+ {{ dict['sum'] }} € |
{% endif %}
{% endfor %}
diff --git a/core/views/user.py b/core/views/user.py
index 0ed37567..92a7db9b 100644
--- a/core/views/user.py
+++ b/core/views/user.py
@@ -427,10 +427,10 @@ class UserAccountView(UserAccountBase):
date__year=month.year,
date__month=month.month
)
- stats[i].append((
- sum([calc(p) for p in q]),
- month
- ))
+ stats[i].append({
+ 'sum':sum([calc(p) for p in q]),
+ 'date':month
+ })
i += 1
return stats
diff --git a/counter/views.py b/counter/views.py
index da8c53a8..f450f0e8 100644
--- a/counter/views.py
+++ b/counter/views.py
@@ -1025,7 +1025,6 @@ class EticketPDFView(CanViewMixin, DetailView):
self.object = self.get_object()
eticket = self.object.product.eticket
user = self.object.customer.user
- print(self.object)
code = "%s %s %s %s" % (self.object.customer.user.id, self.object.product.id, self.object.id, self.object.quantity)
code += " " + eticket.get_hash(code)[:8].upper()
response = HttpResponse(content_type='application/pdf')