mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
More readable user_account
This commit is contained in:
@ -12,13 +12,13 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% 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) %}
|
||||
<tr>
|
||||
<td><a href="{{ link }}">{{ tuple[1].year }}</a></td>
|
||||
<td><a href="{{ link }}">{{ tuple[1]|date("E") }}</a></td>
|
||||
<td><a href="{{ link }}">{{ tuple[0] }} €</a></td>
|
||||
<td><a href="{{ link }}">{{ dict['date'].year }}</a></td>
|
||||
<td><a href="{{ link }}">{{ dict['date']|date("E") }}</a></td>
|
||||
<td><a href="{{ link }}">{{ dict['sum'] }} €</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user