mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 20:16:22 +00:00
Fix old category chart
This commit is contained in:
@@ -185,7 +185,9 @@ class CategoryController extends Controller
|
|||||||
/** @var Category $category */
|
/** @var Category $category */
|
||||||
foreach ($categories as $category) {
|
foreach ($categories as $category) {
|
||||||
$spentArray = $repository->spentInPeriodPerCurrency(new Collection([$category]), $accounts, $start, $end);
|
$spentArray = $repository->spentInPeriodPerCurrency(new Collection([$category]), $accounts, $start, $end);
|
||||||
foreach ($spentArray as $currencyId => $spent) {
|
foreach ($spentArray as $categoryId => $spentInfo) {
|
||||||
|
foreach($spentInfo['spent'] as $currencyId => $row) {
|
||||||
|
$spent= $row['spent'];
|
||||||
if (bccomp($spent, '0') === -1) {
|
if (bccomp($spent, '0') === -1) {
|
||||||
$currencies[$currencyId] = $currencies[$currencyId] ?? $currencyRepository->findNull((int)$currencyId);
|
$currencies[$currencyId] = $currencies[$currencyId] ?? $currencyRepository->findNull((int)$currencyId);
|
||||||
$tempData[] = [
|
$tempData[] = [
|
||||||
@@ -197,6 +199,7 @@ class CategoryController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// no category per currency:
|
// no category per currency:
|
||||||
$noCategory = $repository->spentInPeriodPcWoCategory(new Collection, $start, $end);
|
$noCategory = $repository->spentInPeriodPcWoCategory(new Collection, $start, $end);
|
||||||
foreach ($noCategory as $currencyId => $spent) {
|
foreach ($noCategory as $currencyId => $spent) {
|
||||||
|
Reference in New Issue
Block a user