From 50a3279b309ca0361aa95316be35ef449a8e5a2c Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 16 Sep 2016 11:04:24 +0200 Subject: [PATCH] MySQL 5.7 compatible query fixing. [skip ci] --- app/Repositories/Budget/BudgetRepository.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index a0fcf85387..e80bf2e1c9 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -259,6 +259,7 @@ class BudgetRepository implements BudgetRepositoryInterface $join->on('source.transaction_journal_id', '=', 'transaction_journals.id')->where('source.amount', '<', '0'); } ) + ->groupBy(['source.account_id']) ->whereIn('budget_transaction.budget_id', $budgets->pluck('id')->toArray()); if (count($accountIds) > 0) { @@ -325,6 +326,7 @@ class BudgetRepository implements BudgetRepositoryInterface return true; } } + return false; } );