Allinea il conteggio clienti della dashboard alle società, non ai deal vinti.
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user