mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-02 10:22:09 +00:00
Expand query to catch all expenses.
This commit is contained in:
@@ -383,6 +383,14 @@ class ReportQuery implements ReportQueryInterface
|
|||||||
$q->where('acm_from.data', '!=', '"sharedAsset"');
|
$q->where('acm_from.data', '!=', '"sharedAsset"');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
// OR transfers from a NOT shared account to a shared account.
|
||||||
|
$query->orWhere(
|
||||||
|
function (Builder $q) { // and transfers from a shared account to a not-shared account.
|
||||||
|
$q->where('transaction_types.type', TransactionType::TRANSFER);
|
||||||
|
$q->where('acm_to.data', '!=', '"sharedAsset"');
|
||||||
|
$q->where('acm_from.data', '=', '"sharedAsset"');
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user