Skip to content

Firefly III: a personal finances manager

Fix query. [skip ci]

James Colec5fb734e4264
diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php
index 7a5495e338..8f2747edd8 100644
--- a/app/Repositories/Account/AccountRepository.php
+++ b/app/Repositories/Account/AccountRepository.php
@@ -207,6 +207,12 @@ class AccountRepository implements AccountRepositoryInterface
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
+ ->where(
+ function (Builder $q) use ($account) {
+ $q->where('destination.account_id', $account->id);
+ $q->orWhere('source.account_id', $account->id);
+ }
+ )
->take(10)
->get(TransactionJournal::QUERYFIELDS);