mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
More moving stuff around.
This commit is contained in:
@@ -63,16 +63,16 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ARI $repository
|
||||
* @param Account $account
|
||||
* @param AccountCrudInterface $crud
|
||||
* @param Account $account
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return View
|
||||
*/
|
||||
public function delete(ARI $repository, Account $account)
|
||||
public function delete(AccountCrudInterface $crud, Account $account)
|
||||
{
|
||||
$typeName = config('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
$subTitle = trans('firefly.delete_' . $typeName . '_account', ['name' => $account->name]);
|
||||
$accountList = ExpandedForm::makeSelectListWithEmpty($repository->getAccountsByType([$account->accountType->type]));
|
||||
$accountList = ExpandedForm::makeSelectListWithEmpty($crud->getAccountsByType([$account->accountType->type]));
|
||||
unset($accountList[$account->id]);
|
||||
|
||||
// put previous url in session
|
||||
@@ -151,19 +151,19 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ARI $repository
|
||||
* @param $what
|
||||
* @param AccountCrudInterface $crud
|
||||
* @param string $what
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return View
|
||||
*/
|
||||
public function index(ARI $repository, string $what)
|
||||
public function index(AccountCrudInterface $crud, string $what)
|
||||
{
|
||||
$what = $what ?? 'asset';
|
||||
|
||||
$subTitle = trans('firefly.' . $what . '_accounts');
|
||||
$subTitleIcon = config('firefly.subIconsByIdentifier.' . $what);
|
||||
$types = config('firefly.accountTypesByIdentifier.' . $what);
|
||||
$accounts = $repository->getAccountsByType($types);
|
||||
$accounts = $crud->getAccountsByType($types);
|
||||
$start = clone session('start', Carbon::now()->startOfMonth());
|
||||
$end = clone session('end', Carbon::now()->endOfMonth());
|
||||
$start->subDay();
|
||||
|
@@ -7,11 +7,12 @@ use Amount;
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Requests\BudgetFormRequest;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\LimitRepetition;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
@@ -149,12 +150,11 @@ class BudgetController extends Controller
|
||||
|
||||
/**
|
||||
* @param BudgetRepositoryInterface $repository
|
||||
* @param AccountCrudInterface $crud
|
||||
*
|
||||
* @param ARI $accountRepository
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return View
|
||||
*/
|
||||
public function index(BudgetRepositoryInterface $repository, ARI $accountRepository)
|
||||
public function index(BudgetRepositoryInterface $repository, AccountCrudInterface $crud)
|
||||
{
|
||||
$budgets = $repository->getActiveBudgets();
|
||||
$inactive = $repository->getInactiveBudgets();
|
||||
@@ -176,10 +176,10 @@ class BudgetController extends Controller
|
||||
$period = Navigation::periodShow($start, $range);
|
||||
$periodStart = $start->formatLocalized($this->monthAndDayFormat);
|
||||
$periodEnd = $end->formatLocalized($this->monthAndDayFormat);
|
||||
$accounts = $accountRepository->getAccountsByType(['Default account', 'Asset account', 'Cash account']);
|
||||
$accounts = $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH]);
|
||||
$startAsString = $start->format('Y-m-d');
|
||||
$endAsString = $end->format('Y-m-d');
|
||||
|
||||
|
||||
// loop the budgets:
|
||||
/** @var Budget $budget */
|
||||
foreach ($budgets as $budget) {
|
||||
|
@@ -4,11 +4,11 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Http\Controllers\Chart;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||
use FireflyIII\Generator\Chart\Account\AccountChartGeneratorInterface;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Support\Collection;
|
||||
use Preferences;
|
||||
@@ -39,11 +39,11 @@ class AccountController extends Controller
|
||||
/**
|
||||
* Shows the balances for all the user's expense accounts.
|
||||
*
|
||||
* @param ARI $repository
|
||||
* @param AccountCrudInterface $crud
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function expenseAccounts(ARI $repository)
|
||||
public function expenseAccounts(AccountCrudInterface $crud)
|
||||
{
|
||||
$start = clone session('start', Carbon::now()->startOfMonth());
|
||||
$end = clone session('end', Carbon::now()->endOfMonth());
|
||||
@@ -55,7 +55,7 @@ class AccountController extends Controller
|
||||
if ($cache->has()) {
|
||||
return Response::json($cache->get());
|
||||
}
|
||||
$accounts = $repository->getAccountsByType(['Expense account', 'Beneficiary account']);
|
||||
$accounts = $crud->getAccountsByType([AccountType::EXPENSE, AccountType::BENEFICIARY]);
|
||||
|
||||
$start->subDay();
|
||||
$ids = $accounts->pluck('id')->toArray();
|
||||
@@ -88,11 +88,11 @@ class AccountController extends Controller
|
||||
/**
|
||||
* Shows the balances for all the user's frontpage accounts.
|
||||
*
|
||||
* @param ARI $repository
|
||||
* @param AccountCrudInterface $crud
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function frontpage(ARI $repository)
|
||||
public function frontpage(AccountCrudInterface $crud)
|
||||
{
|
||||
$start = clone session('start', Carbon::now()->startOfMonth());
|
||||
$end = clone session('end', Carbon::now()->endOfMonth());
|
||||
@@ -108,8 +108,8 @@ class AccountController extends Controller
|
||||
return Response::json($cache->get());
|
||||
}
|
||||
|
||||
$frontPage = Preferences::get('frontPageAccounts', $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray());
|
||||
$accounts = $repository->getAccountsById($frontPage->data);
|
||||
$frontPage = Preferences::get('frontPageAccounts', $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray());
|
||||
$accounts = $crud->getAccountsById($frontPage->data);
|
||||
|
||||
foreach ($accounts as $account) {
|
||||
$balances = [];
|
||||
|
@@ -4,11 +4,12 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use ExpandedForm;
|
||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Csv\Data;
|
||||
use FireflyIII\Helpers\Csv\Importer;
|
||||
use FireflyIII\Helpers\Csv\WizardInterface;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use Illuminate\Http\Request;
|
||||
use Input;
|
||||
use Log;
|
||||
@@ -158,11 +159,11 @@ class CsvController extends Controller
|
||||
*
|
||||
* STEP ONE
|
||||
*
|
||||
* @param ARI $repository
|
||||
* @param AccountCrudInterface $crud
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function index(ARI $repository)
|
||||
public function index(AccountCrudInterface $crud)
|
||||
{
|
||||
$subTitle = trans('firefly.csv_import');
|
||||
|
||||
@@ -190,7 +191,7 @@ class CsvController extends Controller
|
||||
];
|
||||
|
||||
// get a list of asset accounts:
|
||||
$accounts = ExpandedForm::makeSelectList($repository->getAccountsByType(['Asset account', 'Default account']));
|
||||
$accounts = ExpandedForm::makeSelectList($crud->getAccountsByType([AccountType::ASSET, AccountType::DEFAULT]));
|
||||
|
||||
// can actually upload?
|
||||
$uploadPossible = is_writable(storage_path('upload'));
|
||||
|
@@ -12,10 +12,12 @@ namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use ExpandedForm;
|
||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Export\Processor;
|
||||
use FireflyIII\Http\Requests;
|
||||
use FireflyIII\Http\Requests\ExportFormRequest;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\ExportJob;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Repositories\ExportJob\ExportJobRepositoryInterface as EJRI;
|
||||
@@ -86,13 +88,12 @@ class ExportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ARI $repository
|
||||
*
|
||||
* @param EJRI $jobs
|
||||
* @param AccountCrudInterface $crud
|
||||
* @param EJRI $jobs
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function index(ARI $repository, EJRI $jobs)
|
||||
public function index(AccountCrudInterface $crud, EJRI $jobs)
|
||||
{
|
||||
// create new export job.
|
||||
$job = $jobs->create();
|
||||
@@ -100,7 +101,7 @@ class ExportController extends Controller
|
||||
$jobs->cleanup();
|
||||
|
||||
// does the user have shared accounts?
|
||||
$accounts = $repository->getAccountsByType(['Default account', 'Asset account']);
|
||||
$accounts = $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]);
|
||||
$accountList = ExpandedForm::makeSelectList($accounts);
|
||||
$checked = array_keys($accountList);
|
||||
$formats = array_keys(config('firefly.export_formats'));
|
||||
|
@@ -4,6 +4,7 @@ namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Artisan;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\Tag;
|
||||
@@ -96,11 +97,12 @@ class HomeController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ARI $repository
|
||||
* @param ARI $repository
|
||||
* @param AccountCrudInterface $crud
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
|
||||
*/
|
||||
public function index(ARI $repository)
|
||||
public function index(ARI $repository, AccountCrudInterface $crud)
|
||||
{
|
||||
$types = config('firefly.accountTypesByIdentifier.asset');
|
||||
$count = $repository->countAccounts($types);
|
||||
@@ -114,14 +116,14 @@ class HomeController extends Controller
|
||||
$mainTitleIcon = 'fa-fire';
|
||||
$transactions = [];
|
||||
$frontPage = Preferences::get(
|
||||
'frontPageAccounts', $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray()
|
||||
'frontPageAccounts', $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray()
|
||||
);
|
||||
/** @var Carbon $start */
|
||||
$start = session('start', Carbon::now()->startOfMonth());
|
||||
/** @var Carbon $end */
|
||||
$end = session('end', Carbon::now()->endOfMonth());
|
||||
$showTour = Preferences::get('tour', true)->data;
|
||||
$accounts = $repository->getAccountsById($frontPage->data);
|
||||
$accounts = $crud->getAccountsById($frontPage->data);
|
||||
$savings = $repository->getSavingsAccounts($start, $end);
|
||||
$piggyBankAccounts = $repository->getPiggyBankAccounts($start, $end);
|
||||
|
||||
|
@@ -4,7 +4,9 @@ namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Amount;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface as CRI;
|
||||
@@ -85,11 +87,12 @@ class JsonController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ARI $accountRepository
|
||||
* @param ARI $accountRepository
|
||||
* @param AccountCrudInterface $crud
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function boxIn(ARI $accountRepository)
|
||||
public function boxIn(ARI $accountRepository, AccountCrudInterface $crud)
|
||||
{
|
||||
$start = session('start', Carbon::now()->startOfMonth());
|
||||
$end = session('end', Carbon::now()->endOfMonth());
|
||||
@@ -102,7 +105,7 @@ class JsonController extends Controller
|
||||
if ($cache->has()) {
|
||||
return Response::json($cache->get());
|
||||
}
|
||||
$accounts = $accountRepository->getAccountsByType(['Default account', 'Asset account', 'Cash account']);
|
||||
$accounts = $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH]);
|
||||
$amount = $accountRepository->earnedInPeriod($accounts, $start, $end);
|
||||
$data = ['box' => 'in', 'amount' => Amount::format($amount, false), 'amount_raw' => $amount];
|
||||
$cache->store($data);
|
||||
@@ -111,11 +114,12 @@ class JsonController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ARI $accountRepository
|
||||
* @param ARI $accountRepository
|
||||
* @param AccountCrudInterface $crud
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function boxOut(ARI $accountRepository)
|
||||
public function boxOut(ARI $accountRepository, AccountCrudInterface $crud)
|
||||
{
|
||||
$start = session('start', Carbon::now()->startOfMonth());
|
||||
$end = session('end', Carbon::now()->endOfMonth());
|
||||
@@ -129,7 +133,7 @@ class JsonController extends Controller
|
||||
return Response::json($cache->get());
|
||||
}
|
||||
|
||||
$accounts = $accountRepository->getAccountsByType(['Default account', 'Asset account', 'Cash account']);
|
||||
$accounts = $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH]);
|
||||
$amount = $accountRepository->spentInPeriod($accounts, $start, $end);
|
||||
|
||||
$data = ['box' => 'out', 'amount' => Amount::format($amount, false), 'amount_raw' => $amount];
|
||||
@@ -169,13 +173,13 @@ class JsonController extends Controller
|
||||
/**
|
||||
* Returns a JSON list of all beneficiaries.
|
||||
*
|
||||
* @param ARI $accountRepository
|
||||
* @param AccountCrudInterface $crud
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function expenseAccounts(ARI $accountRepository)
|
||||
public function expenseAccounts(AccountCrudInterface $crud)
|
||||
{
|
||||
$list = $accountRepository->getAccountsByType(['Expense account', 'Beneficiary account']);
|
||||
$list = $crud->getAccountsByType([AccountType::EXPENSE, AccountType::BENEFICIARY]);
|
||||
$return = [];
|
||||
foreach ($list as $entry) {
|
||||
$return[] = $entry->name;
|
||||
@@ -186,13 +190,13 @@ class JsonController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ARI $accountRepository
|
||||
* @param AccountCrudInterface $crud
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function revenueAccounts(ARI $accountRepository)
|
||||
public function revenueAccounts(AccountCrudInterface $crud)
|
||||
{
|
||||
$list = $accountRepository->getAccountsByType(['Revenue account']);
|
||||
$list = $crud->getAccountsByType([AccountType::REVENUE]);
|
||||
$return = [];
|
||||
foreach ($list as $entry) {
|
||||
$return[] = $entry->name;
|
||||
|
@@ -5,7 +5,9 @@ namespace FireflyIII\Http\Controllers;
|
||||
use Amount;
|
||||
use Carbon\Carbon;
|
||||
use ExpandedForm;
|
||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||
use FireflyIII\Http\Requests\PiggyBankFormRequest;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||
@@ -59,15 +61,15 @@ class PiggyBankController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ARI $repository
|
||||
* @param AccountCrudInterface $crud
|
||||
*
|
||||
* @return mixed
|
||||
* @return View
|
||||
*/
|
||||
public function create(ARI $repository)
|
||||
public function create(AccountCrudInterface $crud)
|
||||
{
|
||||
|
||||
$periods = config('firefly.piggy_bank_periods');
|
||||
$accounts = ExpandedForm::makeSelectList($repository->getAccountsByType(['Default account', 'Asset account']));
|
||||
$accounts = ExpandedForm::makeSelectList($crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]));
|
||||
$subTitle = trans('firefly.new_piggy_bank');
|
||||
$subTitleIcon = 'fa-plus';
|
||||
|
||||
@@ -117,16 +119,16 @@ class PiggyBankController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ARI $repository
|
||||
* @param PiggyBank $piggyBank
|
||||
* @param AccountCrudInterface $crud
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function edit(ARI $repository, PiggyBank $piggyBank)
|
||||
public function edit(AccountCrudInterface $crud, PiggyBank $piggyBank)
|
||||
{
|
||||
|
||||
$periods = config('firefly.piggy_bank_periods');
|
||||
$accounts = ExpandedForm::makeSelectList($repository->getAccountsByType(['Default account', 'Asset account']));
|
||||
$accounts = ExpandedForm::makeSelectList($crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]));
|
||||
$subTitle = trans('firefly.update_piggy_title', ['name' => $piggyBank->name]);
|
||||
$subTitleIcon = 'fa-pencil';
|
||||
$targetDate = null;
|
||||
|
@@ -3,8 +3,9 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Auth;
|
||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||
use FireflyIII\Http\Requests\TokenFormRequest;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use Input;
|
||||
use PragmaRX\Google2FA\Contracts\Google2FA;
|
||||
use Preferences;
|
||||
@@ -59,13 +60,13 @@ class PreferencesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ARI $repository
|
||||
* @param AccountCrudInterface $crud
|
||||
*
|
||||
* @return $this|\Illuminate\View\View
|
||||
* @return View
|
||||
*/
|
||||
public function index(ARI $repository)
|
||||
public function index(AccountCrudInterface $crud)
|
||||
{
|
||||
$accounts = $repository->getAccountsByType(['Default account', 'Asset account']);
|
||||
$accounts = $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]);
|
||||
$viewRangePref = Preferences::get('viewRange', '1M');
|
||||
$viewRange = $viewRangePref->data;
|
||||
$frontPageAccounts = Preferences::get('frontPageAccounts', []);
|
||||
|
@@ -4,12 +4,14 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Report\AccountReportHelperInterface;
|
||||
use FireflyIII\Helpers\Report\BalanceReportHelperInterface;
|
||||
use FireflyIII\Helpers\Report\BudgetReportHelperInterface;
|
||||
use FireflyIII\Helpers\Report\ReportHelperInterface;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
@@ -58,12 +60,11 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ARI $repository
|
||||
* @param AccountCrudInterface $crud
|
||||
*
|
||||
* @return View
|
||||
* @internal param ReportHelperInterface $helper
|
||||
*/
|
||||
public function index(ARI $repository)
|
||||
public function index(AccountCrudInterface $crud)
|
||||
{
|
||||
/** @var Carbon $start */
|
||||
$start = clone session('first');
|
||||
@@ -71,7 +72,7 @@ class ReportController extends Controller
|
||||
$customFiscalYear = Preferences::get('customFiscalYear', 0)->data;
|
||||
|
||||
// does the user have shared accounts?
|
||||
$accounts = $repository->getAccountsByType(['Default account', 'Asset account']);
|
||||
$accounts = $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]);
|
||||
// get id's for quick links:
|
||||
$accountIds = [];
|
||||
/** @var Account $account */
|
||||
|
@@ -6,9 +6,11 @@ namespace FireflyIII\Http\Controllers;
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use ExpandedForm;
|
||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||
use FireflyIII\Http\Requests\RuleGroupFormRequest;
|
||||
use FireflyIII\Http\Requests\SelectTransactionsRequest;
|
||||
use FireflyIII\Jobs\ExecuteRuleGroupOnExistingTransactions;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\RuleGroup;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||
@@ -168,17 +170,15 @@ class RuleGroupController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a form for the user to select a range of transactions to execute this rulegroup for
|
||||
*
|
||||
* @param AccountRepositoryInterface $repository
|
||||
* @param RuleGroup $ruleGroup
|
||||
* @param AccountCrudInterface $crud
|
||||
* @param RuleGroup $ruleGroup
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function selectTransactions(AccountRepositoryInterface $repository, RuleGroup $ruleGroup)
|
||||
public function selectTransactions(AccountCrudInterface $crud, RuleGroup $ruleGroup)
|
||||
{
|
||||
// does the user have shared accounts?
|
||||
$accounts = $repository->getAccountsByType(['Default account', 'Asset account']);
|
||||
$accounts = $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]);
|
||||
$accountList = ExpandedForm::makeSelectList($accounts);
|
||||
$checkedAccounts = array_keys($accountList);
|
||||
$first = session('first')->format('Y-m-d');
|
||||
|
@@ -11,7 +11,6 @@ declare(strict_types = 1);
|
||||
*/
|
||||
|
||||
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Http\Middleware;
|
||||
|
Reference in New Issue
Block a user