Files
firefly-iii/resources/views/v1/list/periods.twig

54 lines
2.2 KiB
Twig
Raw Normal View History

2018-09-10 20:24:19 +02:00
{% for period in periods %}
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ period.route }}">{{ period.title }}</a>
</h3>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
{% if period.transactions > 0 %}
2019-05-29 18:30:52 +02:00
<tr>
<td style="width:33%;">{{ 'transactions'|_ }}</td>
<td style="text-align: right;">{{ period.transactions }}</td>
</tr>
2018-09-10 20:24:19 +02:00
{% endif %}
2019-04-19 07:00:19 +02:00
{# loop all spent amounts #}
2019-05-29 18:30:52 +02:00
{% for entry in period.spent %}
2019-04-19 07:00:19 +02:00
{# actually spent anything: #}
2019-05-29 18:30:52 +02:00
{% if entry.amount !=0 %}
2018-09-10 20:24:19 +02:00
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
2019-05-29 18:30:52 +02:00
<td style="text-align: right;">
{{ formatAmountBySymbol(entry.amount * -1, entry.currency.symbol, entry.currency.decimal_places) }}
</td>
2018-09-10 20:24:19 +02:00
</tr>
{% endif %}
{% endfor %}
2019-05-29 18:30:52 +02:00
{% for entry in period.earned %}
{% if entry.amount !=0 %}
2018-09-10 20:24:19 +02:00
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
2019-05-29 18:30:52 +02:00
<td style="text-align: right;">{{ formatAmountBySymbol(entry.amount, entry.currency.symbol, entry.currency.decimal_places) }}</td>
2018-09-10 20:24:19 +02:00
</tr>
{% endif %}
{% endfor %}
2019-04-19 07:00:19 +02:00
{% for array in period.transferred.sums %}
{% if array.sum !=0 %}
2018-09-10 20:24:19 +02:00
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
2019-05-29 18:30:52 +02:00
<td style="text-align: right;"><span
class="text-info">{{ formatAmountBySymbol(array.sum, array.currency_symbol, array.currency_decimal_places, false) }}</span>
</td>
2018-09-10 20:24:19 +02:00
</tr>
{% endif %}
{% endfor %}
</table>
</div>
</div>
2018-10-07 09:45:50 +02:00
2019-01-01 15:43:03 +01:00
{% endfor %}