Auto commit for release 'branch-v6.2' on 2024-12-25

This commit is contained in:
github-actions
2024-12-25 07:13:41 +01:00
parent e73fe06f7e
commit e8cc321898
28 changed files with 713 additions and 626 deletions

View File

@@ -67,11 +67,11 @@ class FrontpageChartGenerator
public function generate(): array
{
Log::debug('Now in generate()');
$categories = $this->repository->getCategories();
$accounts = $this->accountRepos->getAccountsByType([AccountTypeEnum::DEBT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::ASSET->value, AccountTypeEnum::DEFAULT->value]);
$categories = $this->repository->getCategories();
$accounts = $this->accountRepos->getAccountsByType([AccountTypeEnum::DEBT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::ASSET->value, AccountTypeEnum::DEFAULT->value]);
// get expenses + income per category:
$collection = [];
$collection = [];
/** @var Category $category */
foreach ($categories as $category) {
@@ -82,10 +82,10 @@ class FrontpageChartGenerator
// collect for no-category:
$collection[] = $this->collectNoCatExpenses($accounts);
$tempData = array_merge(...$collection);
$tempData = array_merge(...$collection);
// sort temp array by amount.
$amounts = array_column($tempData, 'sum_float');
$amounts = array_column($tempData, 'sum_float');
array_multisort($amounts, SORT_ASC, $tempData);
$currencyData = $this->createCurrencyGroups($tempData);