mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-08 23:24:07 -06:00
Also add stuff not in budgets.
This commit is contained in:
parent
ab4f34a96b
commit
6d8f84654f
@ -169,6 +169,7 @@ class GoogleChartController extends BaseController
|
|||||||
foreach ($budgets as $budget) {
|
foreach ($budgets as $budget) {
|
||||||
$chart->addColumn($budget->name, 'number');
|
$chart->addColumn($budget->name, 'number');
|
||||||
}
|
}
|
||||||
|
$chart->addColumn('No budget','number');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Loop budgets this year.
|
* Loop budgets this year.
|
||||||
@ -182,6 +183,14 @@ class GoogleChartController extends BaseController
|
|||||||
$row[] = $bdt->spentInMonth($budget, $start);
|
$row[] = $bdt->spentInMonth($budget, $start);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Without a budget:
|
||||||
|
*/
|
||||||
|
$endOfMonth = clone $start;
|
||||||
|
$endOfMonth->endOfMonth();
|
||||||
|
$set = $bdt->transactionsWithoutBudgetInDateRange($start, $endOfMonth);
|
||||||
|
$row[] = floatval($set->sum('amount')) * -1;
|
||||||
|
|
||||||
$chart->addRowArray($row);
|
$chart->addRowArray($row);
|
||||||
$start->addMonth();
|
$start->addMonth();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user