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

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")