@extends('layout.app') @section('content')
@php $allInvoices = $paids->concat($unpaids); $countConsultations = $allInvoices->whereNotNull('consultation_id')->count(); $countHospitalisations = $allInvoices->whereNotNull('intervention_id')->count(); $countTeleconsultations = $allInvoices->whereNotNull('teleconsultation_id')->count(); $countSales = $allInvoices->whereNotNull('sale_id')->count(); @endphp
@if(auth()->user()->isTraitant()) Mes @endif Factures (Payées {{ $paids->count() }} / {{ $paids->count() + $unpaids->count() }} soit @if(($paids->count() + $unpaids->count()) > 0){{ round($paids->count() / ($paids->count() + $unpaids->count()) * 100) }}@else 0 @endif %{{ number_format($totalPaid, 0, '', ' ') }} / {{ number_format($totalDue, 0, '', ' ') }} {!! htmlentities(auth()->user()->company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!})  
@if(!auth()->user()->isComptable()) @endif @foreach($paids as $paid) @php $data = $paid; $type = 'autre'; if($data->intervention_id) $type = 'hospitalisation'; elseif($data->consultation_id) $type = 'consultation'; elseif($data->teleconsultation_id) $type = 'teleconsultation'; elseif($data->sale_id) $type = 'vente'; @endphp @if(!auth()->user()->isComptable()) @endif @endforeach @if(!auth()->user()->isComptable()) @endif @foreach($unpaids as $unpaid) @php $data = $unpaid; $type = 'autre'; if($data->intervention_id) $type = 'hospitalisation'; elseif($data->consultation_id) $type = 'consultation'; elseif($data->teleconsultation_id) $type = 'teleconsultation'; elseif($data->sale_id) $type = 'vente'; @endphp @if(!auth()->user()->isComptable()) @endif @endforeach
@include('invoice.partials.payment-modal') @endsection @push('scripts') @endpush