mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Fixed missing chart data.
This commit is contained in:
@@ -284,8 +284,8 @@ class BudgetController extends Controller
|
|||||||
foreach (array_keys($periods) as $period) {
|
foreach (array_keys($periods) as $period) {
|
||||||
$label = $periods[$period];
|
$label = $periods[$period];
|
||||||
$spent = isset($entries[$budget->id]['entries'][$period]) ? $entries[$budget->id]['entries'][$period] : '0';
|
$spent = isset($entries[$budget->id]['entries'][$period]) ? $entries[$budget->id]['entries'][$period] : '0';
|
||||||
$limit = isset($entries[$period]) ? $budgeted[$period] : 0;
|
$limit = isset($budgeted[$period]) ? $budgeted[$period] : 0;
|
||||||
$chartData[0]['entries'][$label] = bcmul($spent, '-1');
|
$chartData[0]['entries'][$label] = round(bcmul($spent, '-1'), 2);
|
||||||
$chartData[1]['entries'][$label] = $limit;
|
$chartData[1]['entries'][$label] = $limit;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -218,7 +218,7 @@ class BudgetReportController extends Controller
|
|||||||
|
|
||||||
/** @var Budget $budget */
|
/** @var Budget $budget */
|
||||||
foreach ($budgets as $budget) {
|
foreach ($budgets as $budget) {
|
||||||
$chartData[$budget->id]['entries'][$label] = $expenses[$budget->id] ?? '0';
|
$chartData[$budget->id]['entries'][$label] = round(($expenses[$budget->id] ?? '0'), 2);
|
||||||
}
|
}
|
||||||
$currentStart = clone $currentEnd;
|
$currentStart = clone $currentEnd;
|
||||||
$currentStart->addDay();
|
$currentStart->addDay();
|
||||||
|
Reference in New Issue
Block a user