Fixed missing chart data.

This commit is contained in:
James Cole
2016-12-23 15:52:05 +01:00
parent 315479fcd3
commit cde494d3ef
2 changed files with 3 additions and 3 deletions

View File

@@ -284,8 +284,8 @@ class BudgetController extends Controller
foreach (array_keys($periods) as $period) {
$label = $periods[$period];
$spent = isset($entries[$budget->id]['entries'][$period]) ? $entries[$budget->id]['entries'][$period] : '0';
$limit = isset($entries[$period]) ? $budgeted[$period] : 0;
$chartData[0]['entries'][$label] = bcmul($spent, '-1');
$limit = isset($budgeted[$period]) ? $budgeted[$period] : 0;
$chartData[0]['entries'][$label] = round(bcmul($spent, '-1'), 2);
$chartData[1]['entries'][$label] = $limit;
}