@extends('layouts.app') @section('title', 'Mes Revenus') @section('content')
{{-- En-tête --}}

💰 Mes Revenus

Suivez vos revenus et paiements

{{-- Statistiques revenus --}}

Total gagné

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

Ce mois

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

En attente

{{ $stats['pending_payments'] ?? 0 }}

Transactions

{{ $transactions->total() ?? 0 }}

{{-- Graphique des revenus --}}

Évolution des revenus

Graphique des revenus (6 derniers mois)

{{-- Historique des transactions --}}

Historique des paiements

@if(isset($transactions) && $transactions->count() > 0)
@foreach($transactions as $transaction) @endforeach
Date Client Service Montant Commission Net Statut
{{ $transaction->created_at->format('d/m/Y') }} {{ $transaction->booking->client->user->name ?? 'N/A' }} {{ $transaction->booking->service->title ?? 'Service' }} {{ number_format($transaction->amount, 2) }} € -{{ number_format($transaction->commission ?? 0, 2) }} € {{ number_format($transaction->net_amount ?? $transaction->amount, 2) }} € @php $statusClasses = [ 'completed' => 'bg-green-100 text-green-800', 'pending' => 'bg-yellow-100 text-yellow-800', 'processing' => 'bg-blue-100 text-blue-800', ]; @endphp {{ ucfirst($transaction->status) }}
@if($transactions->hasPages())
{{ $transactions->links() }}
@endif @else

Aucune transaction

Vous n'avez pas encore reçu de paiements.

@endif
@endsection