Round credit

This commit is contained in:
Hillel Coren 2018-02-14 20:08:48 +02:00
parent 116bc07e9a
commit 52de9f028f

View File

@ -184,7 +184,7 @@ class AccountController extends BaseController
$days_total = $planDetails['paid']->diff($planDetails['expires'])->days;
$percent_used = $days_used / $days_total;
$credit = floatval($company->payment->amount) * (1 - $percent_used);
$credit = round(floatval($company->payment->amount) * (1 - $percent_used), 2);
}
if ($newPlan['price'] > $credit) {