Skip to content

Firefly III: a personal finances manager

Show sum [skip ci]

James Cole4ba34ab511fb
diff --git a/resources/views/budgets/index.twig b/resources/views/budgets/index.twig
index e3b0f4ba0c..e9524e6acf 100644
--- a/resources/views/budgets/index.twig
+++ b/resources/views/budgets/index.twig
@@ -185,8 +185,8 @@
<h3 class="box-title">{{ 'inactiveBudgets'|_ }}</h3>
</div>
<div class="box-body">
- {% for index,budget in inactive %}
- {% if index != inactive|length-1 %}
+ {% for budget in inactive %}
+ {% if loop.index == inactive.count() %}
<a href="{{ route('budgets.show',budget.id) }}">{{ budget.name }}</a>
{% else %}
<a href="{{ route('budgets.show',budget.id) }}">{{ budget.name }}</a>,
diff --git a/resources/views/reports/default/multi-year.twig b/resources/views/reports/default/multi-year.twig
index 314415d2f8..88474b6029 100644
--- a/resources/views/reports/default/multi-year.twig
+++ b/resources/views/reports/default/multi-year.twig
@@ -95,24 +95,34 @@
<table class="table table-hover sortable">
<thead>
<tr>
- <th>Budget</th>
+ <th>{{ 'budget'|_ }}</th>
{% for year in years %}
<th>{{ year }}</th>
{% endfor %}
-
+ <th>{{ 'sum'|_ }}</th>
</tr>
</thead>
<tbody>
-
{% for id, info in budgetMultiYear %}
<tr>
- <td><a href="{{ route('budgets.show', id) }}">{{ info.name }}</a></td>
+ <td>
+ {% if id == 0 %}
+ <a href="{{ route('budgets.noBudget') }}">{{ info.name }}</a>
+
+ {% else %}
+ <a href="{{ route('budgets.show', id) }}">{{ info.name }}</a>
+ {% endif %}
+ </td>
+ {% set sum = 0 %}
{% for amount in info.entries %}
- <td>
+ <td data-value="{{ amount }}">
{{ amount|formatAmount }}
</td>
+ {% set sum = sum + amount %}
{% endfor %}
-
+ <td data-value="{{ sum }}">
+ {{ sum|formatAmount }}
+ </td>
</tr>
{% endfor %}
</tbody>