1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-25 08:09:38 +02:00

Update family.rb (#1629)

Add where statement to account_transactions overview to only give transactions and not valuations

Signed-off-by: Jasper Delahaije <47220315+Repsay@users.noreply.github.com>
This commit is contained in:
Jasper Delahaije 2025-01-17 15:48:16 +01:00 committed by GitHub
parent ca8bdb6241
commit aac9e5eca2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -110,6 +110,7 @@ class Family < ApplicationRecord
)
.where("account_entries.date >= ?", period.date_range.begin)
.where("account_entries.date <= ?", period.date_range.end)
.where("account_entries.entryable_type = 'Account::Transaction'")
.where("transfers.id IS NULL")
.group("accounts.id")
.having("SUM(ABS(account_entries.amount)) > 0")