Improve report

This commit is contained in:
Sander Dorigo
2026-08-04 11:16:39 +02:00
parent 16d4005c38
commit 452be7d958
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ PGSQL_SSL_CRL_FILE=null
PGSQL_SCHEMA=public
# If you're looking for performance improvements, you could install memcached or redis
CACHE_DRIVER=file
CACHE_STORE=file
SESSION_DRIVER=file
# If you set either of the options above to 'redis', you might want to update these settings too
@@ -292,7 +292,7 @@ class BudgetReportGenerator
$limitId = $limit->id;
$limitCurrency = $limit->transactionCurrency ?? $this->currency;
$currencyId = $limitCurrency->id;
$expenses = $this->opsRepository->sumExpenses($limit->start_date, $limit->end_date, $this->accounts, new Collection()->push($budget));
$expenses = $this->opsRepository->sumExpenses($this->start, $this->end, $this->accounts, new Collection()->push($budget));
$spent = $expenses[$currencyId]['sum'] ?? '0';
$left = -1 === bccomp(bcadd($limit->amount, $spent), '0') ? '0' : bcadd($limit->amount, $spent);
$overspent = 1 === bccomp(bcmul($spent, '-1'), $limit->amount) ? bcadd($spent, $limit->amount) : '0';
+1 -1
View File
@@ -36,7 +36,7 @@ return [
|
*/
'default' => env_default_when_empty(env('CACHE_DRIVER'), 'file'),
'default' => env_default_when_empty(env('CACHE_STORE', env('CACHE_DRIVER', 'file'))),
/*
|--------------------------------------------------------------------------