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