-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add transferred/received amounts in statistics page (#1300)
Co-authored-by: Baptiste Jonglez <[email protected]> Co-authored-by: Alexis Métaireau <[email protected]>
- Loading branch information
1 parent
19ecdb5
commit c796711
Showing
4 changed files
with
157 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,48 @@ | ||
{% extends "sidebar_table_layout.html" %} | ||
|
||
{% block sidebar %} | ||
<div id="table_overflow" class="statistics mr-md-n3"> | ||
{{ balance_table(show_weight=False, show_header=True) }} | ||
</div> | ||
{% endblock %} | ||
|
||
|
||
{% block content %} | ||
<div class="d-flex flex-column"> | ||
<table id="bill_table" class="split_bills table table-striped ml-md-n3"> | ||
<thead><tr><th class="d-md-none">{{ _("Who?") }}</th><th>{{ _("Paid") }}</th><th>{{ _("Spent") }}</th></tr></thead> | ||
<tbody> | ||
{% for stat in members_stats|sort(attribute='member.name') %} | ||
<tr> | ||
<td class="d-md-none">{{ stat.member.name }}</td> | ||
<td>{{ stat.paid|currency }}</td> | ||
<td>{{ stat.spent|currency }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
<h2>{{ _("Expenses by Month") }}</h2> | ||
<table id="monthly_stats" class="table table-striped"> | ||
<thead><tr><th>{{ _("Period") }}</th><th>{{ _("Spent") }}</th></tr></thead> | ||
<tbody> | ||
{% for month in months %} | ||
<tr> | ||
<td>{{ month|dateformat("MMMM yyyy") }}</td> | ||
<td>{{ monthly_stats[month.year][month.month]|currency }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% extends "sidebar_table_layout.html" %} {% block sidebar %} | ||
<div id="table_overflow" class="statistics mr-md-n3"> | ||
{{ balance_table(show_weight=False, show_header=True) }} | ||
</div> | ||
{% endblock %} {% block content %} | ||
<div class="d-flex flex-column"> | ||
<table id="bill_table" class="split_bills table table-striped ml-md-n3"> | ||
<thead> | ||
<tr> | ||
<th class="d-md-none">{{ _("Who?") }}</th> | ||
<th>{{ _("Paid") }}</th> | ||
<th>{{ _("Expenses") }}</th> | ||
<th>{{ _("Direct transfer") }}</th> | ||
<th>{{ _("Received") }}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for stat in members_stats|sort(attribute='member.name') %} | ||
<tr> | ||
<td class="d-md-none">{{ stat.member.name }}</td> | ||
<td>{{ stat.paid|currency }}</td> | ||
<td>{{ stat.spent|currency }}</td> | ||
<td>{{ stat.transferred|currency }}</td> | ||
<td>{{ stat.received|currency }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
<h2>{{ _("Expenses by month") }}</h2> | ||
<table id="monthly_stats" class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th>{{ _("Period") }}</th> | ||
<th>{{ _("Expenses") }}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for month in months %} | ||
<tr> | ||
<td>{{ month|dateformat("MMMM yyyy") }}</td> | ||
<td>{{ monthly_stats[month.year][month.month]|currency }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters