@extends('layouts.admin-modern') @section('title', 'Gestion des Factures') @section('content')
{{-- Header --}}

đź“„ Gestion des Factures

Toutes les transactions de la plateforme

{{-- Stats principales --}}

Factures totales

{{ number_format($stats['total_invoices']) }}

CA Total

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

Commissions gagnées

{{ number_format($stats['total_commission'], 0, ',', ' ') }}€

Versé aux prestataires

{{ number_format($stats['total_net_prestataires'], 0, ',', ' ') }}€

{{-- Stats aujourd'hui & ce mois --}}

Aujourd'hui

{{ number_format($stats['today_revenue'], 0, ',', ' ') }}€

{{ $stats['today_invoices'] }} factures

CA ce mois

{{ number_format($stats['month_revenue'], 0, ',', ' ') }}€

Commissions ce mois

{{ number_format($stats['month_commission'], 0, ',', ' ') }}€

Par statut

✓ {{ $stats['paid_count'] }} ⏳ {{ $stats['pending_count'] }} ✗ {{ $stats['cancelled_count'] }}
{{-- Top prestataires --}} @if($stats['top_prestataires']->count() > 0)

🏆 Top Prestataires ce mois

@foreach($stats['top_prestataires'] as $top)

{{ $top->prestataire?->user?->name ?? 'N/A' }}

{{ number_format($top->total_revenue, 0) }}€

{{ $top->invoice_count }} ventes

@endforeach
@endif {{-- Filtres avancés --}}
{{-- Dates personnalisées --}}
Période personnalisée: →
{{-- Tableau des factures --}}
@forelse($invoices as $invoice) @empty @endforelse
Facture Client Prestataire Montant Commission Statut Actions

{{ $invoice->invoice_number }}

{{ optional($invoice->issued_at)->format('d/m/Y H:i') }}

{{ $invoice->type_label }}

{{ $invoice->billing_name }}

{{ $invoice->billing_email }}

{{ data_get($invoice, 'prestataire.user.name', '-') }}

{{ $invoice->description }}

{{ number_format($invoice->total, 2, ',', ' ') }}€

HT: {{ number_format($invoice->subtotal, 2) }}€

{{ number_format($invoice->commission_amount, 2, ',', ' ') }}€

{{ number_format($invoice->commission_rate, 0) }}%

{{ $invoice->status_label }} Voir
đź“­

Aucune facture trouvée

{{-- Pagination --}} @if($invoices->hasPages())
{{ $invoices->withQueryString()->links() }}
@endif
@endsection