Various code fixes.

This commit is contained in:
James Cole
2022-10-31 05:53:36 +01:00
parent 0059ed7bde
commit 249b0c3377
88 changed files with 180 additions and 180 deletions

View File

@@ -178,7 +178,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
$current = $attachment->toArray();
$current['file_exists'] = true;
$current['notes'] = $repository->getNoteText($attachment);
$current['journal_title'] = $attachment->attachable->description;
$current['journal_title'] = $attachment->attachable->description;
$result[$journalId][] = $current;
}
@@ -197,11 +197,11 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
$return = [];
$journals = $group->transactionJournals->pluck('id')->toArray();
$set = TransactionJournalLink::where(
static function (Builder $q) use ($journals) {
$q->whereIn('source_id', $journals);
$q->orWhereIn('destination_id', $journals);
}
)
static function (Builder $q) use ($journals) {
$q->whereIn('source_id', $journals);
$q->orWhereIn('destination_id', $journals);
}
)
->with(['source', 'destination', 'source.transactions'])
->leftJoin('link_types', 'link_types.id', '=', 'journal_links.link_type_id')
->get(['journal_links.*', 'link_types.inward', 'link_types.outward', 'link_types.editable']);