mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Cleanup.
This commit is contained in:
@@ -46,18 +46,17 @@ class ReportController extends Controller
|
||||
$months = $this->helper->listOfMonths($start);
|
||||
|
||||
// does the user have shared accounts?
|
||||
$accounts = $repository->getAccounts(['Default account', 'Asset account']);
|
||||
$hasShared = false;
|
||||
|
||||
$accounts = $repository->getAccounts(['Default account', 'Asset account']);
|
||||
// get id's for quick links:
|
||||
$accountIds = [];
|
||||
/** @var Account $account */
|
||||
foreach ($accounts as $account) {
|
||||
if ($account->getMeta('accountRole') == 'sharedAsset') {
|
||||
$hasShared = true;
|
||||
}
|
||||
foreach($accounts as $account) {
|
||||
$accountIds [] = $account->id;
|
||||
}
|
||||
$accountList = join(',',$accountIds);
|
||||
|
||||
|
||||
return view('reports.index', compact('months', 'accounts', 'hasShared', 'start'));
|
||||
return view('reports.index', compact('months', 'accounts', 'start','accountList'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,7 +181,7 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
// lower threshold
|
||||
if($start < Session::get('first')) {
|
||||
if ($start < Session::get('first')) {
|
||||
$start = Session::get('first');
|
||||
}
|
||||
|
||||
@@ -192,12 +191,12 @@ class ReportController extends Controller
|
||||
|
||||
View::share(
|
||||
'subTitle', trans(
|
||||
'firefly.report_default',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat)
|
||||
]
|
||||
)
|
||||
'firefly.report_default',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat)
|
||||
]
|
||||
)
|
||||
);
|
||||
View::share('subTitleIcon', 'fa-calendar');
|
||||
|
||||
|
Reference in New Issue
Block a user