mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 14:48:11 +00:00
Fix #2328
This commit is contained in:
@@ -172,6 +172,7 @@ class ReportController extends Controller
|
||||
$carbon = new Carbon($date);
|
||||
$label = $carbon->formatLocalized($format);
|
||||
$earned = $chartData[0]['entries'][$label] ?? '0';
|
||||
$amount = bcmul($amount, '-1');
|
||||
$chartData[0]['entries'][$label] = bcadd($earned, $amount);
|
||||
}
|
||||
foreach ($source['spent'] as $date => $amount) {
|
||||
@@ -223,6 +224,7 @@ class ReportController extends Controller
|
||||
'count_spent' => 0,
|
||||
];
|
||||
foreach ($source['earned'] as $amount) {
|
||||
$amount = bcmul($amount,'-1');
|
||||
$numbers['sum_earned'] = bcadd($amount, $numbers['sum_earned']);
|
||||
++$numbers['count_earned'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user