From aac9e5eca2ec3ceb48140117a2a6cfbbc5e0313e Mon Sep 17 00:00:00 2001 From: Jasper Delahaije <47220315+Repsay@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:48:16 +0100 Subject: [PATCH] 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> --- app/models/family.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/family.rb b/app/models/family.rb index 8649cea1..fef014fe 100644 --- a/app/models/family.rb +++ b/app/models/family.rb @@ -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")