Fix null pointer in budget report [skip ci]

This commit is contained in:
James Cole 2018-03-11 18:38:35 +01:00
parent aba8025645
commit dd6a6a565f
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -21,12 +21,15 @@
</tr>
</thead>
<tbody>
{% set sum = 0 %}
{% for account in accounts %}
<tr>
<td data-value="{{ account.name }}">
<a href="{{ route('accounts.show', account.id) }}" title="{{ account.name }}">{{ account.name }}</a>
</td>
{% if accountSummary[account.id] %}
{% set sum = sum + accountSummary[account.id] %}
<td data-value="{{ accountSummary[account.id] }}"
style="text-align: right;">{{ accountSummary[account.id]|formatAmount }}</td>
{% else %}
@ -38,7 +41,7 @@
<tfoot>
<tr>
<td>{{ 'sum'|_ }}</td>
<td style="text-align: right;">{{ accountSummary.sum|formatAmount }}</td>
<td style="text-align: right;">{{ sum|formatAmount }}</td>
</tr>
</tfoot>
</table>