firefly-iii/resources/twig/partials/reports/expenses.twig
2015-06-21 10:50:45 +02: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><span class="text-danger">{{ (expense.amount)|formatAmountPlain }}</span></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><span class="text-danger">{{ (expenses.getTotal)|formatAmountPlain }}</span></td>
</tr>
</tfoot>
</table>
</div>
</div>