Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Some cleaning up.
James Cole72f04aaedccf
diff --git a/README.md b/README.mdindex a65289f98f..5a0777ec10 100644--- a/README.md+++ b/README.md@@ -3,7 +3,6 @@ Firefly III (v3.2.5)[](https://travis-ci.org/JC5/firefly-iii)[](http://stillmaintained.com/JC5/firefly-iii)-[](https://coveralls.io/r/JC5/firefly-iii?branch=master)[](https://insight.sensiolabs.com/projects/d44c7012-5f50-41ad-add8-8445330e4102)[](https://codeclimate.com/github/JC5/firefly-iii)[](https://codeclimate.com/github/JC5/firefly-iii)diff --git a/app/lib/FireflyIII/Database/Account/Account.php b/app/lib/FireflyIII/Database/Account/Account.phpindex f450f293e2..816274cc49 100644--- a/app/lib/FireflyIII/Database/Account/Account.php+++ b/app/lib/FireflyIII/Database/Account/Account.php@@ -331,6 +331,7 @@ class Account implements CUDInterface, CommonDatabaseCallsInterface, AccountInte*/public function validate(array $model){+ $model['active'] = !isset($model['active']) ? false : $model['active'];$successes = new MessageBag;$account = new \Account($model);$account->isValid('form_input', false);diff --git a/app/lib/FireflyIII/Helper/TransactionJournal/Helper.php b/app/lib/FireflyIII/Helper/TransactionJournal/Helper.phpindex 90ef11060d..8c0c15a3bc 100644--- a/app/lib/FireflyIII/Helper/TransactionJournal/Helper.php+++ b/app/lib/FireflyIII/Helper/TransactionJournal/Helper.php@@ -40,7 +40,18 @@ class Helper implements HelperInterface/** @var \FireflyIII\Database\Account\Account $accountRepository */$accountRepository = \App::make('FireflyIII\Database\Account\Account');- return $accountRepository->getAccountsByType(['Default account', 'Asset account']);+ /** @var Collection $list */+ $list = $accountRepository->getAccountsByType(['Default account', 'Asset account']);+ $filtered = $list->filter(+ function (\Account $account) {+ if (intval($account->active) === 1) {+ return $account;+ }+ return null;+ }+ );++ return $filtered;}/**