@include('helpers.ChiffresEnLettres') @php $company = auth()->user()->company; @endphp
@if($company->logo) @endif
{{ $company->name }}
{{ $company->city ?? 'Lomé' }}, le {{ $data->date->format('d') }} {{ $data->monthToFr() }} {{ $data->date->format('Y') }}
Consultation

FACTURE N°{{ $data->no() }}

Patient : {{ $data->patient->name }}, {{ $data->patient->tel }}
@php $paidSum = $data->payments()->sum('amount'); $discount = $data->discount ?? 0; $totalDue = max(0, ($data->total ?? $data->amount) - $discount); $remaining = max(0, $totalDue - $paidSum); @endphp @if($company->tva) @else @endif
Date Qté Désignation PU Total
{{ $data->date->format('d/m/Y') }} 1 Consultation {{ number_format($data->consultation->amount, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!} {{ number_format($data->consultation->amount, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!}
Total HT {{ number_format($data->amount, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!}
Montant TVA {{ number_format($data->tva_amount, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!}
Total TTC {{ number_format($data->total, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!}
Total {{ number_format($data->amount, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!}
Total à payer {{ number_format($totalDue, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!}
Montant payé {{ number_format($paidSum, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!}
Reste à payer {{ number_format($remaining, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!}

Arrêté à la somme de {{ convertCurrencyToWords($totalDue) }} {{ $company->currency }}

Signature du Patient Signature @if($company->signature) @endif
Dr. {{ $company->doctor }}
{!! $company->header !!} {!! $company->footer !!}