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

66 lines
2.2 KiB
Twig
Raw Normal View History

2016-12-27 15:31:17 +01:00
<table class="table table-hover sortable">
<thead>
<tr>
<th data-defaultsign="az">{{ 'name'|_ }}</th>
2017-01-02 21:04:17 +01:00
<th data-defaultsign="_19" style="text-align: right;">{{ 'total'|_ }}</th>
<th data-defaultsign="_19" class="hidden-xs" style="text-align: right;">{{ 'average'|_ }}</th>
2016-12-28 05:25:58 +01:00
<th data-defaultsort="disabled"></th>
2016-12-27 15:31:17 +01: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>
2017-01-02 21:04:17 +01:00
<td data-value="{{ entry.sum }}" style="text-align: right;">
{% if entry.currencies == 1 %}
{{ formatAmountByCurrency(entry.single_currency, entry.sum) }}
{% else %}
{{ (entry.sum)|formatAmount }}
{% endif %}
2016-12-27 15:31:17 +01:00
</td>
2017-01-02 21:04:17 +01:00
<td class="hidden-xs" data-value="{{ entry.average }}" style="text-align: right;">
2016-12-27 15:31:17 +01:00
{% if entry.count > 1 %}
{{ entry.average|formatAmount }}
{% else %}
&mdash;
{% endif %}
</td>
2016-12-28 05:25:58 +01: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 15:31:17 +01:00
</tr>
{% endfor %}
</tbody>
<tfoot>
{% if entries|length > listLength %}
<tr>
2017-04-14 22:55:19 +02:00
<td colspan="4" class="active">
2016-12-27 15:31:17 +01:00
<a href="#" class="listLengthTrigger">{{ trans('firefly.show_full_list',{number:incomeTopLength}) }}</a>
</td>
</tr>
{% endif %}
<tr>
<td><em>{{ 'sum'|_ }}</em></td>
2017-01-02 21:04:17 +01:00
<td style="text-align: right;">{{ (sum)|formatAmount }}</td>
2016-12-27 15:31:17 +01:00
</tr>
<tr>
<td colspan="4"><small class="text-warning">{{ 'sum_in_default_currency'|_ }}</small></td>
</tr>
2016-12-27 15:31:17 +01:00
</tfoot>
</table>