Small query fix.

This commit is contained in:
James Cole 2015-12-11 11:32:22 +01:00
parent 7f19b6957a
commit 67fe35d564

View File

@ -301,7 +301,7 @@ class ReportQuery implements ReportQueryInterface
$query->orWhere(
function (Builder $q) {
$q->where('transaction_types.type', TransactionType::TRANSFER);
$q->where('acm_from.data', '=', '"sharedAsset"');
$q->where('acm_from.data', '=', '"sharedAsset"');
$q->where('acm_to.data', '!=', '"sharedAsset"');
}
);
@ -309,8 +309,7 @@ class ReportQuery implements ReportQueryInterface
);
// only include selected accounts.
$query->whereIn('acm_to.id', $ids);
$query->whereIn('ac_to.id', $ids);
$query->orderBy('transaction_journals.date');
// get everything