@php $locale = app()->getLocale(); $isRtl = $locale === 'ar'; $currency = \App\Models\Setting::currencyLabel($locale); $gymName = $settings['gym_name'] ?? \App\Models\Setting::get('gym_name', 'Gym'); $gymPhone = $settings['gym_phone'] ?? \App\Models\Setting::get('gym_phone', ''); $gymAddress = $settings['gym_address'] ?? \App\Models\Setting::get('gym_address', ''); $typeLabels = [ 'sale' => $isRtl ? 'مبيعات' : 'Sale', 'subscription' => $isRtl ? 'اشتراك' : 'Subscription', 'service' => $isRtl ? 'خدمة' : 'Service', 'purchase' => $isRtl ? 'مشتريات' : 'Purchase', ]; @endphp
{{ $gymAddress }}
@endif @if($gymPhone){{ $gymPhone }}
@endif{{ $isRtl ? 'فاتورة' : 'Invoice' }}
{{ $invoice->invoice_number }}
{{ $typeLabels[$invoice->type] ?? $invoice->type }}
{{ $isRtl ? 'العميل' : 'Customer' }}
{{ $invoice->customer_name_display }}
@if($invoice->customer_phone){{ $invoice->customer_phone }}
@endif @if($invoice->customer_email){{ $invoice->customer_email }}
@endif @if($invoice->customer_address){{ $invoice->customer_address }}
@endif{{ $isRtl ? 'تاريخ الفاتورة:' : 'Invoice date:' }} {{ optional($invoice->invoice_date)->format('Y-m-d') }}
{{ $isRtl ? 'تاريخ الاستحقاق:' : 'Due date:' }} {{ $invoice->due_date ? $invoice->due_date->format('Y-m-d') : '—' }}
{{ $isRtl ? 'تاريخ الطباعة:' : 'Printed:' }} {{ now()->format('Y-m-d H:i') }}
| {{ $isRtl ? 'الوصف' : 'Description' }} | {{ $isRtl ? 'الكمية' : 'Qty' }} | {{ $isRtl ? 'سعر الوحدة' : 'Unit price' }} | {{ $isRtl ? 'الإجمالي' : 'Total' }} |
|---|---|---|---|
|
{{ $item->description }} @if($item->product){{ $isRtl ? 'منتج:' : 'Product:' }} {{ $isRtl && $item->product->name_ar ? $item->product->name_ar : $item->product->name }} @elseif($item->membershipPlan){{ $isRtl ? 'خطة:' : 'Plan:' }} {{ $isRtl && $item->membershipPlan->name_ar ? $item->membershipPlan->name_ar : $item->membershipPlan->name }} @endif |
{{ (int) $item->quantity }} | {{ number_format((float) $item->unit_price, 2) }} {{ $currency }} | {{ number_format((float) $item->total, 2) }} {{ $currency }} |
{{ $isRtl ? 'ملاحظات' : 'Notes' }}
{{ $invoice->notes }}
{{ $isRtl ? 'الشروط' : 'Terms' }}
{{ $invoice->terms }}