@php use App\Support\PdfArabic; @endphp {{ PdfArabic::glyphs('إيصال '.$appointment->appointment_number) }} @include('pdf.partials.cairo-font-face')
@if($logoDataUri ?? null) @endif

{{ PdfArabic::glyphs($company?->name ?? config('app.name')) }}

@if($company?->tax_number)

{{ PdfArabic::glyphs('الرقم الضريبي: '.$company->tax_number) }}

@endif

{{ PdfArabic::glyphs('إيصال تحصيل') }}

{{ $appointment->appointment_number }}

{{ $appointment->paid_at?->format('Y-m-d H:i') ?? now()->format('Y-m-d H:i') }}

{{ PdfArabic::glyphs('المريض:') }} {{ PdfArabic::glyphsIfArabic($appointment->patient?->name ?? '—') }} {{ PdfArabic::glyphs('الكود:') }} {{ $appointment->patient?->code ?? '—' }}
{{ PdfArabic::glyphs('الهاتف:') }} {{ $appointment->patient?->phone ?? '—' }} {{ PdfArabic::glyphs('الطبيب:') }} {{ PdfArabic::glyphsIfArabic($appointment->doctor?->name ?? '—') }}
{{ PdfArabic::glyphs('طريقة الدفع:') }} {{ PdfArabic::glyphs(match($appointment->payment_method) { 'bank', 'card' => 'بنك / شبكة', default => 'نقدي', }) }}
@forelse($appointment->serviceLines as $line) @empty @endforelse
{{ PdfArabic::glyphs('الخدمة') }} {{ PdfArabic::glyphs('الكمية') }} {{ PdfArabic::glyphs('المبلغ') }}
{{ PdfArabic::glyphsIfArabic($line->service?->name ?? '—') }} {{ $line->quantity }} {{ number_format((float) $line->line_total, 2) }}
{{ PdfArabic::glyphs('كشف / خدمة') }} 1 {{ number_format((float) $appointment->fee_amount, 2) }}
@if($appointment->subtotal_amount !== null) @endif
{{ PdfArabic::glyphs('الصافي:') }} {{ number_format((float) $appointment->subtotal_amount, 2) }}
{{ PdfArabic::glyphs('ض.ق.م:') }} {{ number_format((float) ($appointment->vat_amount ?? 0), 2) }}
{{ PdfArabic::glyphs('الإجمالي:') }} {{ number_format((float) $appointment->fee_amount, 2) }}