@extends('layouts.dashboardnew') @section('content') {{-- ===================== HEADER + BOTÓN FILTROS (solo admin) ===================== --}}

Mi billetera

Movimientos, retiros y comisiones acumuladas en tu cuenta.

{{ count($wallets) }} movimientos
{{-- ===================== PANEL COLAPSABLE DE FILTRO ===================== --}}
@if(Auth::user()->rol_id == 0) @include('usuario.componentes.filtrounificado', ['ruta' => 'wallet-index', 'tipo1' => '1', 'tipo4' => '1']) @else @include('usuario.componentes.filtrounificado', ['ruta' => 'wallet-index', 'tipo1' => '1']) @endif
{{-- ===================== KPIs ===================== --}}
{{-- Billetera --}}
Billetera

@if ($moneda->mostrar_a_d) {{$moneda->simbolo}} {{ number_format(Auth::user()->wallet_amount, 2, ".", ",") }} @else {{ number_format(Auth::user()->wallet_amount, 2, ".", ",") }} {{$moneda->simbolo}} @endif

{{-- Retiros en espera --}}
Retiros en espera

@if ($moneda->mostrar_a_d) {{$moneda->simbolo}} {{ number_format(0, 2, ".", ",") }} @else {{ number_format(0, 2, ".", ",") }} {{$moneda->simbolo}} @endif

{{-- Total pagos aprobados --}}
Total pagos aprobados

@if ($moneda->mostrar_a_d) {{$moneda->simbolo}} {{ number_format($pagado, 2, ".", ",") }} @else {{ number_format($pagado, 2, ".", ",") }} {{$moneda->simbolo}} @endif

{{-- ===================== ACCIONES (solo usuario, no admin) ===================== --}} @if(Auth::user()->rol_id != 0)
Solicitar comisiones
Transferencia
@endif {{-- ===================== TABLA DE MOVIMIENTOS ===================== --}}
Historial de movimientos
@if (Auth::user()->rol_id == 0) @endif @foreach ($wallets as $wallet) {{-- ID --}} @if (Auth::user()->rol_id == 0) {{-- Usuario con avatar --}} @endif {{-- Fecha --}} {{-- Nivel --}} {{-- Descripción --}} {{-- Descuento --}} {{-- Ingreso (débito) --}} {{-- Retiro (crédito) --}} {{-- Balance --}} @endforeach
#UsuarioFecha Nivel Descripción Descuento Ingreso Retiro Balance
#{{$wallet->id}}
{{ strtoupper(substr($wallet->user->display_name, 0, 2)) }}
{{$wallet->user->display_name}}
{{date('d-m-Y', strtotime($wallet->date))}} {{ $wallet->nivel }} {{$wallet->descripcion}} @if($wallet->descuento > 0) - @if ($moneda->mostrar_a_d) {{$moneda->simbolo}} {{$wallet->descuento}} @else {{$wallet->descuento}} {{$moneda->simbolo}} @endif @else @if ($moneda->mostrar_a_d) {{$moneda->simbolo}} {{$wallet->descuento}} @else {{$wallet->descuento}} {{$moneda->simbolo}} @endif @endif @if($wallet->debito > 0) @if ($moneda->mostrar_a_d) {{$moneda->simbolo}} {{$wallet->debito}} @else {{$wallet->debito}} {{$moneda->simbolo}} @endif @else @endif @if($wallet->credito > 0) @if ($moneda->mostrar_a_d) {{$moneda->simbolo}} {{$wallet->credito}} @else {{$wallet->credito}} {{$moneda->simbolo}} @endif @else @endif @if ($moneda->mostrar_a_d) {{$moneda->simbolo}} {{$wallet->balance}} @else {{$wallet->balance}} {{$moneda->simbolo}} @endif
@endsection @include('usuario.componentes.scripBotones')