This commit is contained in:
James Cole
2016-12-19 20:36:28 +01:00
parent e2e54d342a
commit 9a309f32fa

View File

@@ -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) {