Allinea il conteggio clienti della dashboard alle società, non ai deal vinti.
CI / scan_ruby (push) Failing after 14m57s
CI / scan_js (push) Successful in 11m7s
CI / lint (push) Failing after 12m34s

Neumarkt aveva due opportunità WON e gonfiava banner e card a 3, mentre la lista Solo clienti mostra 2 società.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-16 07:52:03 +02:00
co-authored by Cursor
parent 3f7794959e
commit 47c4308815
5 changed files with 34 additions and 5 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ class SalesGoal < ApplicationRecord
case metric
when "customers_acquired"
opps.won.where(won_at: start_date.beginning_of_day..end_date.end_of_day).count
opps.won.where(won_at: start_date.beginning_of_day..end_date.end_of_day).distinct.count(:organization_id)
when "won_value"
opps.won.where(won_at: start_date.beginning_of_day..end_date.end_of_day).sum(:estimated_value).to_f
when "trials"