FACTURE N° {{ $facture->numero_facture }}

Généré le: {{ $date }}
ÉMETTEUR:
{{ config('app.name') }}
Service Comptabilité
Email: comptabilité@example.com
BÉNÉFICIAIRE:
{{ $facture->marche->operateur->denomination ?? 'N/A' }}
{{ $facture->marche->operateur->adresse ?? 'Adresse non renseignée' }}
{{ $facture->marche->operateur->telephone ?? 'Tél: N/A' }}

📋 INFORMATIONS GÉNÉRALES

Référence Marché: {{ $facture->marche->numero_marche }} Exercice Budgétaire: {{ $facture->exercice->annee }}
Date de facturation: {{ $facture->date_facture->format('d/m/Y') }} Date d'échéance: {{ $facture->date_facture->addDays(30)->format('d/m/Y') }}
Statut: {{ strtoupper($facture->statut) }} Montant: {{ number_format($facture->montant, 2, ',', ' ') }} FCFA
Date de validation: {{ $facture->date_validation ? $facture->date_validation->format('d/m/Y') : 'En attente' }} Date de paiement: {{ $facture->date_paiement ? $facture->date_paiement->format('d/m/Y') : 'En attente' }}

🎯 OBJET DU MARCHÉ

Référence: {{ $facture->marche->numero_marche }}
Objet: {{ $facture->marche->objet }}
Description: {{ $facture->marche->description ?? 'Aucune description supplémentaire' }}

🔧 PRESTATIONS FACTURÉES

@if($facture->prestation)
{!! nl2br(e($facture->prestation)) !!}
@else
Aucun détail de prestation n'a été renseigné.
@endif

💰 DÉTAIL FINANCIER

MONTANT TOTAL HT {{ number_format($facture->montant, 2, ',', ' ') }} FCFA
TVA (0% - Exonération) 0,00 FCFA
MONTANT TOTAL TTC {{ number_format($facture->montant, 2, ',', ' ') }} FCFA
Arrêté la présente facture à la somme de: {{ $montantEnLettres }}
@if($facture->notes)

📝 NOTES ET OBSERVATIONS

{!! nl2br(e($facture->notes)) !!}
@endif

📊 IMPACT BUDGÉTAIRE

Montant alloué à l'exercice {{ $facture->exercice->annee }}: {{ number_format($facture->marche->getMontantExercice($facture->exercice_id), 2, ',', ' ') }} FCFA
Montant déjà utilisé: {{ number_format($facture->marche->getMontantUtiliseExercice($facture->exercice_id) - $facture->montant, 2, ',', ' ') }} FCFA
Montant après cette facture: {{ number_format($facture->marche->getMontantUtiliseExercice($facture->exercice_id), 2, ',', ' ') }} FCFA
Solde restant: {{ number_format($facture->marche->getMontantRestantExercice($facture->exercice_id), 2, ',', ' ') }} FCFA
Taux d'utilisation: @php $montantAlloue = $facture->marche->getMontantExercice($facture->exercice_id); $tauxUtilisation = $montantAlloue > 0 ? ($facture->marche->getMontantUtiliseExercice($facture->exercice_id) / $montantAlloue) * 100 : 0; @endphp {{ round($tauxUtilisation, 2) }}%