@php use App\Support\PdfArabic; @endphp
|
@if($logoDataUri ?? null)
{{ PdfArabic::glyphs($company?->name ?? config('app.name')) }} @if($company?->tax_number){{ PdfArabic::glyphs('الرقم الضريبي: '.$company->tax_number) }} @endif |
{{ PdfArabic::glyphs('فاتورة متجر إلكتروني') }} {{ $sale->invoice_number }} {{ $sale->created_at?->format('Y-m-d H:i') ?? now()->format('Y-m-d H:i') }} |
| {{ PdfArabic::glyphs('العميل:') }} {{ PdfArabic::glyphsIfArabic($sale->customer_name ?? '—') }} | {{ PdfArabic::glyphs('الهاتف:') }} {{ $sale->customer_phone ?? '—' }} |
| {{ PdfArabic::glyphs('العنوان:') }} {{ PdfArabic::glyphsIfArabic($sale->customer_address) }} | |
| {{ PdfArabic::glyphs('طريقة الدفع:') }} {{ PdfArabic::glyphs(match($sale->payment_method) { 'cod' => 'دفع عند الاستلام', 'card' => 'بطاقة / دفع إلكتروني', 'bank' => 'تحويل بنكي', default => 'نقدي', }) }} | {{ PdfArabic::glyphs('الحالة:') }} {{ PdfArabic::glyphs(\App\Models\PosSale::onlineOrderStatusLabels()[$sale->status] ?? $sale->status) }} |
| {{ PdfArabic::glyphs('المنتج') }} | {{ PdfArabic::glyphs('الكمية') }} | {{ PdfArabic::glyphs('السعر') }} | {{ PdfArabic::glyphs('الإجمالي') }} |
|---|---|---|---|
| {{ PdfArabic::glyphsIfArabic($item->product?->name ?? '—') }} | {{ number_format((float) $item->quantity, 2) }} | {{ number_format((float) $item->unit_price, 2) }} | {{ number_format((float) $item->line_total, 2) }} |
| {{ PdfArabic::glyphs('المجموع الفرعي:') }} | {{ number_format((float) $sale->subtotal_amount, 2) }} {{ $currency }} | |
| {{ PdfArabic::glyphs('الخصم:') }} | −{{ number_format((float) $sale->discount_amount, 2) }} | |
| {{ PdfArabic::glyphs('ض.ق.م:') }} | {{ number_format((float) ($sale->vat_amount ?? 0), 2) }} | |
| {{ PdfArabic::glyphs('الإجمالي:') }} | {{ number_format((float) $sale->total_amount, 2) }} {{ $currency }} |