Fix account thing overview.

This commit is contained in:
James Cole
2025-08-09 20:10:40 +02:00
parent be8ca5db50
commit 4196ce31f0
3 changed files with 6 additions and 7 deletions

View File

@@ -566,7 +566,7 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac
'transaction_types.type', 'transaction_types.type',
'transaction_journals.transaction_currency_id', 'transaction_journals.transaction_currency_id',
'transactions.amount', 'transactions.amount',
'transactions.native_amount', 'transactions.native_amount as pc_amount',
'transactions.foreign_amount', 'transactions.foreign_amount',
]) ])
->toArray() ->toArray()

View File

@@ -98,10 +98,10 @@ trait PeriodOverview
/** @var array $dates */ /** @var array $dates */
$dates = Navigation::blockPeriods($start, $end, $range); $dates = Navigation::blockPeriods($start, $end, $range);
$entries = []; $entries = [];
$spent = []; // $spent = [];
$earned = []; // $earned = [];
$transferredAway = []; // $transferredAway = [];
$transferredIn = []; // $transferredIn = [];
// run a custom query because doing this with the collector is MEGA slow. // run a custom query because doing this with the collector is MEGA slow.
$transactions = $this->accountRepository->periodCollection($account, $start, $end); $transactions = $this->accountRepository->periodCollection($account, $start, $end);
@@ -180,8 +180,8 @@ trait PeriodOverview
continue; continue;
} }
$filtered[] = $item;
} }
$filtered[] = $item;
} }
return [$filtered, $result]; return [$filtered, $result];

View File

@@ -12,7 +12,6 @@
<td style="text-align: right;">{{ period.total_transactions }}</td> <td style="text-align: right;">{{ period.total_transactions }}</td>
</tr> </tr>
{% endif %} {% endif %}
{% for entry in period.spent %} {% for entry in period.spent %}
{% if entry.amount != 0 %} {% if entry.amount != 0 %}
<tr> <tr>