From 2a4486a8dc0c8d1c1a12827f8c85752d6881295c Mon Sep 17 00:00:00 2001 From: Mirko Berger Date: Sat, 13 Mar 2021 17:25:04 +0100 Subject: [PATCH] Fixed typecast --- app/Http/Controllers/Bill/IndexController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Bill/IndexController.php b/app/Http/Controllers/Bill/IndexController.php index cf1dc14139..ab5c394c71 100644 --- a/app/Http/Controllers/Bill/IndexController.php +++ b/app/Http/Controllers/Bill/IndexController.php @@ -211,8 +211,8 @@ class IndexController extends Controller 'monthly' => '12', 'weekly' => '52.17', ]; - $yearAmount = bcmul($avg, bcdiv($multiplies[$bill['repeat_freq']], ''.($bill['skip'] + 1))); - Log::debug(sprintf('Amount per year is %s (%s * %s / %s)', $yearAmount, $avg, $multiplies[$bill['repeat_freq']], ''.($bill['skip'] + 1))); + $yearAmount = bcmul($avg, bcdiv($multiplies[$bill['repeat_freq']], (string)($bill['skip'] + 1))); + Log::debug(sprintf('Amount per year is %s (%s * %s / %s)', $yearAmount, $avg, $multiplies[$bill['repeat_freq']], (string)($bill['skip'] + 1))); // per period: $division = [