mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Updated query, lets see what happens [skip ci]
This commit is contained in:
parent
cac30f0b4c
commit
c2711023e2
@ -339,6 +339,8 @@ class ReportQuery implements ReportQueryInterface
|
|||||||
* Gets a list of expense accounts and the expenses therein, grouped by that expense account.
|
* Gets a list of expense accounts and the expenses therein, grouped by that expense account.
|
||||||
* This result excludes transfers to shared accounts which are expenses, technically.
|
* This result excludes transfers to shared accounts which are expenses, technically.
|
||||||
*
|
*
|
||||||
|
* So now it will include them!
|
||||||
|
*
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
@ -370,8 +372,22 @@ 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')
|
||||||
->where('transaction_types.type', 'Withdrawal')
|
->where(
|
||||||
->where('acm_from.data', '!=', '"sharedExpense"')
|
function ($query) {
|
||||||
|
$query->where(
|
||||||
|
function ($q) {
|
||||||
|
$q->where('transaction_types.type', 'Withdrawal');
|
||||||
|
$q->where('acm_from.data', '!=', '"sharedExpense"');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
$query->orWhere(
|
||||||
|
function ($q) {
|
||||||
|
$q->where('transaction_types.type', 'Transfer');
|
||||||
|
$q->where('acm_from.data', '=', '"sharedExpense"');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
)
|
||||||
->before($end)
|
->before($end)
|
||||||
->after($start)
|
->after($start)
|
||||||
->where('transaction_journals.user_id', \Auth::user()->id)
|
->where('transaction_journals.user_id', \Auth::user()->id)
|
||||||
|
Loading…
Reference in New Issue
Block a user