Fixed some math things.

This commit is contained in:
James Cole
2015-07-26 19:42:28 +02:00
parent eef28d96f4
commit e211c9812e
9 changed files with 28 additions and 18 deletions

View File

@@ -161,7 +161,7 @@ class JsonController extends Controller
}
/** @var Bill $entry */
foreach ($unpaid as $entry) {
$current = ($entry[0]->amount_max + $entry[0]->amount_min) / 2;
$current = bcdiv(bcadd($entry[0]->amount_max, $entry[0]->amount_min), 2);
$amount = bcadd($amount, $current);
}