Should fix query [skip ci]

This commit is contained in:
James Cole 2015-01-27 19:19:44 +01:00
parent c2711023e2
commit a2327c50ec

View File

@ -372,6 +372,7 @@ class ReportQuery implements ReportQueryInterface
} }
) )
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->where( ->where(
function ($query) { function ($query) {
$query->where( $query->where(
@ -383,11 +384,13 @@ class ReportQuery implements ReportQueryInterface
$query->orWhere( $query->orWhere(
function ($q) { function ($q) {
$q->where('transaction_types.type', 'Transfer'); $q->where('transaction_types.type', 'Transfer');
$q->where('acm_from.data', '=', '"sharedExpense"'); $q->where('acm_to.data', '=', '"sharedExpense"');
} }
); );
} }
) )
->before($end) ->before($end)
->after($start) ->after($start)
->where('transaction_journals.user_id', \Auth::user()->id) ->where('transaction_journals.user_id', \Auth::user()->id)