{{-- ════════ EMBUDO ════════ --}}
Embudo de conversión
@php
$stages = [
['label' => 'Leads', 'n' => $funnel['pipeline_total'], 'icon' => 'fa-inbox', 'tone' => 'secondary', 'rate' => null],
['label' => 'Lanzados', 'n' => $funnel['launched'], 'icon' => 'fa-paper-plane', 'tone' => 'info', 'rate' => $funnel['rate_lead_launched']],
['label' => 'Contactados', 'n' => $funnel['contacted'], 'icon' => 'fa-comments', 'tone' => 'warning', 'rate' => $funnel['rate_launched_contacted']],
['label' => 'Pagando', 'n' => $funnel['converted'], 'icon' => 'fa-circle-dollar-to-slot', 'tone' => 'success', 'rate' => $funnel['rate_launched_paying']],
];
@endphp
@foreach($stages as $i => $s)
@if($i > 0)
{{ $s['rate'] }}%
@endif
{{ $s['n'] }}
{{ $s['label'] }}
@endforeach
{{-- ════════ DINERO (solo admin) ════════ --}}
Dinero
MRR (USD/mes)
${{ number_format($money['mrr'], 0) }}
{{ $money['paying_count'] }} clientes pagando · {{ $money['free_count'] }} free
Por motor (CD vs BP)
BP (producto)
${{ number_format($money['mrr_bp'], 0) }} · {{ $money['count_bp'] }}
CD (legacy)
${{ number_format($money['mrr_cd'], 0) }} · {{ $money['count_cd'] }}
@if($money['churn_count'] > 0)
{{ $money['churn_count'] }} churn/pausados
@endif
@if(($money['past_due_count'] ?? 0) > 0)
{{ $money['past_due_count'] }} en mora · ${{ number_format($money['mrr_at_risk'] ?? 0, 0) }}/mes en riesgo
@endif
Comisiones pendientes
${{ number_format($money['comm_pending'], 0) }}
por pagar a la red
Comisiones pagadas
${{ number_format($money['comm_paid'], 0) }}
histórico transferido
{{-- ════════ COBRANZAS / RENOVACIONES ════════ --}}
Cobranzas / Renovaciones
@php
$colBuckets = [
['key' => 'overdue', 'label' => 'Vencidas', 'tone' => 'danger', 'icon' => 'fa-circle-exclamation'],
['key' => 'this_week', 'label' => 'Esta semana', 'tone' => 'warning', 'icon' => 'fa-calendar-week'],
['key' => 'upcoming', 'label' => 'Próximas (30d)','tone' => 'info', 'icon' => 'fa-calendar-day'],
];
@endphp
@foreach($colBuckets as $b)
@php $items = $collections[$b['key']]; @endphp
{{ $b['label'] }}
{{ $items->count() }}
@forelse($items->take(6) as $p)
{{ $p->project_name }}
{{ $p->next_billing_date?->format('d/m') }} · ${{ number_format($p->monthlyMrrUsd(), 0) }}
@empty
—
@endforelse
@if($items->count() > 6)
+{{ $items->count() - 6 }} más
@endif
@endforeach
{{-- ════════ ATENCIÓN ════════ --}}
Requiere atención
@php
$att = [
['label' => 'Follow-ups vencidos', 'n' => $attention['followups_overdue'], 'tone' => 'danger', 'icon' => 'fa-bell', 'url' => route('reseller.missiles.index')],
['label' => 'Follow-ups hoy', 'n' => $attention['followups_today'], 'tone' => 'warning', 'icon' => 'fa-calendar-day', 'url' => route('reseller.missiles.index')],
['label' => 'Prep pendiente', 'n' => $attention['prep_pending'], 'tone' => 'warning', 'icon' => 'fa-palette', 'url' => route('reseller.missiles.index', ['prep' => 'awaiting'])],
['label' => 'Gracia por vencer', 'n' => $attention['grace_expiring'], 'tone' => 'danger', 'icon' => 'fa-hourglass-half','url' => route('reseller.activity', ['filter' => 'live'])],
['label' => 'Trials por vencer', 'n' => $attention['trials_ending'], 'tone' => 'info', 'icon' => 'fa-clock', 'url' => route('reseller.activity', ['filter' => 'live'])],
];
@endphp
@foreach($att as $a)
@endforeach
{{-- ════════ POR PRODUCTO ════════ --}}
Conversión por producto
| Producto |
Lanzados |
Convertidos |
Tasa |
MRR |
@forelse($byProduct as $slug => $row)
| {{ $slug }} |
{{ $row['total'] }} |
{{ $row['converted'] }} |
{{ $row['rate'] }}%
|
${{ number_format($row['mrr'], 0) }} |
@empty
| Sin misiles lanzados todavía. |
@endforelse
{{-- ════════ CLIENTES QUE PAGAN (revenue por cliente) ════════ --}}
Clientes que pagan ({{ $payingClients->count() }})
| Cliente |
Modelo |
Ciclo |
Monto período |
Método |
Próx. cobro |
MRR (USD) |
@forelse($payingClients as $c)
@php $modelTone = ['stripe'=>'success','manual'=>'info','legacy'=>'secondary'][$c->billing_model] ?? 'light'; @endphp
| {{ $c->project_name }} |
{{ $c->billing_model }} |
{{ $c->billing_cycle === 'annual' ? 'Anual' : 'Mensual' }} |
{{ $c->currency === 'ars' ? 'AR$' . number_format($c->amount_ars, 0) : '$' . number_format($c->amount_usd, 0) }} |
{{ $c->payment_method ?: '—' }} |
{{ $c->next_billing_date?->format('d/m/Y') ?: '—' }} |
${{ number_format($c->monthlyMrrUsd(), 0) }} |
@empty
| Sin clientes con facturación cargada todavía. Cargalos en /admin/tenants. |
@endforelse
@if($payingClients->isNotEmpty())
| Total MRR |
${{ number_format($money['mrr'], 0) }} |
@endif