mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Make sure the month chart can show the spent / earned.
This commit is contained in:
parent
968ec0853f
commit
cb985f5897
@ -147,8 +147,13 @@ class CategoryController extends Controller
|
|||||||
|
|
||||||
while ($start <= $end) {
|
while ($start <= $end) {
|
||||||
$spent = $repository->spentOnDaySumCorrected($category, $start);
|
$spent = $repository->spentOnDaySumCorrected($category, $start);
|
||||||
|
$earned = 0;
|
||||||
|
if ($spent < 0) {
|
||||||
|
$earned = $spent * -1;
|
||||||
|
$spent = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$entries->push([clone $start, $spent, 0]);
|
$entries->push([clone $start, $spent, $earned]);
|
||||||
$start->addDay();
|
$start->addDay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user