@extends('layouts.app') @section('title', 'Mes paiements') @section('content')
← Retour

💰 Mes paiements

⚙️ Paramètres
{{-- Stats --}}

{{ number_format($totalEarnings, 2) }} €

Total gagné

@if(($internalBalance ?? 0) > 0)

dont {{ number_format($internalBalance, 2) }}€ TaPrestation

@endif

{{ number_format($thisMonthEarnings, 2) }} €

Ce mois-ci

{{ number_format($pendingAmount, 2) }} €

En attente

{{-- Balance interne TaPrestation --}} @if(($internalBalance ?? 0) > 0)
💰

{{ number_format($internalBalance, 2) }} €

Solde TaPrestation

Ventes urgentes, escrow confirmés

📋 Voir détails @php $minWithdrawal = (float) get_setting('min_withdrawal', '50'); $canWithdraw = $internalBalance >= $minWithdrawal && (auth()->user()->prestataire->stripe_account_id ?? null); @endphp
@if(!$canWithdraw && $internalBalance > 0)

@if(!(auth()->user()->prestataire->stripe_account_id ?? null)) Connectez Stripe pour retirer @else Min. {{ number_format($minWithdrawal, 2) }} € pour retirer @endif

@endif
{{-- Modale de retrait --}} @endif {{-- Info commission (compact) --}}

💡 Commission {{ $commissionRate }}% déduite automatiquement — montants affichés = gains nets.

{{-- Liste des paiements --}}

Historique des paiements

@if($payments->isEmpty())

Aucun paiement reçu pour le moment

Les paiements de vos clients apparaîtront ici

@else
@foreach($payments as $payment)
@if($payment->status === 'completed') ✓ @elseif($payment->status === 'pending') ⏳ @elseif($payment->status === 'refunded') ↩ @else € @endif

{{ $payment->description ?? 'Paiement' }}

{{ $payment->created_at->format('d/m/Y H:i') }}

+{{ number_format($payment->prestataire_amount ?? $payment->amount ?? 0, 2) }}€

@if($payment->status === 'completed') Payé @elseif($payment->status === 'pending') En attente @elseif($payment->status === 'refunded') Remboursé @else {{ ucfirst($payment->status ?? 'inconnu') }} @endif

@if(isset($payment->id) && is_numeric($payment->id)) @endif
@endforeach
@endif
{{-- Lien vers Stripe --}}
@endsection