Fix query. [skip ci]

This commit is contained in:
James Cole 2016-03-03 13:24:02 +01:00
parent d2c8475504
commit c5fb734e42

View File

@ -207,6 +207,12 @@ class AccountRepository implements AccountRepositoryInterface
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->where(
function (Builder $q) use ($account) {
$q->where('destination.account_id', $account->id);
$q->orWhere('source.account_id', $account->id);
}
)
->take(10)
->get(TransactionJournal::QUERYFIELDS);