Skip to content

Firefly III: a personal finances manager

Fix a query.

James Cole7480dc4a190e
diff --git a/app/Helpers/Report/ReportQuery.php b/app/Helpers/Report/ReportQuery.php
index 48b88d6886..29240c06bc 100644
--- a/app/Helpers/Report/ReportQuery.php
+++ b/app/Helpers/Report/ReportQuery.php
@@ -360,16 +360,18 @@ class ReportQuery implements ReportQueryInterface
}
$query = $this->queryJournalsWithTransactions($start, $end);
+
+
$query->where(
function (Builder $query) {
$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('acm_from.data', '!=', '"sharedAsset"');
+ //$q->where('acm_from.data', '!=', '"sharedAsset"');
}
);
$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('acm_to.data', '=', '"sharedAsset"');
$q->where('acm_from.data', '!=', '"sharedAsset"');