Skip to content

Firefly III: a personal finances manager

Make sure the wort things aren't broken.

James Cole609e911fd6d8
diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php
index e9067ff07f..a9fda5a1cd 100644
--- a/app/Support/Navigation.php
+++ b/app/Support/Navigation.php
@@ -582,6 +582,32 @@ class Navigation
return $date;
}
+ switch ($repeatFreq) {
+ default:
+ break;
+ case 'last7';
+ $date->subDays(7);
+ return $date;
+ case 'last30';
+ $date->subDays(30);
+ return $date;
+ case 'last90':
+ $date->subDays(90);
+ return $date;
+ case 'last365':
+ $date->subDays(365);
+ return $date;
+ case 'YTD':
+ $date->subYear();
+ return $date;
+ case 'QTD':
+ $date->subQuarter();
+ return $date;
+ case 'MTD':
+ $date->subMonth();
+ return $date;
+ }
+
throw new FireflyException(sprintf('Cannot do subtractPeriod for $repeat_freq "%s"', $repeatFreq));
}