fix: alinear KPIs BPS al milímetro con Ads Manager y Clientify Online

Meta solo cuenta registration leads; Google guarda fracciones y redondea al sumar; ventas CRM usan pipeline Online con importe > 0.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
4Ventures
2026-09-28 12:10:09 +02:00
parent 4c8042aa23
commit 48fb31d247
9 changed files with 311 additions and 62 deletions

View File

@@ -138,7 +138,7 @@ async function fetchWonDeals(
tenantId: string | null,
useServiceRole: boolean
): Promise<DealWonRow[]> {
const select = 'amount,won_at,stage,tenant_id';
const select = 'amount,won_at,stage,tenant_id,pipeline_id,pipeline_name';
const pageSize = 1000;
const out: DealWonRow[] = [];