mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-03 20:57:19 -06:00
Code for #2037
This commit is contained in:
parent
5a97bcb123
commit
cf307a00e1
@ -47,12 +47,20 @@ class Date implements BinderInterface
|
||||
$fiscalHelper = app(FiscalHelperInterface::class);
|
||||
|
||||
$magicWords = [
|
||||
'currentMonthStart' => Carbon::now()->startOfMonth(),
|
||||
'currentMonthEnd' => Carbon::now()->endOfMonth(),
|
||||
'currentYearStart' => Carbon::now()->startOfYear(),
|
||||
'currentYearEnd' => Carbon::now()->endOfYear(),
|
||||
'currentFiscalYearStart' => $fiscalHelper->startOfFiscalYear(Carbon::now()),
|
||||
'currentFiscalYearEnd' => $fiscalHelper->endOfFiscalYear(Carbon::now()),
|
||||
'currentMonthStart' => Carbon::now()->startOfMonth(),
|
||||
'currentMonthEnd' => Carbon::now()->endOfMonth(),
|
||||
'currentYearStart' => Carbon::now()->startOfYear(),
|
||||
'currentYearEnd' => Carbon::now()->endOfYear(),
|
||||
|
||||
'previousMonthStart' => Carbon::now()->startOfMonth()->subDay()->startOfMonth(),
|
||||
'previousMonthEnd' => Carbon::now()->startOfMonth()->subDay()->endOfMonth(),
|
||||
'previousYearStart' => Carbon::now()->startOfYear()->subDay()->startOfYear(),
|
||||
'previousYearEnd' => Carbon::now()->startOfYear()->subDay()->endOfYear(),
|
||||
|
||||
'currentFiscalYearStart' => $fiscalHelper->startOfFiscalYear(Carbon::now()),
|
||||
'currentFiscalYearEnd' => $fiscalHelper->endOfFiscalYear(Carbon::now()),
|
||||
'previousFiscalYearStart' => $fiscalHelper->startOfFiscalYear(Carbon::now())->subYear(),
|
||||
'previousFiscalYearEnd' => $fiscalHelper->endOfFiscalYear(Carbon::now())->subYear(),
|
||||
];
|
||||
if (isset($magicWords[$value])) {
|
||||
return $magicWords[$value];
|
||||
|
@ -953,9 +953,11 @@ return [
|
||||
'report_budget' => 'Budget report between :start and :end',
|
||||
'report_tag' => 'Tag report between :start and :end',
|
||||
'quick_link_reports' => 'Quick links',
|
||||
'quick_link_examples' => 'These are just some example links to get you started. Check out the help pages under the (?)-button for information on all reports and the magic words you can use.',
|
||||
'quick_link_default_report' => 'Default financial report',
|
||||
'quick_link_audit_report' => 'Transaction history overview',
|
||||
'report_this_month_quick' => 'Current month, all accounts',
|
||||
'report_last_month_quick' => 'Last month, all accounts',
|
||||
'report_this_year_quick' => 'Current year, all accounts',
|
||||
'report_this_fiscal_year_quick' => 'Current fiscal year, all accounts',
|
||||
'report_all_time_quick' => 'All-time, all accounts',
|
||||
|
@ -118,7 +118,9 @@
|
||||
<h3 class="box-title">{{ 'quick_link_reports'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<p>
|
||||
{{ 'quick_link_examples'|_ }}
|
||||
</p>
|
||||
<h4>{{ ('quick_link_default_report')|_ }}</h4>
|
||||
<ul>
|
||||
<li>
|
||||
@ -132,6 +134,9 @@
|
||||
<a href="{{ route('reports.report.default',[accountList, 'currentFiscalYearStart','currentFiscalYearEnd']) }}">{{ 'report_this_fiscal_year_quick'|_ }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{{ route('reports.report.default',[accountList, 'previousMonthStart','previousMonthEnd']) }}">{{ 'report_last_month_quick'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('reports.report.default',[accountList, start.format('Ymd'),'currentMonthEnd']) }}">{{ 'report_all_time_quick'|_ }}</a>
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user