@if(session('success'))
{{ session('success') }}
@endif {{-- Hero Card --}}
Tu cobro

Mis Comisiones

Histórico de comisiones generadas. SET por leads convertidos + bonus eventuales.

${{ number_format($totals['pending'], 0) }}
Por cobrar
${{ number_format($totals['paid'], 0) }}
Cobrado
{{-- Alert si tiene comisiones por cobrar y NO cargó datos bancarios --}} @php $user = auth()->user(); $missingPaymentData = empty($user->payment_method) || empty($user->payment_method_value); $hasPending = ($totals['pending'] ?? 0) > 0; @endphp @if($missingPaymentData && $hasPending)
Cargá tus datos bancarios para cobrar

Tenés USD {{ number_format($totals['pending'], 0) }} pendientes pero todavía no cargaste cómo querés cobrar. CD necesita esa info para transferirte las comisiones.

Cargar datos bancarios
@endif {{-- ════════ Cards de totales acumulados ════════ --}}
USD {{ number_format($totals['pending'], 0) }}
Pendientes de cobro
USD {{ number_format($totals['paid'], 0) }}
Pagadas (acumulado)
USD {{ number_format($totals['this_month'], 0) }}
Este mes ({{ now()->translatedFormat('M Y') }})
USD {{ number_format($totals['this_year'], 0) }}
{{ now()->year }} · {{ $totals['count_total'] }} comisiones
{{-- ════════════════════════════════════════════════════════════════ OLA 7.7 — Deluxe metrics: Monthly chart + Tier mix + Próximos cobros ════════════════════════════════════════════════════════════════ --}}
{{-- Monthly chart 12 meses --}}
USD por mes — últimos 12
@if($monthDelta !== null) {{ $monthDelta >= 0 ? '↑' : '↓' }} {{ abs($monthDelta) }}% vs avg 3 meses @endif
@foreach(($commissionsMonthly['labels'] ?? []) as $lbl) {{ $lbl }} @endforeach
Este mes: ${{ number_format($thisMonth, 0) }} Avg 3-meses: ${{ number_format($avg3m, 0) }}
{{-- Tier breakdown (donut/bars) --}}
Mix por tier
@php $tierTotal = array_sum($tierBreakdown); $tierColors = ['T1' => 'success', 'T2' => 'primary', 'T3' => 'warning']; @endphp @if($tierTotal > 0) @foreach($tierBreakdown as $tier => $count) @php $pct = round(($count / $tierTotal) * 100); @endphp
{{ $tier }} {{ $count }} cierres {{ $pct }}%
@endforeach @else
Sin cierres por tier todavía
@endif
{{-- Próximos cobros (pending sin pagar) --}} @if($nextPayouts->isNotEmpty())

Próximos cobros

${{ number_format($nextPayouts->sum('amount_usd'), 0) }} USD pendiente
@foreach($nextPayouts as $p) @endforeach
Concepto Tipo USD Generado
#{{ $p->id }} @if($p->tenantProject)
{{ $p->tenantProject->project_name }}
@endif
{{ ucfirst($p->type) }} ${{ number_format($p->amount_usd, 0) }} {{ $p->created_at->diffForHumans() }}
@endif {{-- ════════ Filtros ════════ --}}
@if(request()->hasAny(['status','type','date_from','date_to'])) @endif

Comisiones

{{ $commissions->total() }} resultados
@if($commissions->isEmpty())

Todavía no generaste comisiones

Cuando un cierre atribuido a vos pase a active, se genera la comisión por cierre — T1 USD 30 · T2 USD 50 · T3 USD 80.

@else
@foreach($commissions as $c) @endforeach
Fecha Tipo Proyecto Tier Monto Estado
{{ $c->created_at->format('d/m/Y') }} {{ $c->type_label }}
{{ optional($c->tenantProject)->project_name ?? '—' }}
@if(optional($c->tenantProject)->domain) {{ $c->tenantProject->domain }} @endif
@if(optional($c->tenantProject)->tier) {{ $c->tenantProject->tier }} @else @endif USD {{ number_format($c->amount_usd, 2) }} {{ ucfirst($c->status) }} @if($c->paid_at)
pagado {{ $c->paid_at->format('d/m/Y') }}
@endif
{{ $commissions->links() }}
@endif