Fixed incorrect average of expectedAmount in active bills.

This commit is contained in:
Niek Haarman 2016-04-04 18:15:38 +02:00
parent 3be84d76ef
commit 11d59c8bd1

View File

@ -77,7 +77,7 @@ class BillRepository implements BillRepositoryInterface
->get( ->get(
[ [
'bills.*', 'bills.*',
DB::raw('(`bills`.`amount_min` + `bills`.`amount_max` / 2) as `expectedAmount`'), DB::raw('((`bills`.`amount_min` + `bills`.`amount_max`) / 2) as `expectedAmount`'),
] ]
)->sortBy('name'); )->sortBy('name');