Add missing key indexes.

This commit is contained in:
James Cole
2023-02-19 10:50:43 +01:00
parent b7c2576970
commit 84987dbe02
2 changed files with 16 additions and 11 deletions

View File

@@ -224,6 +224,10 @@ class IndexController extends Controller
'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 = [