From 11d59c8bd1e0507283cf259b44d1d2b9976fddab Mon Sep 17 00:00:00 2001 From: Niek Haarman Date: Mon, 4 Apr 2016 18:15:38 +0200 Subject: [PATCH] Fixed incorrect average of expectedAmount in active bills. --- app/Repositories/Bill/BillRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index 6eb28ea1d3..59b35ea087 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -77,7 +77,7 @@ class BillRepository implements BillRepositoryInterface ->get( [ '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');