@php($rtl = app()->getLocale() === 'ar')
🦷 {{ $invoice->tenant->name }}
{{ __('Invoice') }} {{ $invoice->number }}
{{ __('Patient') }}:{{ $invoice->patient->full_name }} {{ __('Phone') }}:{{ $invoice->patient->phone }}
{{ __('Date') }}:{{ ($invoice->issued_at ?? $invoice->created_at)->format('Y-m-d') }} {{ __('Status') }}:{{ $invoice->status->label() }}
@foreach($invoice->items as $i => $item) @endforeach
#{{ __('Description') }}{{ __('Tooth') }}{{ __('Qty') }}{{ __('Amount (IQD)') }}
{{ $i + 1 }} {{ $item->description }} {{ $item->tooth ?? '—' }} {{ $item->qty }} {{ number_format($item->amount) }}
@if($invoice->remaining() > 0) @endif
{{ __('Subtotal') }}{{ number_format($invoice->subtotal) }} IQD
{{ __('Discount') }}− {{ number_format($invoice->discount_amount) }} IQD
{{ __('Total') }}{{ number_format($invoice->total) }} IQD
{{ __('Paid') }}{{ number_format($invoice->paid_amount) }} IQD
{{ __('Remaining') }}{{ number_format($invoice->remaining()) }} IQD
@if($invoice->remaining() === 0 && $invoice->status === \App\Enums\InvoiceStatus::Paid) ✓ {{ __('PAID IN FULL') }} @endif @if($invoice->installments->isNotEmpty())

{{ __('Installment schedule') }}

@foreach($invoice->installments as $inst) @endforeach
#{{ __('Due date') }}{{ __('Amount') }}{{ __('Paid') }}{{ __('Status') }}
{{ $inst->seq === 0 ? __('Down') : $inst->seq }} {{ $inst->due_date->format('Y-m-d') }} {{ number_format($inst->amount) }} {{ number_format($inst->paid_amount) }} {{ $inst->status->label() }}
@endif @if($invoice->notes)

{{ __('Notes') }}: {{ $invoice->notes }}

@endif
{{ $invoice->tenant->name }} · {{ __('Generated by MediBook AI') }} · {{ now()->format('Y-m-d H:i') }} UTC