@if($company->logo)
@endif
{{ $company->name }}
{{ $company->tel }}
{{ $company->address }}
|
|
FACTURE Nº {{ $data->no() }}
Patient : {{ $data->patient->name }}, {{ $data->patient->tel }}
|
| Désignation |
Durée |
Prix Unitaire |
Prix Total |
| Téléconsultation du {{ $data->teleconsultation->updated_at->format('d/m/Y') }} |
{{ gmdate('H:i:s', $data->teleconsultation->duration) }} |
{{ number_format($data->teleconsultation->amount, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!} |
{{ number_format($data->teleconsultation->amount, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!} |
| Total |
|
|
{{ number_format($data->amount, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!} |
@php
$paidSum = $data->payments()->sum('amount');
$discount = $data->discount ?? 0;
$totalDue = max(0, ($data->total ?? $data->amount) - $discount);
$remaining = max(0, $totalDue - $paidSum);
@endphp
| Total à payer |
|
|
{{ number_format($totalDue, 0, '', ' ') }} {!! htmlentities($company->currency_symbol, ENT_NOQUOTES, 'UTF-8') !!}
({{ convertCurrencyToWords($totalDue) }} {{ $company->currency }})
|
@php
$paymentDate = ($data->payments && $data->payments->count() > 0) ? ' (' . $data->payments->first()->payment_date->translatedFormat('d/m/Y') . ')' : '';
@endphp
@if($remaining > 0)
|
Facture partiellement payée{{ $paymentDate }}
|
@else
|
Facture payée{{ $paymentDate }}
|
@endif
| 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') !!} |