From 9a7ea06d66e39bd03333d78e8d5818aa7808b399 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 27 Feb 2015 11:58:49 +0100 Subject: [PATCH] Order budgets by name --- app/Helpers/Report/ReportQuery.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Helpers/Report/ReportQuery.php b/app/Helpers/Report/ReportQuery.php index f7b30c7e30..49250545d2 100644 --- a/app/Helpers/Report/ReportQuery.php +++ b/app/Helpers/Report/ReportQuery.php @@ -110,7 +110,7 @@ class ReportQuery implements ReportQueryInterface */ public function getAllAccounts(Carbon $start, Carbon $end) { - $set = Auth::user()->accounts()->orderBy('accounts.name','ASC') + $set = Auth::user()->accounts()->orderBy('accounts.name', 'ASC') ->accountTypeIn(['Default account', 'Asset account', 'Cash account']) ->leftJoin( 'account_meta', function (JoinClause $join) { @@ -162,7 +162,7 @@ class ReportQuery implements ReportQueryInterface ->where('transaction_journals.user_id', Auth::user()->id) ->where('transaction_types.type', 'Withdrawal') ->groupBy('budgets.id') - ->orderBy('budgets.id') + ->orderBy('budgets.name', 'ASC') ->get(['budgets.id', 'budgets.name', DB::Raw('SUM(`transactions`.`amount`) as `amount`')]); return $set;