firefly-iii/resources/twig/partials/reports/budgets.twig

63 lines
2.4 KiB
Twig
Raw Normal View History

2015-05-16 07:14:22 -05:00
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-tasks fa-fw"></i>
{{ 'budgets'|_ }}
</div>
<table class="table table-bordered">
<tr>
<th>{{ 'budget'|_ }}</th>
<th>{{ 'date'|_ }}</th>
<th>{{ 'budgeted'|_ }}</th>
<th>{{ 'spent'|_ }}</th>
<th>{{ 'left'|_ }}</th>
<th>{{ 'overspent'|_ }}</th>
</tr>
{% for budgetLine in budgets.getBudgetLines %}
<tr>
<td>
{% if budgetLine.getBudget %}
<a href="{{route('budgets.show',budgetLine.getBudget.id)}}">{{ budgetLine.getBudget.name }}</a>
{% else %}
<em>{{ 'noBudget'|_ }}</em>
{% endif %}
</td>
<td>
{% if budgetLine.getRepetition %}
2015-05-18 10:57:44 -05:00
<a href="{{ route('budgets.show', [budgetLine.getBudget.id, budgetLine.getRepetition.id]) }}">{{ budgetLine.getRepetition.startdate.formatLocalized(monthAndDayFormat) }}</a>
2015-05-16 07:14:22 -05:00
{% endif %}
</td>
<td>
{% if budgetLine.getRepetition %}
{{ budgetLine.getRepetition.amount|formatAmount }}
{% else %}
{{ 0|formatAmount }}
{% endif %}
</td>
<td>
{% if budgetLine.getSpent != 0 %}
{{ budgetLine.getSpent|formatAmount }}
{% endif %}
</td>
<td>
{% if budgetLine.getLeft != 0 %}
{{ budgetLine.getLeft|formatAmount }}
{% endif %}
</td>
<td>
{% if budgetLine.getOverspent != 0 %}
<span class="text-danger">{{ budgetLine.getOverspent|formatAmountPlain }}</span>
{% endif %}
</td>
</tr>
{% endfor %}
<tr>
<td colspan="2"><em>{{ 'sum'|_ }}</em></td>
<td>{{ budgets.getBudgeted|formatAmount }}</td>
<td>{{ budgets.getSpent|formatAmount }}</td>
<td>{{ budgets.getLeft|formatAmount }}</td>
<td><span class="text-danger">{{ budgets.getOverspent|formatAmountPlain }}</span></td>
</tr>
</table>
2015-05-20 12:56:14 -05:00
</div>