mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-27 17:31:09 -06:00
Fine tune query.
This commit is contained in:
parent
2396b75e3c
commit
c38c9608da
@ -416,6 +416,8 @@ class ReportQuery implements ReportQueryInterface
|
||||
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id');
|
||||
|
||||
if ($showSharedReports === false) {
|
||||
// get all withdrawals not from a shared accounts
|
||||
// and all transfers to a shared account
|
||||
$query->where(
|
||||
function ($query) {
|
||||
$query->where(
|
||||
@ -432,6 +434,9 @@ class ReportQuery implements ReportQueryInterface
|
||||
);
|
||||
}
|
||||
);
|
||||
} else {
|
||||
// any withdrawal goes:
|
||||
$query->where('transaction_types.type', 'Withdrawal');
|
||||
}
|
||||
$query->before($end)
|
||||
->after($start)
|
||||
|
Loading…
Reference in New Issue
Block a user