firefly-iii/resources/views/reports/partials/income-expenses.twig

59 lines
1.8 KiB
Twig
Raw Normal View History

2016-12-27 08:31:17 -06:00
<table class="table table-hover sortable">
<thead>
<tr>
<th data-defaultsign="az">{{ 'name'|_ }}</th>
<th data-defaultsign="_19">{{ 'total'|_ }}</th>
<th data-defaultsign="_19" class="hidden-xs">{{ 'average'|_ }}</th>
2016-12-27 22:25:58 -06:00
<th data-defaultsort="disabled"></th>
2016-12-27 08:31:17 -06:00
</tr>
</thead>
<tbody>
{% set sum = 0 %}
{% for entry in entries %}
{% set sum = sum + entry.sum %}
{% if loop.index > listLength %}
<tr class="overListLength">
{% else %}
<tr>
{% endif %}
<td data-value="{{ entry.name }}">
<a href="{{ route('accounts.show',entry.id) }}">{{ entry.name }}</a>
{% if entry.count > 1 %}
<br/>
<small>
{{ entry.count }} {{ 'transactions'|_|lower }}
</small>
{% endif %}
</td>
<td data-value="{{ entry.sum }}">
{{ (entry.sum)|formatAmount }}
</td>
<td class="hidden-xs" data-value="{{ entry.average }}">
{% if entry.count > 1 %}
{{ entry.average|formatAmount }}
{% else %}
&mdash;
{% endif %}
</td>
2016-12-27 22:25:58 -06:00
<td>
<i class="fa fa-fw text-muted fa-info-circle firefly-info-button" data-location="{{ type }}"
data-account-id="{{ entry.id }}"></i>
</td>
2016-12-27 08:31:17 -06:00
</tr>
{% endfor %}
</tbody>
<tfoot>
{% if entries|length > listLength %}
<tr>
<td colspan="3" class="active">
<a href="#" class="listLengthTrigger">{{ trans('firefly.show_full_list',{number:incomeTopLength}) }}</a>
</td>
</tr>
{% endif %}
<tr>
<td><em>{{ 'sum'|_ }}</em></td>
<td>{{ (sum)|formatAmount }}</td>
</tr>
</tfoot>
</table>