@extends('layouts.admin-modern') @section('title', 'Tableau de bord financier') @section('page-title', 'Finance') @section('content')

Revenu total

{{ number_format($stats['total_revenue'] ?? 0, 2) }} €

Aujourd'hui

{{ number_format($stats['revenue_today'] ?? 0, 2) }} €

Ce mois

{{ number_format($stats['revenue_month'] ?? 0, 2) }} €

Commissions

{{ number_format($stats['total_commissions'] ?? 0, 2) }} €

Retraits en attente

{{ number_format($stats['pending_withdrawals'] ?? 0, 2) }} €

Remboursements en attente

{{ number_format($stats['pending_refunds'] ?? 0, 2) }} €

Solde prestataires

{{ number_format($stats['total_prestataires_balance'] ?? 0, 2) }} €

Escrow en cours

{{ number_format($stats['escrow_held'] ?? 0, 2) }} €

🔒 Paiements sécurisés (Escrow)

{{ $escrowStats['held_count'] ?? 0 }}

En attente confirmation

{{ number_format($escrowStats['held_amount'] ?? 0, 2) }} €

{{ $escrowStats['partial_count'] ?? 0 }}

Confirmation partielle

{{ number_format($escrowStats['partial_amount'] ?? 0, 2) }} €

{{ $escrowStats['released_count'] ?? 0 }}

Libérés

{{ number_format($escrowStats['released_amount'] ?? 0, 2) }} €

{{ $escrowStats['pending_transfer_count'] ?? 0 }}

⚠️ Transfers en attente

{{ number_format($escrowStats['pending_transfer_amount'] ?? 0, 2) }} €

@if(($escrowStats['pending_transfer_count'] ?? 0) > 0)

Attention : {{ $escrowStats['pending_transfer_count'] }} transfers Stripe en attente

Ces escrows ont été confirmés mais le transfer Stripe n'a pas été effectué (fonds insuffisants sur le compte plateforme).

@endif @if(isset($recentEscrows) && count($recentEscrows) > 0)
@foreach($recentEscrows as $escrow) @endforeach
ID Type Client Prestataire Montant Prestataire € Statut Transfer Date
#{{ $escrow->id }} @php $type = str_replace('App\\Models\\', '', $escrow->escrowable_type ?? ''); @endphp {{ $type }} {{ $escrow->client_name ?? 'N/A' }} {{ $escrow->prestataire_name ?? 'N/A' }} {{ number_format($escrow->total_amount ?? 0, 2) }} € {{ number_format($escrow->prestataire_amount ?? 0, 2) }} € @php $statusColors = [ 'pending' => 'yellow', 'held' => 'yellow', 'partial' => 'blue', 'released' => 'green', 'refunded' => 'red', ]; $color = $statusColors[$escrow->status ?? ''] ?? 'gray'; @endphp {{ ucfirst($escrow->status ?? 'N/A') }} @if($escrow->stripe_transfer_id) ✅ {{ substr($escrow->stripe_transfer_id, 0, 15) }}... @elseif(in_array($escrow->status, ['partial', 'released'])) ❌ Manquant @else - @endif {{ \Carbon\Carbon::parse($escrow->created_at)->format('d/m/Y H:i') }}
@else

Aucun escrow récent

@endif

Revenus mensuels

Transactions récentes

Voir tout
@forelse($recentTransactions ?? [] as $transaction) @empty @endforelse
Référence Utilisateur Montant Type Statut Date
{{ $transaction->reference ?? 'N/A' }} {{ $transaction->user_name ?? 'N/A' }} {{ number_format($transaction->amount ?? 0, 2) }} € {{ ucfirst($transaction->type ?? 'N/A') }} @php $statusColors = [ 'pending' => 'yellow', 'completed' => 'green', 'failed' => 'red', 'cancelled' => 'gray' ]; $color = $statusColors[$transaction->status ?? ''] ?? 'gray'; @endphp {{ ucfirst($transaction->status ?? 'N/A') }} {{ \Carbon\Carbon::parse($transaction->created_at)->format('d/m/Y H:i') }}
Aucune transaction récente
@push('scripts') @endpush @endsection