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

42 lines
1.3 KiB
Twig

<table class="table table-hover">
<tbody>
{% set sum = 0 %}
{% for expense in expenses %}
{% set sum = sum + expense.sum %}
{% if loop.index > listLength %}
<tr class="overListLength">
{% else %}
<tr>
{% endif %}
<td>
<a href="{{ route('accounts.show',expense.id) }}">{{ expense.name }}</a>
{% if expense.count > 1 %}
<br/>
<small>
{{ expense.count }} {{ 'transactions'|_|lower }}
<i class="fa fa-fw text-muted fa-info-circle firefly-info-button" data-location="expense-entry"
data-account-id="{{ expense.id }}"></i>
</small>
{% endif %}
</td>
<td>
{{ (expense.sum)|formatAmount }}
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
{% if expenses|length > listLength %}
<tr>
<td colspan="2" 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>