Fixed account order and detail account view

This commit is contained in:
2016-09-08 03:38:28 +02:00
parent 8d060af46c
commit 41d5a02d77
2 changed files with 10 additions and 5 deletions

View File

@ -21,7 +21,8 @@
</tr>
</thead>
<tbody>
{% for i in customer.refillings.order_by('-date').all() %}
{% for i in customer.refillings.order_by('-date').filter(
date__year=year, date__month=month) %}
<tr>
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
<td>{{ i.counter }}</td>
@ -51,7 +52,8 @@
</tr>
</thead>
<tbody>
{% for i in customer.buyings.order_by('-date').all() %}
{% for i in customer.buyings.order_by('-date').all().filter(
date__year=year, date__month=month) %}
<tr>
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
<td>{{ i.counter }}</td>
@ -79,7 +81,8 @@
</tr>
</thead>
<tbody>
{% for i in customer.user.invoices.order_by('-date').all() %}
{% for i in customer.user.invoices.order_by('-date').all().filter(
date__year=year, date__month=month) %}
<tr>
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
<td>