mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Sharper spent in period. [skip ci]
This commit is contained in:
parent
c4818334e7
commit
480e70dfac
@ -127,9 +127,14 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
$join->on('destination.transaction_journal_id', '=', 'transaction_journals.id')->where('destination.amount', '>', 0);
|
$join->on('destination.transaction_journal_id', '=', 'transaction_journals.id')->where('destination.amount', '>', 0);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
$query->leftJoin(
|
||||||
|
'transactions as source', function (JoinClause $join) {
|
||||||
|
$join->on('source.transaction_journal_id', '=', 'transaction_journals.id')->where('source.amount', '<', 0);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// should this not be a XOR query?
|
|
||||||
$query->whereIn('destination.account_id', $accountIds);
|
$query->whereIn('destination.account_id', $accountIds);
|
||||||
|
$query->whereNotIn('source.account_id', $accountIds);
|
||||||
|
|
||||||
}
|
}
|
||||||
// remove group by
|
// remove group by
|
||||||
|
Loading…
Reference in New Issue
Block a user