From 69dfbda847f9d141bfe4bea391b99ea1728af090 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 26 Sep 2025 06:06:43 +0200 Subject: [PATCH] Add empty statistic if necessary. --- app/Support/Http/Controllers/PeriodOverview.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.php index 1dda34bf8d..1914b7ce0b 100644 --- a/app/Support/Http/Controllers/PeriodOverview.php +++ b/app/Support/Http/Controllers/PeriodOverview.php @@ -550,6 +550,9 @@ trait PeriodOverview foreach ($array as $entry) { $this->periodStatisticRepo->saveStatistic($account, $entry['currency_id'], $start, $end, $type, $entry['count'], $entry['amount']); } + if(0 === count($array)) { + $this->periodStatisticRepo->saveStatistic($account, $this->primaryCurrency->id, $start, $end, $type, 0, '0'); + } } /**