@foreach($totalsByCurrency ?? [] as $currency => $total)
Total ventas ({{ $currency }})

{{ number_format($total, 0, ',', '.') }} {{ $currency }}

@endforeach
{{-- ═══ TOOLBAR ═══ --}}
@if($filterPaymentMethod || $filterPlanId || $filterCountry || $filterInvitationTypeId || $filterEmail || $filterMonth || $filterCustomerType || $filterSeller) @endif
{{-- ═══ TABLE ═══ --}}
@if($payments->count() == 0)

No hay pagos registrados.

@endif @if($payments->count() > 0)
@foreach ($payments as $payment) @endforeach
Fecha Plan Método Cuenta Estado Monto Final Nombre Email Teléfono Tipo Cupón Precio Original Descuento Vendedor Acciones
{{ optional($payment->created_at)->format('d/m/Y H:i') }} {{ $payment->plan->name }} @if($payment->payment_method === 'checkout_bricks') Checkout Bricks @elseif($payment->payment_method === 'mercadopago') @if(str_contains($payment->description ?? '', 'Pago manual')) Link de pago @else Checkout Bricks @endif @elseif($payment->payment_method === 'stripe') Stripe @elseif($payment->payment_method === 'transferencia') Transferencia @else {{ ucfirst($payment->payment_method) }} @endif {{ optional($payment->companyAccount)->name ?? '-' }} @if($payment->success) @else @endif {{ number_format($payment->amount, 0) }} {{strtoupper($payment->currency)}} @php $customer = $payment->customer; $countryCode = strtoupper(optional($customer)->country ?? ''); $flag = ''; if ($countryCode && strlen($countryCode) === 2) { foreach (str_split($countryCode) as $c) { $flag .= '&#'.(ord($c) + 127397).';'; } } @endphp @if($flag) {!! $flag !!} {{ optional($customer)->name }} @else {{ optional($customer)->name }} @endif {{ optional($payment->customer)->email }} {{ optional($payment->customer)->phone }} @if($payment->invitation_type_id) {{ $payment->invitationType->name }} @else Business @endif @if($payment->cupon_codigo) {{ $payment->cupon_codigo }} @else - @endif @if($payment->monto_original) {{ number_format($payment->monto_original, 0) }} {{strtoupper($payment->currency)}} @else - @endif @if($payment->cupon_descuento) -{{ number_format($payment->cupon_descuento, 0) }} @else - @endif {{ $payment->seller ?? 'Sistema' }}
{{-- Ver invitación (solo para customers) --}} @if($payment->invitation_id) @endif {{-- Whatsapp --}} @if(optional($payment->customer)->phone) @endif {{-- Editar --}} {{-- Borrar --}}
@endif