Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Point to other library. [skip ci]
James Cole95f50ca2fdf3
diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.phpindex 7a6edd4ef2..46061cf368 100644--- a/app/Http/Controllers/TransactionController.php+++ b/app/Http/Controllers/TransactionController.php@@ -54,18 +54,18 @@ class TransactionController extends Controller*/public function create(string $what = TransactionType::DEPOSIT){- $accountRepository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');- $budgetRepository = app('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');- $piggyRepository = app('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface');- $what = strtolower($what);- $uploadSize = min(Steam::phpBytes(ini_get('upload_max_filesize')), Steam::phpBytes(ini_get('post_max_size')));- $assetAccounts = ExpandedForm::makeSelectList($accountRepository->getAccountsByType(['Default account', 'Asset account']));- $budgets = ExpandedForm::makeSelectListWithEmpty($budgetRepository->getActiveBudgets());- $piggyBanks = $piggyRepository->getPiggyBanksWithAmount();- $piggies = ExpandedForm::makeSelectListWithEmpty($piggyBanks);- $preFilled = Session::has('preFilled') ? session('preFilled') : [];- $subTitle = trans('form.add_new_' . $what);- $subTitleIcon = 'fa-plus';+ $crud = app('FireflyIII\Crud\Account\AccountCrudInterface');+ $budgetRepository = app('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');+ $piggyRepository = app('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface');+ $what = strtolower($what);+ $uploadSize = min(Steam::phpBytes(ini_get('upload_max_filesize')), Steam::phpBytes(ini_get('post_max_size')));+ $assetAccounts = ExpandedForm::makeSelectList($crud->getAccountsByType(['Default account', 'Asset account']));+ $budgets = ExpandedForm::makeSelectListWithEmpty($budgetRepository->getActiveBudgets());+ $piggyBanks = $piggyRepository->getPiggyBanksWithAmount();+ $piggies = ExpandedForm::makeSelectListWithEmpty($piggyBanks);+ $preFilled = Session::has('preFilled') ? session('preFilled') : [];+ $subTitle = trans('form.add_new_' . $what);+ $subTitleIcon = 'fa-plus';Session::put('preFilled', $preFilled);