mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-09 06:55:43 -06:00
Make fiscal year quick link optional.
This commit is contained in:
parent
a156dce281
commit
7f54b70c24
@ -5,6 +5,7 @@ use FireflyIII\Helpers\Report\ReportHelperInterface;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use Illuminate\Support\Collection;
|
||||
use Preferences;
|
||||
use Session;
|
||||
use View;
|
||||
|
||||
@ -166,8 +167,9 @@ class ReportController extends Controller
|
||||
*/
|
||||
public function index(ARI $repository)
|
||||
{
|
||||
$start = Session::get('first');
|
||||
$months = $this->helper->listOfMonths($start);
|
||||
$start = Session::get('first');
|
||||
$months = $this->helper->listOfMonths($start);
|
||||
$customFiscalYear = Preferences::get('customFiscalYear', 0)->data;
|
||||
|
||||
// does the user have shared accounts?
|
||||
$accounts = $repository->getAccounts(['Default account', 'Asset account']);
|
||||
@ -180,11 +182,7 @@ class ReportController extends Controller
|
||||
$accountList = join(',', $accountIds);
|
||||
|
||||
|
||||
return view(
|
||||
'reports.index', compact(
|
||||
'months', 'accounts', 'start', 'accountList'
|
||||
)
|
||||
);
|
||||
return view('reports.index', compact('months', 'accounts', 'start', 'accountList','customFiscalYear'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -108,6 +108,7 @@
|
||||
accountList
|
||||
]) }}">{{ 'report_this_year_quick'|_ }}</a>
|
||||
</li>
|
||||
{% if customFiscalYear == 1 %}
|
||||
<li>
|
||||
<a href="{{ route('reports.report',
|
||||
['default',
|
||||
@ -116,6 +117,7 @@
|
||||
accountList
|
||||
]) }}">{{ 'report_this_fiscal_year_quick'|_ }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{{ route('reports.report',
|
||||
['default',
|
||||
|
Loading…
Reference in New Issue
Block a user