@extends('admin.layout.pdf') @section('content')
ÉTAT DES DÉPENSES PAR PRESTATAIRES MÉDICAUX

PÉRIODE COMPTABLE CONSIDÉRÉE : {{ \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 }}

@break @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 ($Entetepolice != null) COURTIER : {{ $Entetepolice->libelle }} @endif

@endif @php $TypeP_old = ""; $total_montantFacture = 0; $total_apresDecompte = 0; $total_Coutmoyen = 0; $total_Taux = 0; $rowCount = 0; $rowsPerPage = 50; // Ajuster selon la taille de la page @endphp @foreach ($p_factures as $p_facture) @php $total_montantFacture += $p_facture->montantFacture; $total_apresDecompte += $p_facture->apresDecompte; $total_Coutmoyen += $p_facture->Coutmoyen; $total_Taux += $p_facture->Taux; $rowCount++; @endphp @if ($TypeP_old != $p_facture->TypeP) @if ($rowCount > 1)
@endif @endif @if ($rowCount % $rowsPerPage == 0)
{{ $p_facture->TypeP }}
Prestataire médicaux Montant Facture Après Décompte Coût moyen Taux
@endif @php $TypeP_old = $p_facture->TypeP; @endphp @endforeach
{{ $p_facture->TypeP }}
Prestataire médicaux Montant Facture Après Décompte Coût moyen Taux
{{ $p_facture->Beneficiaire }} {{ number_format($p_facture->montantFacture, 0, '', ' ') }} {{ number_format($p_facture->apresDecompte, 0, '', ' ') }} {{ number_format($p_facture->Coutmoyen, 0, '', ' ') }} {{ number_format($p_facture->Taux, 0, '', ' ') }}%
TOTAL GÉNÉRAL {{ number_format($total_montantFacture, 0, '', ' ') }} {{ number_format($total_apresDecompte, 0, '', ' ') }} {{ number_format($total_Coutmoyen, 0, '', ' ') }} {{ number_format($total_Taux, 0, '', ' ') }}%
@endsection