diff --git a/app/Http/Controllers/Bill/IndexController.php b/app/Http/Controllers/Bill/IndexController.php index 20508339be..f8d43ca274 100644 --- a/app/Http/Controllers/Bill/IndexController.php +++ b/app/Http/Controllers/Bill/IndexController.php @@ -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]); diff --git a/app/Services/Internal/Update/RecurrenceUpdateService.php b/app/Services/Internal/Update/RecurrenceUpdateService.php index 896e25fdc0..ea6b8ce601 100644 --- a/app/Services/Internal/Update/RecurrenceUpdateService.php +++ b/app/Services/Internal/Update/RecurrenceUpdateService.php @@ -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 = [