mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-10 23:45:48 -06:00
95 lines
3.6 KiB
Twig
95 lines
3.6 KiB
Twig
<table class="table table-hover sortable">
|
|
<thead>
|
|
<tr>
|
|
<th data-defaultsign="az">{{ 'budget'|_ }}</th>
|
|
<th data-defaultsign="month" class="hidden-xs">{{ 'date'|_ }}</th>
|
|
<th data-defaultsign="_19">{{ 'budgeted'|_ }}</th>
|
|
<th data-defaultsign="_19">{{ 'spent'|_ }}</th>
|
|
<th data-defaultsign="_19">{{ 'left'|_ }}</th>
|
|
<th data-defaultsign="_19">{{ 'overspent'|_ }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for budgetLine in budgets.getBudgetLines %}
|
|
<tr>
|
|
|
|
{% if budgetLine.getBudget.id %}
|
|
<td data-value="{{ budgetLine.getBudget.name }}">
|
|
<a href="{{ route('budgets.show',budgetLine.getBudget.id) }}">{{ budgetLine.getBudget.name }}</a>
|
|
</td>
|
|
{% else %}
|
|
<td data-value="zzzzzzz">
|
|
<em>{{ 'no_budget'|_ }}</em>
|
|
</td>
|
|
{% endif %}
|
|
|
|
|
|
{% if budgetLine.getBudgetLimit.id %}
|
|
<td class="hidden-xs" data-value="{{ budgetLine.getBudgetLimit.start_date.format('Y-m-d') }}">
|
|
<a href="{{ route('budgets.show.limit', [budgetLine.getBudget.id, budgetLine.getBudgetLimit.id]) }}">
|
|
{{ budgetLine.getBudgetLimit.start_date.formatLocalized(monthAndDayFormat) }}
|
|
—
|
|
{{ budgetLine.getBudgetLimit.end_date.formatLocalized(monthAndDayFormat) }}
|
|
</a>
|
|
</td>
|
|
{% else %}
|
|
<td data-value="0000-00-00">
|
|
|
|
</td>
|
|
{% endif %}
|
|
|
|
|
|
{% if budgetLine.getBudgetLimit.id %}
|
|
<td data-value="{{ budgetLine.getBudgetLimit.amount }}">
|
|
{{ budgetLine.getBudgetLimit.amount|formatAmount }}
|
|
</td>
|
|
{% else %}
|
|
<td data-value="0">
|
|
{{ 0|formatAmount }}
|
|
</td>
|
|
{% endif %}
|
|
|
|
<td data-value="{{ budgetLine.getSpent }}">
|
|
{% if budgetLine.getSpent != 0 %}
|
|
{{ budgetLine.getSpent|formatAmount }}
|
|
<i class="fa fa-fw text-muted fa-info-circle firefly-info-button"
|
|
data-location="budget-spent-amount" data-budget-id="{{ budgetLine.getBudget.id }}"></i>
|
|
{% endif %}
|
|
|
|
{% if budgetLine.getSpent == 0 %}
|
|
{{ budgetLine.getSpent|formatAmount }}
|
|
{% endif %}
|
|
|
|
</td>
|
|
<td data-value="{{ budgetLine.getLeft }}">
|
|
{% if(budgetLine.getOverspent == 0) %}
|
|
{{ budgetLine.getLeft|formatAmount }}
|
|
{% endif %}
|
|
</td>
|
|
<td data-value="{{ budgetLine.getOverspent }}">
|
|
{% if budgetLine.getOverspent != 0 %}
|
|
{{ budgetLine.getOverspent|formatAmount }}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td><em>{{ 'sum'|_ }}</em></td>
|
|
<td class="hidden-xs"> </td>
|
|
<td>{{ budgets.getBudgeted|formatAmount }}</td>
|
|
<td>
|
|
{% if budgets.getSpent != 0 %}
|
|
<span class="text-danger">{{ budgets.getSpent|formatAmountPlain }}</span>
|
|
{% endif %}
|
|
{% if budgets.getSpent == 0 %}
|
|
{{ budgets.getSpent|formatAmount }}
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ budgets.getLeft|formatAmount }}</td>
|
|
<td><span class="text-danger">{{ budgets.getOverspent|formatAmountPlain }}</span></td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|