Compare commits

...

4 Commits

Author SHA1 Message Date
James Cole
8a3b7d7c1a Merge branch 'hotfix/3.7.2.3' 2016-02-06 04:37:29 +01:00
James Cole
87f14617cc Code fix for #172. 2016-02-06 04:37:18 +01:00
James Cole
9f24f765ea Fix in Javascript for #172. 2016-02-06 04:35:51 +01:00
James Cole
48c802e5cc New version. 2016-02-06 04:34:06 +01:00
4 changed files with 15 additions and 6 deletions

View File

@@ -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;

View File

@@ -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,

View File

@@ -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',
],
];

View File

@@ -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;
}