From 262d4f92d43ff5810f15a5fdd399575deb3eb79f Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 1 Mar 2015 10:55:20 +0100 Subject: [PATCH] Fixed a bug where consecutive payments from one source would not be summed up. --- app/Helpers/Report/ReportQuery.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Helpers/Report/ReportQuery.php b/app/Helpers/Report/ReportQuery.php index fc26592564..3992719f89 100644 --- a/app/Helpers/Report/ReportQuery.php +++ b/app/Helpers/Report/ReportQuery.php @@ -230,7 +230,9 @@ class ReportQuery implements ReportQueryInterface 'transaction_journals.description', 'transaction_journals.encrypted', 'transaction_types.type', - 't_to.amount', 'transaction_journals.date', 't_from.account_id as account_id', + DB::Raw('SUM(`t_to`.`amount`) as `amount`'), + 'transaction_journals.date', + 't_from.account_id as account_id', 'ac_from.name as name'] ); }