Various code cleanup.

This commit is contained in:
James Cole
2016-11-20 11:43:19 +01:00
parent 75a524c656
commit 94875adb6c
60 changed files with 544 additions and 563 deletions

View File

@@ -299,16 +299,17 @@ class CategoryReportController extends Controller
/** @var Category $category */
foreach ($categories as $category) {
// get sum, and get label:
$categoryId = $category->id;
$data[$label]['name'][$categoryId] = $category->name;
$data[$label]['in'][$categoryId] = $income[$categoryId] ?? '0';
$data[$label]['out'][$categoryId] = $expenses[$categoryId] ?? '0';
$categoryId = $category->id;
$data[$label]['name'][$categoryId] = $category->name;
$data[$label]['in'][$categoryId] = $income[$categoryId] ?? '0';
$data[$label]['out'][$categoryId] = $expenses[$categoryId] ?? '0';
}
$current = Navigation::addPeriod($current, $period, 0);
}
$data = $this->generator->mainReportChart($data);
return Response::json($data);
}