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