firefly-iii/resources/views/reports/partials/expenses.twig
2016-01-08 13:35:27 +01:00

41 lines
1.5 KiB
Twig

<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'expenses'|_ }}</h3>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<tbody>
{% for expense in expenses.getExpenses %}
{% if loop.index > expenseTopLength %}
<tr class="collapse out expenseCollapsed">
{% else %}
<tr>
{% endif %}
<td>
<a href="{{ route('accounts.show',expense.id) }}">{{ expense.name }}</a>
{% if expense.count > 1 %}
<br/>
<small>{{ expense.count }} {{ 'transactions'|_|lower }}</small>
{% endif %}
</td>
<td>{{ (expense.amount)|formatAmount }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
{% if expenses.getExpenses|length > expenseTopLength %}
<tr>
<td colspan="2" class="active">
<a href="#" id="showExpenses">{{ trans('firefly.showTheRest',{number:incomeTopLength}) }}</a>
</td>
</tr>
{% endif %}
<tr>
<td><em>{{ 'sum'|_ }}</em></td>
<td>{{ (expenses.getTotal)|formatAmount }}</td>
</tr>
</tfoot>
</table>
</div>
</div>