mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Multi year was not visible.
This commit is contained in:
parent
3600e1b5e7
commit
8583b574ac
@ -35,15 +35,17 @@ class ReportGeneratorFactory
|
||||
public static function reportGenerator(string $type, Carbon $start, Carbon $end): ReportGeneratorInterface
|
||||
{
|
||||
$period = 'Month';
|
||||
// more than one year date difference means multi year report.
|
||||
if ($start->diffInMonths($end) > 12) {
|
||||
$period = 'MultiYear';
|
||||
}
|
||||
// more than two months date difference means year report.
|
||||
if ($start->diffInMonths($end) > 1) {
|
||||
$period = 'Year';
|
||||
}
|
||||
|
||||
// more than one year date difference means multi year report.
|
||||
if ($start->diffInMonths($end) > 12) {
|
||||
$period = 'MultiYear';
|
||||
}
|
||||
|
||||
|
||||
$class = sprintf('FireflyIII\Generator\Report\%s\%sReportGenerator', $type, $period);
|
||||
if (class_exists($class)) {
|
||||
/** @var ReportGeneratorInterface $obj */
|
||||
|
Loading…
Reference in New Issue
Block a user