mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-01 18:10:06 +00:00
Various code cleanup and sorting.
This commit is contained in:
@@ -67,8 +67,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac
|
||||
->transactionJournals()
|
||||
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
|
||||
->whereIn('transaction_types.type', $types)
|
||||
->get(['transaction_journals.*'])
|
||||
;
|
||||
->get(['transaction_journals.*']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,7 +101,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac
|
||||
*/
|
||||
public function getJournalTotal(TransactionJournal $journal): string
|
||||
{
|
||||
$cache = new CacheProperties();
|
||||
$cache = new CacheProperties();
|
||||
$cache->addProperty($journal->id);
|
||||
$cache->addProperty('amount-positive');
|
||||
if ($cache->has()) {
|
||||
@@ -151,8 +150,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac
|
||||
return new Carbon($cache->get());
|
||||
}
|
||||
$entry = TransactionJournalMeta::where('transaction_journal_id', $journalId)
|
||||
->where('name', $field)->first()
|
||||
;
|
||||
->where('name', $field)->first();
|
||||
if (null === $entry) {
|
||||
return null;
|
||||
}
|
||||
@@ -195,8 +193,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac
|
||||
public function searchJournalDescriptions(string $search, int $limit): Collection
|
||||
{
|
||||
$query = $this->user->transactionJournals()
|
||||
->orderBy('date', 'DESC')
|
||||
;
|
||||
->orderBy('date', 'DESC');
|
||||
if ('' !== $search) {
|
||||
$query->whereLike('description', sprintf('%%%s%%', $search));
|
||||
}
|
||||
|
Reference in New Issue
Block a user