mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code to fix #3213
This commit is contained in:
@@ -216,11 +216,11 @@
|
||||
<table class="table table-bordered sortable-table table-striped sortable" id="budgetList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-defaultsort="disabled" class="hidden-sm hidden-xs" style="width:10%;"> </th>
|
||||
<th data-defaultsign="az">{{ 'budget'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="width:25%;">{{ 'budgeted'|_ }}</th>
|
||||
<th data-defaultsign="_19" class="hidden-sm hidden-xs">{{ 'spent'|_ }} ({{ 'per_day'|_|lower }})</th>
|
||||
<th data-defaultsign="_19">{{ 'left'|_ }} ({{ 'per_day'|_|lower }})</th>
|
||||
<th class="hidden-sm hidden-xs" style="width:10%;"> </th>
|
||||
<th>{{ 'budget'|_ }}</th>
|
||||
<th style="width:25%;">{{ 'budgeted'|_ }}</th>
|
||||
<th class="hidden-sm hidden-xs">{{ 'spent'|_ }} ({{ 'per_day'|_|lower }})</th>
|
||||
<th>{{ 'left'|_ }} ({{ 'per_day'|_|lower }})</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -228,12 +228,12 @@
|
||||
<tr data-id="{{ budget.id }}">
|
||||
<td class="hidden-sm hidden-xs">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="#" class="handle btn btn-default"><i class="fa fa-fw fa-arrows-v"></i></a>
|
||||
<a href="#" class="handle object-handle btn btn-default"><i class="fa fa-fw fa-bars"></i></a>
|
||||
<a href="{{ route('budgets.edit', budget.id) }}" class="btn btn-xs btn-default"><i class="fa fa-fw fa-pencil"></i></a>
|
||||
<a href="{{ route('budgets.delete', budget.id) }}" class="btn btn-xs btn-danger"><i class="fa fa-fw fa-trash-o"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
<td data-value="{{ budget.name }}">
|
||||
<td>
|
||||
<a href="{{ route('budgets.show',budget.id) }}" data-id="{{ budget.id }}">{{ budget.name }}</a>
|
||||
{% if budget.auto_budget %}
|
||||
{% if 1 == budget.auto_budget.auto_budget_type %}
|
||||
@@ -247,7 +247,7 @@
|
||||
<i class="fa fa-paperclip"></i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td data-value="-1">
|
||||
<td>
|
||||
{% if 0==budget.budgeted|length %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">{{ defaultCurrency.symbol }}</div>
|
||||
@@ -287,18 +287,22 @@
|
||||
{% if budget.budgeted|length < currencies.count %}
|
||||
<a href="#" class="btn btn-light btn-xs create_bl" data-id="{{ budget.id }}">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
</a>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="hidden-sm hidden-xs spent" data-id="{{ budget.id }}">
|
||||
<td class="hidden-sm hidden-xs spent" data-id="{{ budget.id }}" style="text-align:right;">
|
||||
{% for spentInfo in budget.spent %}
|
||||
{{ formatAmountBySymbol(spentInfo.spent, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }}
|
||||
({{ formatAmountBySymbol(spentInfo.spent / activeDaysPassed, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})
|
||||
<br/>
|
||||
{% endfor %}
|
||||
|
||||
{% for budgetLimit in budget.budgeted %}
|
||||
{% if null == budget.spent[budgetLimit.currency_id] %}
|
||||
{{ formatAmountBySymbol(0, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }}<br/>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td class="left" data-id="{{ budget.id }}">
|
||||
<td class="left" data-id="{{ budget.id }}" style="text-align: right;">
|
||||
{% for spentInfo in budget.spent %}
|
||||
{% set countLimit = 0 %}
|
||||
{% for budgetLimit in budget.budgeted %}
|
||||
@@ -324,41 +328,45 @@
|
||||
<br/>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<!-- only makes sense to list what's left for budgeted amounts.-->
|
||||
|
||||
<!--
|
||||
{% if budget.budgeted|length > 0 %}
|
||||
{% for budgetLimit in budget.budgeted %}
|
||||
{% for spentInfo in budget.spent %}
|
||||
{% if spentInfo.currency_id == budgetLimit.currency_id %}
|
||||
<span data-currency="{{ spentInfo.currency_id }}" data-limit="{{ budgetLimit.id }}" class="amount_left">
|
||||
{{ formatAmountBySymbol(spentInfo.spent + budgetLimit.amount, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }}
|
||||
{% if spentInfo.spent + budgetLimit.amount > 0 %}
|
||||
({{ formatAmountBySymbol((spentInfo.spent + budgetLimit.amount) / activeDaysLeft, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})
|
||||
{% else %}
|
||||
({{ formatAmountBySymbol(0, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})
|
||||
{% endif %}
|
||||
</span>
|
||||
<br/>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
-->
|
||||
|
||||
{#{{ "-1"|formatAmount }}#}
|
||||
{#{{ (repAmount + budgetInformation[budget.id]['spent'])|formatAmount }}#}
|
||||
{#{% if repAmount + budgetInformation[budget.id]['spent'] > 0 %}#}
|
||||
{#({{ "-1"|formatAmount }})#}
|
||||
{#({{ ((repAmount + budgetInformation[budget.id]['spent']) / activeDaysLeft)|formatAmount }})#}
|
||||
{#{% endif %}#}
|
||||
{% for budgetLimit in budget.budgeted %}
|
||||
{% if null == budget.spent[budgetLimit.currency_id] %}
|
||||
<span class="left_span" data-currency="{{ spentInfo.currency_id }}" data-limit="{{ budgetLimit.id }}"
|
||||
data-value="{{ spentInfo.spent + budgetLimit.amount }}" class="amount_left">
|
||||
{{ formatAmountBySymbol(budgetLimit.amount, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }}
|
||||
({{ formatAmountBySymbol(budgetLimit.amount / activeDaysLeft, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})
|
||||
</span>
|
||||
<br/>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><em>{{ 'sum'|_ }}</em></td>
|
||||
<td style="text-align:right;">
|
||||
{% for arr in sums.budgeted %}
|
||||
{{ formatAmountBySymbol(arr.amount, arr.currency_symbol, arr.currency_decimal_places) }}<br/>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
{% for arr in sums.spent %}
|
||||
{{ formatAmountBySymbol(arr.amount, arr.currency_symbol, arr.currency_decimal_places) }}
|
||||
({{ formatAmountBySymbol(arr.amount / activeDaysPassed, arr.currency_symbol, arr.currency_decimal_places) }})
|
||||
<br/>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
{% for arr in sums.left %}
|
||||
{{ formatAmountBySymbol(arr.amount, arr.currency_symbol, arr.currency_decimal_places) }}
|
||||
({{ formatAmountBySymbol(arr.amount / activeDaysLeft, arr.currency_symbol, arr.currency_decimal_places) }})
|
||||
<br/>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
|
Reference in New Issue
Block a user