mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Overspent transactions have a separate colour [skip ci]
This commit is contained in:
@@ -149,7 +149,7 @@ class GoogleChartController extends Controller
|
|||||||
{
|
{
|
||||||
$chart->addColumn('Budget', 'string');
|
$chart->addColumn('Budget', 'string');
|
||||||
$chart->addColumn('Left', 'number');
|
$chart->addColumn('Left', 'number');
|
||||||
//$chart->addColumn('Spent', 'number');
|
$chart->addColumn('Overspent', 'number');
|
||||||
|
|
||||||
$budgets = $repository->getBudgets();
|
$budgets = $repository->getBudgets();
|
||||||
$start = Session::get('start', Carbon::now()->startOfMonth());
|
$start = Session::get('start', Carbon::now()->startOfMonth());
|
||||||
@@ -176,7 +176,12 @@ class GoogleChartController extends Controller
|
|||||||
foreach ($allEntries as $entry) {
|
foreach ($allEntries as $entry) {
|
||||||
if ($entry[2] > 0) {
|
if ($entry[2] > 0) {
|
||||||
$left = $entry[1] - $entry[2];
|
$left = $entry[1] - $entry[2];
|
||||||
$chart->addRow($entry[0], $left);
|
if ($left >= 0) {
|
||||||
|
$chart->addRow($entry[0], $left, null);
|
||||||
|
} else {
|
||||||
|
$chart->addRow($entry[0], null, $left);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user