Fix is / is not already joined.

This commit is contained in:
James Cole
2016-03-02 12:52:36 +01:00
parent 6b277c5e67
commit ca32ae4561
3 changed files with 50 additions and 16 deletions

View File

@@ -115,13 +115,11 @@ class SingleCategoryRepository extends ComponentRepository implements SingleCate
{
$offset = $page > 0 ? $page * 50 : 0;
return $category->transactionjournals()->withRelevantData()->take(50)->offset($offset)
return $category->transactionjournals()->expanded()->take(50)->offset($offset)
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->get(
['transaction_journals.*']
);
->get(TransactionJournal::QUERYFIELDS);
}
@@ -140,13 +138,13 @@ class SingleCategoryRepository extends ComponentRepository implements SingleCate
return $category->transactionjournals()
->after($start)
->before($end)
->withRelevantData()->take(50)->offset($offset)
->expanded()
->take(50)
->offset($offset)
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->get(
['transaction_journals.*']
);
->get(TransactionJournal::QUERYFIELDS);
}