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:
parent
3d8e1f2484
commit
a7ed025cd6
@ -266,6 +266,8 @@ class ReportQuery implements ReportQueryInterface
|
||||
)
|
||||
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id');
|
||||
if ($showSharedReports === false) {
|
||||
// only get deposits not to a shared account
|
||||
// and transfers to a shared account.
|
||||
$query->where(
|
||||
function ($query) {
|
||||
$query->where(
|
||||
@ -282,6 +284,9 @@ class ReportQuery implements ReportQueryInterface
|
||||
);
|
||||
}
|
||||
);
|
||||
} else {
|
||||
// any deposit is fine.
|
||||
$query->where('transaction_types.type', 'Deposit');
|
||||
}
|
||||
$query->before($end)->after($start)
|
||||
->where('transaction_journals.user_id', Auth::user()->id)
|
||||
|
Loading…
Reference in New Issue
Block a user