mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Fix round() calls for PHP 8.0
This commit is contained in:
@@ -310,10 +310,10 @@ class BudgetReportGenerator
|
||||
$budgetedPct = '0';
|
||||
|
||||
if (0 !== bccomp($spent, '0') && 0 !== bccomp($totalSpent, '0')) {
|
||||
$spentPct = round(bcmul(bcdiv($spent, $totalSpent), '100'));
|
||||
$spentPct = round((float) bcmul(bcdiv($spent, $totalSpent), '100'));
|
||||
}
|
||||
if (0 !== bccomp($budgeted, '0') && 0 !== bccomp($totalBudgeted, '0')) {
|
||||
$budgetedPct = round(bcmul(bcdiv($budgeted, $totalBudgeted), '100'));
|
||||
$budgetedPct = round((float) bcmul(bcdiv($budgeted, $totalBudgeted), '100'));
|
||||
}
|
||||
$this->report['sums'][$currencyId]['budgeted'] = $this->report['sums'][$currencyId]['budgeted'] ?? '0';
|
||||
$this->report['budgets'][$budgetId]['budget_limits'][$limitId]['spent_pct'] = $spentPct;
|
||||
|
Reference in New Issue
Block a user