mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-04 05:06:37 +00:00
Fix a query.
This commit is contained in:
@@ -360,16 +360,18 @@ class ReportQuery implements ReportQueryInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$query = $this->queryJournalsWithTransactions($start, $end);
|
$query = $this->queryJournalsWithTransactions($start, $end);
|
||||||
|
|
||||||
|
|
||||||
$query->where(
|
$query->where(
|
||||||
function (Builder $query) {
|
function (Builder $query) {
|
||||||
$query->where(
|
$query->where(
|
||||||
function (Builder $q) { // only get withdrawals not from a shared account
|
function (Builder $q) { // only get withdrawals from any account:
|
||||||
$q->where('transaction_types.type', TransactionType::WITHDRAWAL);
|
$q->where('transaction_types.type', TransactionType::WITHDRAWAL);
|
||||||
$q->where('acm_from.data', '!=', '"sharedAsset"');
|
//$q->where('acm_from.data', '!=', '"sharedAsset"');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$query->orWhere(
|
$query->orWhere(
|
||||||
function (Builder $q) { // and transfers from a shared account.
|
function (Builder $q) { // and transfers from a shared account to a not-shared account.
|
||||||
$q->where('transaction_types.type', TransactionType::TRANSFER);
|
$q->where('transaction_types.type', TransactionType::TRANSFER);
|
||||||
$q->where('acm_to.data', '=', '"sharedAsset"');
|
$q->where('acm_to.data', '=', '"sharedAsset"');
|
||||||
$q->where('acm_from.data', '!=', '"sharedAsset"');
|
$q->where('acm_from.data', '!=', '"sharedAsset"');
|
||||||
|
|||||||
Reference in New Issue
Block a user