From 9a309f32fa79674e8943574e9c53615078db260d Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 19 Dec 2016 20:36:28 +0100 Subject: [PATCH] This fixes #478 --- app/Support/Search/Search.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Support/Search/Search.php b/app/Support/Search/Search.php index a3da570829..f9a36ff572 100644 --- a/app/Support/Search/Search.php +++ b/app/Support/Search/Search.php @@ -16,6 +16,7 @@ namespace FireflyIII\Support\Search; use FireflyIII\Helpers\Collector\JournalCollector; use FireflyIII\Models\Account; +use FireflyIII\Models\AccountType; use FireflyIII\Models\Budget; use FireflyIII\Models\Category; use FireflyIII\Models\Tag; @@ -56,7 +57,9 @@ class Search implements SearchInterface */ public function searchAccounts(array $words): Collection { - $accounts = $this->user->accounts()->get(); + $accounts = $this->user->accounts() + ->accountTypeIn([AccountType::DEFAULT, AccountType::ASSET, AccountType::EXPENSE, AccountType::REVENUE, AccountType::BENEFICIARY]) + ->get(); /** @var Collection $result */ $result = $accounts->filter( function (Account $account) use ($words) {