Merge pull request #7057 from firefly-iii/missing-indexes

Missing indexes
This commit is contained in:
James Cole
2023-02-19 10:52:24 +01:00
committed by GitHub
2 changed files with 16 additions and 11 deletions

View File

@@ -215,15 +215,19 @@ class IndexController extends Controller
// per period:
$division = [
'1Y' => '1',
'6M' => '2',
'3M' => '4',
'1M' => '12',
'1W' => '52.16',
'1D' => '365.24',
'YTD' => '1',
'QTD' => '4',
'MTD' => '12',
'1Y' => '1',
'6M' => '2',
'3M' => '4',
'1M' => '12',
'1W' => '52.16',
'1D' => '365.24',
'YTD' => '1',
'QTD' => '4',
'MTD' => '12',
'last7' => '52.16',
'last30' => '12',
'last90' => '4',
'last365' => '1',
];
$perPeriod = bcdiv($yearAmount, $division[$range]);

View File

@@ -193,8 +193,9 @@ class RecurrenceUpdateService
$originalCount = $recurrence->recurrenceRepetitions()->count();
if (1 === $originalCount) {
Log::debug('Return the first one');
return $recurrence->recurrenceRepetitions()->first();
/** @var RecurrenceRepetition $result */
$result = $recurrence->recurrenceRepetitions()->first();
return $result;
}
// find it:
$fields = [