Files
firefly-iii/resources/views/reports/partials/balance.twig

62 lines
2.7 KiB
Twig
Raw Normal View History

2016-10-26 19:45:10 +02:00
<table class="table table-hover">
<!-- build balance report header -->
<thead>
<tr>
<th colspan="2">{{ 'budgets'|_ }}</th>
{% for account in balance.getBalanceHeader.getAccounts %}
2017-01-02 21:04:17 +01:00
<th class="hidden-xs" style="text-align: right;"><a href="{{ route('accounts.show',account.id) }}">{{ account.name }}</a></th>
2016-10-26 19:45:10 +02:00
{% endfor %}
2017-01-02 21:04:17 +01:00
<th style="text-align: right;">
2016-10-26 19:45:10 +02:00
{{ 'leftInBudget'|_ }}
</th>
</tr>
</thead>
<tbody>
2015-05-17 12:49:09 +02:00
2016-10-26 19:45:10 +02:00
<!-- make rows -->
{% for balanceLine in balance.getBalanceLines %}
<tr>
2015-05-17 12:49:09 +02:00
2016-10-26 19:45:10 +02:00
{% if balanceLine.getBudget.id %}
<td>
<a href="{{ route('budgets.show',balanceLine.getBudget.id) }}">{{ balanceLine.getTitle }}</a>
{% if balanceLine.getStartdate and balanceLine.getEnddate %}
2016-11-08 20:35:30 +01:00
<span class="small" class="hidden-xs"><br>
2016-10-26 19:45:10 +02:00
{{ balanceLine.getStartdate.formatLocalized(monthAndDayFormat) }}
&mdash;
{{ balanceLine.getEnddate.formatLocalized(monthAndDayFormat) }}
2016-04-25 14:53:41 +02:00
</span>
2016-10-26 19:45:10 +02:00
{% endif %}
</td>
2017-01-02 21:04:17 +01:00
<td style="text-align: right;">
2017-04-19 16:32:12 +02:00
{% if(balanceLine.getBudgetLimit.amount) %}
{{ balanceLine.getBudgetLimit.amount|formatAmount }}
2015-06-21 10:50:45 +02:00
{% else %}
2016-10-26 19:45:10 +02:00
{{ '0'|formatAmount }}
2015-05-16 15:43:58 +02:00
{% endif %}
2016-10-26 19:45:10 +02:00
</td>
{% else %}
<td colspan="2">{{ balanceLine.getTitle }}</td>
{% endif %}
2015-05-16 15:43:58 +02:00
2016-10-26 19:45:10 +02:00
{% for balanceEntry in balanceLine.getBalanceEntries %}
2017-01-02 21:04:17 +01:00
<td class="hidden-xs" style="text-align: right;">
2016-10-26 19:45:10 +02:00
{% if balanceEntry.getSpent != 0 %}
<span class="text-danger">{{ (balanceEntry.getSpent)|formatAmountPlain }}</span>
<i class="fa fa-fw text-muted fa-info-circle firefly-info-button" data-location="balance-amount"
data-account-id="{{ balanceEntry.getAccount.id }}"
data-budget-id="{{ balanceLine.getBudget.id }}" data-role="{{ balanceLine.getRole }}"></i>
{% endif %}
{% if balanceEntry.getLeft != 0 %}
2017-01-02 21:04:17 +01:00
<span class="text-success" style="text-align: right;">{{ (balanceEntry.getLeft)|formatAmountPlain }}</span>
2016-10-26 19:45:10 +02:00
{% endif %}
</td>
2015-06-21 10:50:45 +02:00
{% endfor %}
2017-01-02 21:04:17 +01:00
<td style="text-align: right;">
2016-10-26 19:45:10 +02:00
{{ balanceLine.leftOfRepetition|formatAmount }}
</td>
</tr>
{% endfor %}
</tbody>
</table>