mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-31 19:27:51 -06:00
a0ea3882e1
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
71 lines
3.1 KiB
Twig
71 lines
3.1 KiB
Twig
<div class="box">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">{{ 'budgets'|_ }} ({{ 'splitByAccount'|_|lower }})</h3>
|
|
</div>
|
|
<div class="box-body table-responsive no-padding">
|
|
<table class="table table-hover">
|
|
<!-- build balance report header -->
|
|
<thead>
|
|
<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>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<!-- make rows -->
|
|
{% for balanceLine in balance.getBalanceLines %}
|
|
<tr>
|
|
|
|
{% if balanceLine.getBudget.id %}
|
|
<td>
|
|
<a href="{{ route('budgets.show',balanceLine.getBudget.id) }}">{{ balanceLine.getTitle }}</a>
|
|
{% if balanceLine.getStartdate and balanceLine.getEnddate %}
|
|
<span class="small"><br>
|
|
{{ balanceLine.getStartdate.formatLocalized(monthAndDayFormat) }}
|
|
—
|
|
{{ balanceLine.getEnddate.formatLocalized(monthAndDayFormat) }}
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if(balanceLine.getBudget.amount) %}
|
|
{{ balanceLine.getBudget.amount|formatAmount }}
|
|
{% else %}
|
|
{{ '0'|formatAmount }}
|
|
{% endif %}
|
|
</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)|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 %}
|
|
<span class="text-success">{{ (balanceEntry.getLeft)|formatAmountPlain }}</span>
|
|
{% endif %}
|
|
</td>
|
|
{% endfor %}
|
|
<td>
|
|
{{ balanceLine.leftOfRepetition|formatAmount }}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|