Restore old behavior

This commit is contained in:
James Cole
2024-03-17 12:00:28 +01:00
parent ab2772abe0
commit 3913fa5086
18 changed files with 51 additions and 51 deletions

View File

@@ -40,12 +40,12 @@ class ReportGeneratorFactory
{
$period = 'Month';
// more than two months date difference means year report.
if ($start->diffInMonths($end) > 1) {
if ($start->diffInMonths($end, true) > 1) {
$period = 'Year';
}
// more than one year date difference means multi year report.
if ($start->diffInMonths($end) > 12) {
// more than one year date difference means multi-year report.
if ($start->diffInMonths($end, true) > 12) {
$period = 'MultiYear';
}