@extends('admin.layouts.admin') @section('title', __('Demandes de paiement')) @section('content')
{{-- Header --}}

{{ __('Demandes de paiement') }}

{{ __('Retraits demandés par les affiliés') }}

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Stats --}}

{{ $stats['pending_count'] }}

{{ __('En attente') }}

{{ number_format($stats['pending_amount'], 2) }} {{ setting('currency_symbol', '€') }}

{{ number_format($stats['paid_total'], 2) }} {{ setting('currency_symbol', '€') }}

{{ __('Total payé') }}

{{-- Table --}}

{{ __('Demandes') }}

{{-- Filtre statut --}}
@forelse($withdrawals as $withdrawal) @empty @endforelse
# {{ __('Affilié') }} {{ __('Montant') }} {{ __('Méthode') }} {{ __('Référence') }} {{ __('Date demande') }} {{ __('Statut') }} {{ __('Actions') }}
#{{ $withdrawal->id }} {{ $withdrawal->affiliate->customer->firstname ?? '' }} {{ $withdrawal->affiliate->customer->lastname ?? ($withdrawal->affiliate->customer->name ?? '—') }} {{ $withdrawal->affiliate->customer->email ?? '' }} {{ number_format($withdrawal->amount, 2) }} {{ setting('currency_symbol', '€') }} @if($withdrawal->payment_method === 'balance') {{ __('Solde') }} @elseif($withdrawal->payment_method === 'paypal') PayPal @if($withdrawal->payment_details['paypal_email'] ?? null) {{ $withdrawal->payment_details['paypal_email'] }} @endif @elseif($withdrawal->payment_method === 'bank_transfer') {{ __('Virement') }} @if($withdrawal->payment_details['iban'] ?? null) {{ substr($withdrawal->payment_details['iban'], 0, 8) }}… @endif @endif @if($withdrawal->payment_reference) {{ $withdrawal->payment_reference }} @elseif($withdrawal->admin_note) {{ $withdrawal->admin_note }} @else — @endif {{ $withdrawal->created_at->format('d/m/Y') }} {{ $withdrawal->created_at->format('H:i') }} @if($withdrawal->status === 'pending') {{ __('En attente') }} @elseif($withdrawal->status === 'paid') {{ __('Payé') }} @if($withdrawal->paid_at) {{ $withdrawal->paid_at->format('d/m/Y') }} @endif @else {{ __('Rejeté') }} @endif @if($withdrawal->status === 'pending') @endif
{{ __('Aucune demande de paiement') }}
@if($withdrawals->hasPages())
{{ $withdrawals->links() }}
@endif
{{-- Modal Payer --}} {{-- Modal Rejeter --}} @endsection