From 43a4fd2ecb4e7cb054e46e4336ece097a0579141 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 6 Nov 2024 11:12:04 +0100 Subject: [PATCH] Fix https://github.com/firefly-iii/firefly-iii/issues/9427 --- app/Http/Controllers/Chart/CategoryController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index af3b0f8938..bef78246ba 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -151,6 +151,7 @@ class CategoryController extends Controller */ private function reportPeriodChart(Collection $accounts, Carbon $start, Carbon $end, ?Category $category): array { + $income = []; $expenses = []; $categoryId = 0; @@ -169,8 +170,8 @@ class CategoryController extends Controller $categoryId = $category->id; // this gives us all currencies $collection = new Collection([$category]); - $expenses = $opsRepository->listExpenses($start, $end, null, $collection); - $income = $opsRepository->listIncome($start, $end, null, $collection); + $expenses = $opsRepository->listExpenses($start, $end, $accounts, $collection); + $income = $opsRepository->listIncome($start, $end, $accounts, $collection); } $currencies = array_unique(array_merge(array_keys($income), array_keys($expenses))); $periods = app('navigation')->listOfPeriods($start, $end);