Add some floatvals() just in case.

This commit is contained in:
James Cole 2014-11-22 23:37:03 +01:00
parent d8976379b1
commit cd44f51072

View File

@ -55,8 +55,8 @@ class RepeatedExpenseController extends BaseController
// number of bars:
$piggyBank->barCount = floor(12 / $piggyBank->parts);
$amountPerBar = $piggyBank->targetamount / $piggyBank->parts;
$currentAmount = $amountPerBar;
$amountPerBar = floatval($piggyBank->targetamount) / $piggyBank->parts;
$currentAmount = floatval($amountPerBar);
$bars = [];
$currentDate = clone $piggyBank->currentRep->startdate;
for ($i = 0; $i < $piggyBank->parts; $i++) {