mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 05:26:17 +00:00
Various code cleanup. [skip ci]
This commit is contained in:
@@ -129,12 +129,12 @@ class CategoryController extends Controller
|
||||
$report = [];
|
||||
/** @var Category $category */
|
||||
foreach ($categories as $category) {
|
||||
$spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $end);
|
||||
if (0 !== bccomp($spent, '0')) {
|
||||
$report[$category->id] = ['name' => $category->name, 'spent' => $spent, 'id' => $category->id];
|
||||
$spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $end);
|
||||
$earned = $repository->earnedInPeriod(new Collection([$category]), $accounts, $start, $end);
|
||||
if (0 !== bccomp($spent, '0') || 0 !== bccomp($earned, '0')) {
|
||||
$report[$category->id] = ['name' => $category->name, 'spent' => $spent, 'earned' => $earned, 'id' => $category->id];
|
||||
}
|
||||
}
|
||||
|
||||
// sort the result
|
||||
// Obtain a list of columns
|
||||
$sum = [];
|
||||
|
||||
Reference in New Issue
Block a user