mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-08-26 13:17:30 -05:00
Improve report
This commit is contained in:
+1
-1
@@ -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
@@ -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'))),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user