<%= render Goals::AvatarComponent.new(name: account.name, color: color, size: "sm") %>
- <%= rows.size > 1 ? "#{percent_for(row[:balance])}%" : "" %>
-
diff --git a/app/components/goals/funding_accounts_breakdown_component.rb b/app/components/goals/funding_accounts_breakdown_component.rb
index 6acb71518..91e54203e 100644
--- a/app/components/goals/funding_accounts_breakdown_component.rb
+++ b/app/components/goals/funding_accounts_breakdown_component.rb
@@ -70,6 +70,7 @@ class Goals::FundingAccountsBreakdownComponent < ApplicationComponent
.joins("INNER JOIN transactions ON transactions.id = entries.entryable_id AND entries.entryable_type = 'Transaction'")
.where(account_id: account_ids, date: TREND_WINDOW_DAYS.days.ago.to_date..Date.current)
.where(excluded: false)
+ .merge(Transaction.excluding_pending)
.pluck(:account_id, :date, :amount)
result = Hash.new { |h, k| h[k] = { last_30: 0.to_d, last_90: 0.to_d } }
diff --git a/app/models/family.rb b/app/models/family.rb
index c421b6ef7..a117f6cc8 100644
--- a/app/models/family.rb
+++ b/app/models/family.rb
@@ -71,6 +71,7 @@ class Family < ApplicationRecord
.joins("INNER JOIN transactions ON transactions.id = entries.entryable_id AND entries.entryable_type = 'Transaction'")
.where(account_id: account_ids, date: range)
.where(excluded: false)
+ .merge(Transaction.excluding_pending)
.sum(:amount)
-net.to_d
diff --git a/app/models/goal.rb b/app/models/goal.rb
index a0b23b946..a8e8beb62 100644
--- a/app/models/goal.rb
+++ b/app/models/goal.rb
@@ -129,6 +129,7 @@ class Goal < ApplicationRecord
.joins("INNER JOIN transactions ON transactions.id = entries.entryable_id AND entries.entryable_type = 'Transaction'")
.where(account_id: account_ids, date: 90.days.ago.to_date..Date.current)
.where(excluded: false)
+ .merge(Transaction.excluding_pending)
.sum(:amount)
(-net.to_d / 3).round(2)
end