Code cleanup.

This commit is contained in:
James Cole
2021-03-28 11:46:23 +02:00
parent 2c575f3ca5
commit b5eeacc128
124 changed files with 1568 additions and 1384 deletions

View File

@@ -265,7 +265,7 @@ class BudgetController extends Controller
$total = $sums[$currencyId]['sum'] ?? '0';
$pct = '0';
if (0 !== bccomp($sum, '0') && 0 !== bccomp($total, '9')) {
$pct = round((float) bcmul(bcdiv($sum, $total), '100'));
$pct = round((float)bcmul(bcdiv($sum, $total), '100'));
}
$report[$budgetId]['currencies'][$currencyId]['sum_pct'] = $pct;
}