Various bug fixes and code cleanup.

This commit is contained in:
James Cole
2022-12-31 06:57:05 +01:00
parent 2b9996b844
commit 27a576ae8a
27 changed files with 62 additions and 61 deletions

View File

@@ -54,7 +54,7 @@ class FrontpageController extends Controller
// percentage!
$pct = 0;
if (0 !== bccomp($piggyBank->targetamount, '0')) {
$pct = round(($amount / $piggyBank->targetamount) * 100);
$pct = (int)bcmul(bcdiv($amount, $piggyBank->targetamount), '100');
}
$entry = [