From 48c802e5ccdf3b9ffea7ba01686d6ff6cb6b415b Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 6 Feb 2016 04:34:06 +0100 Subject: [PATCH 1/3] New version. --- config/firefly.php | 2 +- config/upgrade.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/firefly.php b/config/firefly.php index ee973d88af..303dec785b 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -2,7 +2,7 @@ return [ 'chart' => 'chartjs', - 'version' => '3.7.2.2', + 'version' => '3.7.2.3', 'index_periods' => ['1D', '1W', '1M', '3M', '6M', '1Y', 'custom'], 'budget_periods' => ['daily', 'weekly', 'monthly', 'quarterly', 'half-year', 'yearly'], 'csv_import_enabled' => true, diff --git a/config/upgrade.php b/config/upgrade.php index 70d40cc023..109125facd 100644 --- a/config/upgrade.php +++ b/config/upgrade.php @@ -20,5 +20,7 @@ return [ 'Please follow the instructions on the following page: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.7.0', '3.7.2.2' => 'Because of the upgrade to Laravel 5.2, several manual changes must be made to your Firefly III installation. ' . 'Please follow the instructions on the following page: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.7.0', + '3.7.2.3' => 'Because of the upgrade to Laravel 5.2, several manual changes must be made to your Firefly III installation. ' . + 'Please follow the instructions on the following page: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.7.0', ], ]; From 9f24f765eac01a9ea358570513326857a2e027d8 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 6 Feb 2016 04:35:51 +0100 Subject: [PATCH 2/3] Fix in Javascript for #172. --- public/js/reports/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/reports/index.js b/public/js/reports/index.js index c3c3a2b150..009be936b6 100644 --- a/public/js/reports/index.js +++ b/public/js/reports/index.js @@ -87,8 +87,8 @@ function preSelectDate(e) { "use strict"; var link = $(e.target); var picker = $('#inputDateRange').data('daterangepicker'); - picker.setStartDate(link.data('start')); - picker.setEndDate(link.data('end')); + picker.setStartDate(moment(link.data('start'), "YYYY-MM-DD")); + picker.setEndDate(moment(link.data('end'), "YYYY-MM-DD")); return false; } From 87f14617cc3d4857bf3795427adebc392ebda9c8 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 6 Feb 2016 04:37:18 +0100 Subject: [PATCH 3/3] Code fix for #172. --- app/Helpers/Report/ReportHelper.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index aafa134805..d964b1e170 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -175,10 +175,13 @@ class ReportHelper implements ReportHelperInterface /** @var FiscalHelperInterface $fiscalHelper */ $fiscalHelper = app('FireflyIII\Helpers\FiscalHelperInterface'); $start = clone $date; - $end = Carbon::now(); - $months = []; + $start->startOfMonth(); + $end = Carbon::now(); + $end->endOfMonth(); + $months = []; while ($start <= $end) { + // current year: $year = $fiscalHelper->endOfFiscalYear($start)->year; if (!isset($months[$year])) { @@ -193,6 +196,7 @@ class ReportHelper implements ReportHelperInterface $currentEnd = clone $start; $currentEnd->endOfMonth(); + $months[$year]['months'][] = [ 'formatted' => $start->formatLocalized('%B %Y'), 'start' => $start->format('Y-m-d'), @@ -200,7 +204,10 @@ class ReportHelper implements ReportHelperInterface 'month' => $start->month, 'year' => $year, ]; - $start->addMonth(); + + // to make the hop to the next month properly: + $start = clone $currentEnd; + $start->addDay(); } return $months;