@extends('admin.layout.pdf') @section('content')
ETAT DES DEPENSES PAR FAMILLE D'ACTES ET PAR PRESTATAIRES

PERIODE COMPTABLE CONSIDEREE: {{ \Carbon\Carbon::parse($dateDebut)->format('d/m/Y') }} AU {{ \Carbon\Carbon::parse($dateFin)->format('d/m/Y') }}

@if (!empty($infos)) @foreach ($infos as $info)

GARANT : {{ $info->garant }}

POLICE : {{ $info->libellePolice }}

SOUSCRIPTEUR : {{ $info->souscripteur }}

COURTIER : {{ $info->courtier }}

MONTANT SUPERIEUR OU EGAL A : : {{ number_format($idDepense, 0, '', ' ') }} FCFA

@endforeach @else

@if ($Entetegarant != null) GARANT : {{ $Entetegarant->libelle }}

@endif @if ($Entetepolice != null) POLICE : {{ $Entetepolice->libellePolice }}

@endif @if ($Entetesouscripteur != null) SOUSCRIPTEUR : {{ $Entetesouscripteur->nom }} {{ $Entetesouscripteur->prenoms }}

@endif @if ($Entetecourtier != null) COURTIER : {{ $Entetecourtier->libelle }}

@endif MONTANT SUPERIEUR OU EGAL A : : {{ number_format($idDepense, 0, '', ' ') }} FCFA

@endif @php $total_CONSULTATION = 0; $total_IMAGERIE = 0; $total_BIOLOGIE = 0; $total_DENTISTERIE = 0; $total_OPTIQUE = 0; $total_HOSPITALISATION = 0; $total_PHARMACIE = 0; $total_MATERNITE = 0; $total_AUTRES_EXAMENS = 0; $total_AUXILIAIRES_MEDICAUX = 0; $total_ASSISTANCE = 0; $total_TRANSPORT_MEDICALISE = 0; $total_BILAN_DE_SANTE = 0; $total_TOTAUX = 0; $rowCount = 0; $rowsPerPage = 50; // Ajuster selon la taille de la page @endphp @foreach ($p_factures as $p_facture) @php $total_CONSULTATION += $p_facture->CONSULTATION; $total_IMAGERIE += $p_facture->IMAGERIE; $total_BIOLOGIE += $p_facture->BIOLOGIE; $total_DENTISTERIE += $p_facture->DENTISTERIE; $total_OPTIQUE += $p_facture->OPTIQUE; // Corrigé : ajout séparé pour OPTIQUE $total_HOSPITALISATION += $p_facture->HOSPITALISATION; $total_PHARMACIE += $p_facture->PHARMACIE; $total_MATERNITE += $p_facture->MATERNITE; $total_AUTRES_EXAMENS += $p_facture->AUTRES_EXAMENS; $total_AUXILIAIRES_MEDICAUX += $p_facture->AUXILIAIRES_MEDICAUX; $total_ASSISTANCE += $p_facture->ASSISTANCE; $total_TRANSPORT_MEDICALISE += $p_facture->TRANSPORT_MEDICALISE; $total_BILAN_DE_SANTE += $p_facture->BILAN_DE_SANTE; $total_TOTAUX += $p_facture->TOTAUX; $rowCount++; @endphp @if ($rowCount % $rowsPerPage == 0 && $rowCount > 0)
Prestataire Consultation Imagerie Biologie Dentisterie Optique Hospitalisation Pharmacie Maternité Autres Examens Auxiliaires Médicaux Assistance Transport Médicalisé Bilan de Santé Totaux
@endif @endforeach
Prestataire Consultation Imagerie Biologie Dentisterie Optique Hospitalisation Pharmacie Maternité Autres Examens Auxiliaires Médicaux Assistance Transport Médicalisé Bilan de Santé Totaux
{{ $p_facture->Prestataire }} {{ number_format($p_facture->CONSULTATION, 0, '', ' ') }} {{ number_format($p_facture->IMAGERIE, 0, '', ' ') }} {{ number_format($p_facture->BIOLOGIE, 0, '', ' ') }} {{ number_format($p_facture->DENTISTERIE, 0, '', ' ') }} {{ number_format($p_facture->OPTIQUE, 0, '', ' ') }} {{ number_format($p_facture->HOSPITALISATION, 0, '', ' ') }} {{ number_format($p_facture->PHARMACIE, 0, '', ' ') }} {{ number_format($p_facture->MATERNITE, 0, '', ' ') }} {{ number_format($p_facture->AUTRES_EXAMENS, 0, '', ' ') }} {{ number_format($p_facture->AUXILIAIRES_MEDICAUX, 0, '', ' ') }} {{ number_format($p_facture->ASSISTANCE, 0, '', ' ') }} {{ number_format($p_facture->TRANSPORT_MEDICALISE, 0, '', ' ') }} {{ number_format($p_facture->BILAN_DE_SANTE, 0, '', ' ') }} {{ number_format($p_facture->TOTAUX, 0, '', ' ') }}
TOTAL GÉNÉRAL {{ number_format($total_CONSULTATION, 0, '', ' ') }} {{ number_format($total_IMAGERIE, 0, '', ' ') }} {{ number_format($total_BIOLOGIE, 0, '', ' ') }} {{ number_format($total_DENTISTERIE, 0, '', ' ') }} {{ number_format($total_OPTIQUE, 0, '', ' ') }} {{ number_format($total_HOSPITALISATION, 0, '', ' ') }} {{ number_format($total_PHARMACIE, 0, '', ' ') }} {{ number_format($total_MATERNITE, 0, '', ' ') }} {{ number_format($total_AUTRES_EXAMENS, 0, '', ' ') }} {{ number_format($total_AUXILIAIRES_MEDICAUX, 0, '', ' ') }} {{ number_format($total_ASSISTANCE, 0, '', ' ') }} {{ number_format($total_TRANSPORT_MEDICALISE, 0, '', ' ') }} {{ number_format($total_BILAN_DE_SANTE, 0, '', ' ') }} {{ number_format($total_TOTAUX, 0, '', ' ') }}
@endsection