Update some queries.

This commit is contained in:
James Cole 2015-12-13 20:41:35 +01:00
parent 659ca8be14
commit be056cea6b

View File

@ -134,8 +134,8 @@ class ReportQuery implements ReportQueryInterface
$query->orWhere(
function (Builder $q) use ($ids) {
$q->where('transaction_types.type', TransactionType::TRANSFER);
$q->whereIn('ac_from.id',$ids);
$q->whereNotIn('ac_to.id', $ids);
$q->whereNotIn('ac_from.id',$ids);
$q->whereIn('ac_to.id', $ids);
}
);
}
@ -208,8 +208,8 @@ class ReportQuery implements ReportQueryInterface
$query->orWhere(
function (Builder $q) use ($ids) {
$q->where('transaction_types.type', TransactionType::TRANSFER);
$q->whereNotIn('ac_from.id', $ids);
$q->whereIn('ac_to.id', $ids);
$q->whereIn('ac_from.id', $ids);
$q->whereNotIn('ac_to.id', $ids);
}
);
}