From 4838670649a2e48e5df0de095b39d885701ccaae Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 12 Dec 2015 20:13:07 +0100 Subject: [PATCH] Transfer fix. --- app/Helpers/Report/ReportQuery.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Helpers/Report/ReportQuery.php b/app/Helpers/Report/ReportQuery.php index 0b7b8a65cd..6775efa21d 100644 --- a/app/Helpers/Report/ReportQuery.php +++ b/app/Helpers/Report/ReportQuery.php @@ -367,7 +367,7 @@ class ReportQuery implements ReportQueryInterface $query = $this->queryJournalsWithTransactions($start, $end); // withdrawals from any account are an expense. - // transfers away, to an account not in the list, are an expense. + // transfers away, to an account not in the list, but shared, are an expense. $query->where( function (Builder $query) use ($ids) { @@ -380,6 +380,7 @@ class ReportQuery implements ReportQueryInterface function (Builder $q) use ($ids) { $q->where('transaction_types.type', TransactionType::TRANSFER); $q->whereNotIn('ac_to.id', $ids); + $q->where('acm_to.data', '=', '"sharedAsset"'); } ); }