make sure reports work as expected.

This commit is contained in:
James Cole
2019-05-30 06:23:25 +02:00
parent bdf48227bb
commit 10a6ff9bf8
13 changed files with 446 additions and 391 deletions

View File

@@ -230,7 +230,7 @@
<tr>
{% endif %}
<td data-sortable="false">
<a href="{{ route('transactions.show', 1+row.transaction_group_id) }}">
<a href="{{ route('transactions.show', row.transaction_group_id) }}">
{% if row.group_title|length > 0 %}
{{ row.group_title }} ({{ row.description }})
{% else %}

View File

@@ -259,7 +259,7 @@
<tbody>
{% set totalSum = 0 %}
{% for row in topExpenses %}
{% set totalSum = totalSum + row.sum %}
{% set totalSum = totalSum + row.amount %}
{% if loop.index > listLength %}
<tr class="overListLength">
{% else %}
@@ -338,10 +338,10 @@
<a href="{{ route('accounts.show', row.id) }}">{{ row.name }}</a>
</td>
<td data-value="{{ row.average }}" style="text-align:right;">
{{ row.average|formatAmount }}
{{ (row.average*-1)|formatAmount }}
</td>
<td data-value="{{ row.sum }}" style="text-align:right;">
{{ row.sum|formatAmount }}
{{ (row.sum*-1)|formatAmount }}
</td>
<td data-value="{{ row.count }}">
{{ row.count }}
@@ -352,7 +352,7 @@
<td colspan="2">
{{ 'sum'|_ }}
</td>
<td style="text-align:right">{{ totalSum|formatAmount }}</td>
<td style="text-align:right">{{ (totalSum*-1)|formatAmount }}</td>
<td>{{ totalCount }}</td>
</tr>
</tbody>
@@ -362,7 +362,7 @@
</div>
{% endif %}
<div class="col-lg-6">
{% if topIncome.count > 0 %}
{% if topIncome|length > 0 %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'income'|_ }} ({{ trans('firefly.topX', {number: listLength}) }})</h3>
@@ -380,37 +380,37 @@
<tbody>
{% set totalSum = 0 %}
{% for row in topIncome %}
{% set totalSum = totalSum + row.transaction_amount %}
{% set totalSum = totalSum + row.amount %}
{% if loop.index > listLength %}
<tr class="overListLength">
{% else %}
<tr>
{% endif %}
<td>
<a href="{{ route('transactions.show', row.journal_id) }}">
{% if row.transaction_description|length > 0 %}
{{ row.transaction_description }} ({{ row.description }})
<td data-sortable="false">
<a href="{{ route('transactions.show', 1+row.transaction_group_id) }}">
{% if row.group_title|length > 0 %}
{{ row.group_title }} ({{ row.description }})
{% else %}
{{ row.description }}
{% endif %}
</a>
</td>
<td data-value="{{ row.date.format('Y-m-d H-i-s') }}">
<td data-value="{{ row.date.format('Y-m-d') }}">
{{ row.date.formatLocalized(monthAndDayFormat) }}
</td>
<td data-value="{{ row.opposing_account_name }}">
<a href="{{ route('accounts.show', row.opposing_account_id) }}">
{{ row.opposing_account_name }}
<td data-value="{{ row.destination_account_name }}">
<a href="{{ route('accounts.show', row.destination_account_id) }}">
{{ row.destination_account_name }}
</a>
</td>
<td data-value="{{ row.transaction_amount }}" style="text-align:right">
{{ row.transaction_amount|formatAmount }}
<td data-value="{{ row.amount }}" style="text-align: right;">
{{ formatAmountBySymbol(row.amount*-1, row.currency_symbol, row.currency_symbol_decimal_places) }}
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
{% if topIncome.count > listLength %}
{% if topIncome|length > listLength %}
<tr>
<td colspan="3" class="active">
<a href="#"
@@ -422,7 +422,7 @@
<td colspan="3">
{{ 'sum'|_ }}
</td>
<td style="text-align:right">{{ totalSum|formatAmount }}</td>
<td style="text-align:right">{{ (totalSum*-1)|formatAmount }}</td>
</tr>
</tfoot>
</table>