mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-18 10:16:49 +00:00
This commit is contained in:
@@ -81,7 +81,7 @@ class SummaryBalanceGrouped
|
|||||||
|
|
||||||
public function groupData(): array
|
public function groupData(): array
|
||||||
{
|
{
|
||||||
\Log::debug('Now going to group data.');
|
Log::debug('Now going to group data.');
|
||||||
$return = [];
|
$return = [];
|
||||||
foreach ($this->keys as $key) {
|
foreach ($this->keys as $key) {
|
||||||
$title = match ($key) {
|
$title = match ($key) {
|
||||||
@@ -90,6 +90,8 @@ class SummaryBalanceGrouped
|
|||||||
'income' => 'earned',
|
'income' => 'earned',
|
||||||
default => 'something'
|
default => 'something'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
$return[] = [
|
$return[] = [
|
||||||
'key' => sprintf('%s-in-native', $title),
|
'key' => sprintf('%s-in-native', $title),
|
||||||
'value' => $this->amounts[$key]['native'] ?? '0',
|
'value' => $this->amounts[$key]['native'] ?? '0',
|
||||||
@@ -100,7 +102,7 @@ class SummaryBalanceGrouped
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
// loop 3: format amounts:
|
// loop 3: format amounts:
|
||||||
$currencyIds = array_keys($this->amounts[self::SUM]);
|
$currencyIds = array_keys($this->amounts[self::SUM] ?? []);
|
||||||
foreach ($currencyIds as $currencyId) {
|
foreach ($currencyIds as $currencyId) {
|
||||||
if ('native' === $currencyId) {
|
if ('native' === $currencyId) {
|
||||||
// skip native entries.
|
// skip native entries.
|
||||||
|
Reference in New Issue
Block a user