mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Code clean up.
This commit is contained in:
@@ -86,13 +86,14 @@ class JournalTasker implements JournalTaskerInterface
|
||||
$set = $journal
|
||||
->transactions()// "source"
|
||||
->leftJoin(
|
||||
'transactions as destination', function (JoinClause $join) {
|
||||
$join
|
||||
'transactions as destination',
|
||||
function (JoinClause $join) {
|
||||
$join
|
||||
->on('transactions.transaction_journal_id', '=', 'destination.transaction_journal_id')
|
||||
->where('transactions.amount', '=', DB::raw('destination.amount * -1'))
|
||||
->where('transactions.identifier', '=', DB::raw('destination.identifier'))
|
||||
->whereNull('destination.deleted_at');
|
||||
}
|
||||
}
|
||||
)
|
||||
->with(['budgets', 'categories'])
|
||||
->leftJoin('accounts as source_accounts', 'transactions.account_id', '=', 'source_accounts.id')
|
||||
|
||||
Reference in New Issue
Block a user