mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
Add today as well. #1328
This commit is contained in:
@@ -105,6 +105,15 @@ class PiggyBankController extends Controller
|
|||||||
$chartData[$label] = $currentSum;
|
$chartData[$label] = $currentSum;
|
||||||
$oldest = app('navigation')->addPeriod($oldest, $step, 0);
|
$oldest = app('navigation')->addPeriod($oldest, $step, 0);
|
||||||
}
|
}
|
||||||
|
/** @var Collection $filtered */
|
||||||
|
$finalFiltered = $set->filter(
|
||||||
|
function (PiggyBankEvent $event) use ($today) {
|
||||||
|
return $event->date->lte($today);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
$finalSum = $filtered->sum('amount');
|
||||||
|
$finalLabel = $today->formatLocalized((string)trans('config.month_and_day'));
|
||||||
|
$chartData[$finalLabel] = $finalSum;
|
||||||
|
|
||||||
$data = $this->generator->singleSet($piggyBank->name, $chartData);
|
$data = $this->generator->singleSet($piggyBank->name, $chartData);
|
||||||
$cache->store($data);
|
$cache->store($data);
|
||||||
|
Reference in New Issue
Block a user