@extends('layouts.master') @section('title') Détails Facture @endsection @section('content')
@if(session()->has('success'))
@endif @if(session()->has('errors'))
@endif

Facture: {{ $facture->numero_facture }} Secteur: {{ $facture->secteur->libelle }}

@csrf

Informations générales

Numéro {{ $facture->numero_facture }}
Marché {{ $facture->marche->reference }} - {{ $facture->marche->operateur->denomination }}
Exercice {{ $facture->exercice->annee }}
Date de facture {{ $facture->date_facture->format('d/m/Y') }}
Montant {{ number_format($facture->montant, 2, ',', ' ') }} FCFA

Statut et dates

Statut {{ ucfirst($facture->statut) }}
Date prise en charge {{ $facture->type_pec }} à la date du {{ $facture->date_pec ? $facture->date_pec->format('d/m/Y') : 'N/A' }}
Date de paiement {{ $facture->date_paiement ? $facture->date_paiement->format('d/m/Y') : 'N/A' }}
Prestation {{ $facture->prestation->titre ?? 'N/A' }}
Notes {{ $facture->notes ?? 'N/A' }}

Impact sur le budget

Exercice Montant alloué Montant utilisé avant Montant utilisé après Reste avant Reste après
{{ $facture->exercice->annee }} {{ number_format($facture->marche->getMontantExercice($facture->exercice_id), 2, ',', ' ') }} FCFA {{ number_format($facture->marche->getMontantUtiliseExercice($facture->exercice_id) - $facture->montant, 2, ',', ' ') }} FCFA {{ number_format($facture->marche->getMontantUtiliseExercice($facture->exercice_id), 2, ',', ' ') }} FCFA {{ number_format($facture->marche->getMontantRestantExercice($facture->exercice_id) + $facture->montant, 2, ',', ' ') }} FCFA {{ number_format($facture->marche->getMontantRestantExercice($facture->exercice_id), 2, ',', ' ') }} FCFA
@endsection