Expand query to catch all expenses.

This commit is contained in:
James Cole 2015-12-12 20:07:33 +01:00
parent a2ccbf7844
commit 9bd1503cb4

View File

@ -383,6 +383,14 @@ class ReportQuery implements ReportQueryInterface
$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"');
}
);
}
);