Skip to content

Firefly III: a personal finances manager

Multi year was not visible.

James Cole8583b574ac67
diff --git a/app/Generator/Report/ReportGeneratorFactory.php b/app/Generator/Report/ReportGeneratorFactory.php
index d2ae6f9809..f5c1d4ef1e 100644
--- a/app/Generator/Report/ReportGeneratorFactory.php
+++ b/app/Generator/Report/ReportGeneratorFactory.php
@@ -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 */