Add empty statistic if necessary.

This commit is contained in:
James Cole
2025-09-26 06:06:43 +02:00
parent 4ec2fcdb8a
commit 69dfbda847

View File

@@ -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');
}
}
/**