mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-03 20:20:37 -06:00
58 lines
2.1 KiB
Twig
58 lines
2.1 KiB
Twig
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<i class="fa fa-sort-amount-asc fa-fw"></i>
|
|
{{ 'budgets'|_ }} ({{ 'splitByAccount'|_|lower }})
|
|
</div>
|
|
<table class="table table-bordered table-striped">
|
|
<!-- build balance report header -->
|
|
<tr>
|
|
<th colspan="2">{{ 'budgets'|_ }}</th>
|
|
{% for account in balance.getBalanceHeader.getAccounts %}
|
|
<th><a href="{{route('accounts.show',account.id)}}">{{ account.name }}</a></th>
|
|
{% endfor %}
|
|
<th>
|
|
{{ 'leftInBudget'|_ }}
|
|
</th>
|
|
<th>{{ 'sum'|_ }}</th>
|
|
</tr>
|
|
|
|
<!-- make rows -->
|
|
{% for balanceLine in balance.getBalanceLines %}
|
|
<tr>
|
|
|
|
{% if balanceLine.getBudget %}
|
|
<td>
|
|
<a href="{{ route('budgets.show',balanceLine.getBudget.id) }}">{{ balanceLine.getTitle }}</a>
|
|
</td>
|
|
<td>{{ balanceLine.getRepetition.amount|formatAmount }}</td>
|
|
{% else %}
|
|
<td colspan="2">{{ balanceLine.getTitle }}</td>
|
|
{% endif %}
|
|
|
|
{% for balanceEntry in balanceLine.getBalanceEntries %}
|
|
<td>
|
|
{% if balanceEntry.getSpent != 0 %}
|
|
<span class="text-danger">{{ (balanceEntry.getSpent*-1)|formatAmountPlain }}</span>
|
|
{% endif %}
|
|
{% if balanceEntry.getLeft != 0 %}
|
|
<span class="text-success">{{ (balanceEntry.getLeft)|formatAmountPlain }}</span>
|
|
{% endif %}
|
|
</td>
|
|
{% endfor %}
|
|
<td>
|
|
{% if balanceLine.leftOfRepetition != 0 %}
|
|
{{ balanceLine.leftOfRepetition|formatAmount }}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if balanceLine.sumOfLeft != 0 %}
|
|
{{ balanceLine.sumOfLeft|formatAmount }}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|