فاتورة ضريبية
رقم الفاتورة: {{ $invoice->invoice_number ?? '--' }}
تاريخ الفاتورة: {{ $invoice->formatted_invoice_date }}
معلومات المريض:
{{ $invoice->patient->name ?? 'غير محدد' }}
رقم الهاتف: {{ $invoice->patient->mobile ?? $invoice->patient->phone ?? 'غير محدد' }}
@if($invoice->patient->birth_date ?? false)
تاريخ الميلاد: {{ $invoice->patient->birth_date->format('Y-m-d') }}
@endif
حالة الفاتورة:
مدفوعة بالكامل
@if($invoice->appointment)
رقم الموعد: {{ $invoice->appointment->booking_reference ?? '--' }}
@endif
@foreach($invoice->items as $index => $item) @endforeach @if($invoice->discount_amount > 0) @endif @if(($invoice->tax_amount ?? 0) > 0) @endif
# الوصف الكمية سعر الوحدة الخصم الإجمالي
{{ $index + 1 }} {{ $item->description }} {{ number_format($item->quantity ?? 0, 2) }} {{ number_format($item->unit_price ?? 0, 2) }} ج.م @php $dtype = $item->line_discount_type ?? 'none'; $dval = (float)($item->line_discount_value ?? 0); @endphp @if($dtype === 'percent') {{ rtrim(rtrim(number_format($dval, 2), '0'), '.') }}% @elseif($dtype === 'amount') {{ number_format($dval, 2) }} ج.م @else 0 @endif {{ number_format($item->line_total ?? 0, 2) }} ج.م
المجموع الفرعي: {{ number_format($invoice->subtotal ?? 0, 2) }} ج.م
الخصم: -{{ number_format($invoice->discount_amount ?? 0, 2) }} ج.م
الضريبة ({{ $invoice->vat_rate }}%): {{ number_format($invoice->tax_amount ?? 0, 2) }} ج.م
المدفوع: {{ number_format($paid ?? ($invoice->paid_amount ?? 0), 2) }} ج.م
المتبقي: {{ number_format($remaining ?? max(0, ($invoice->total_amount ?? 0) - ($paid ?? ($invoice->paid_amount ?? 0))), 2) }} ج.م
@if($invoice->notes)
ملاحظات:
{{ $invoice->notes }}
@endif