mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Support multi-year, not implemented yet.
This commit is contained in:
parent
c4c4fbc34c
commit
d7746b3649
@ -166,12 +166,22 @@ class ReportController extends Controller
|
||||
return view('error')->with('message', 'End date cannot be before start date, silly!');
|
||||
}
|
||||
|
||||
// more than two months date difference means year report.
|
||||
if ($start->diffInMonths($end) > 1) {
|
||||
return $this->defaultYear($report_type, $start, $end, $accounts);
|
||||
}
|
||||
switch ($report_type) {
|
||||
default:
|
||||
case 'default':
|
||||
// more than one year date difference means year report.
|
||||
if ($start->diffInMonths($end) > 12) {
|
||||
return view('error')->with('message', 'No report yet for this time period.');
|
||||
// return $this->defaultMultiYear($report_type, $start, $end, $accounts);
|
||||
}
|
||||
// more than two months date difference means year report.
|
||||
if ($start->diffInMonths($end) > 1) {
|
||||
return $this->defaultYear($report_type, $start, $end, $accounts);
|
||||
}
|
||||
|
||||
return $this->defaultMonth($report_type, $start, $end, $accounts);
|
||||
return $this->defaultMonth($report_type, $start, $end, $accounts);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user