mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 14:54:31 -04:00
Round credit
This commit is contained in:
parent
116bc07e9a
commit
52de9f028f
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user