Skip to content

Firefly III: a personal finances manager

Move the start and end date for the fiscal date ranges to fiscal-start and fiscal-end respectively.

James Colece9445168c69
diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php
index c01cbc3266..e16f6974e9 100644
--- a/app/Helpers/Report/ReportHelper.php
+++ b/app/Helpers/Report/ReportHelper.php
@@ -174,18 +174,20 @@ class ReportHelper implements ReportHelperInterface
{
/** @var FiscalHelperInterface $fiscalHelper */
$fiscalHelper = app('FireflyIII\Helpers\FiscalHelperInterface');
- $start = clone $date;
- $end = Carbon::now();
- $months = [];
+ $start = clone $date;
+ $end = Carbon::now();
+ $months = [];
while ($start <= $end) {
$year = $fiscalHelper->endOfFiscalYear($start)->year;
if (!isset($months[$year])) {
$months[$year] = [
- 'start' => $fiscalHelper->startOfFiscalYear($start)->format('Y-m-d'),
- 'end' => $fiscalHelper->endOfFiscalYear($start)->format('Y-m-d'),
- 'months' => [],
+ 'start-fiscal' => $fiscalHelper->startOfFiscalYear($start)->format('Y-m-d'),
+ 'end-fiscal' => $fiscalHelper->endOfFiscalYear($start)->format('Y-m-d'),
+ 'start' => Carbon::createFromDate($year, 1, 1)->format('Y-m-d'),
+ 'end' => Carbon::createFromDate($year, 12, 31)->format('Y-m-d'),
+ 'months' => [],
];
}