@php $storeName = \App\Models\Setting::get('store_name', 'Gestock Pro'); $storeLogo = \App\Models\Setting::get('store_logo'); $currency = currency_symbol(); $footerText = \App\Models\Setting::get('invoice_footer_text', ''); $locale = app()->getLocale(); $isRTL = $locale === 'ar'; $dir = $isRTL ? 'rtl' : 'ltr'; $showLogo = \App\Models\Setting::get('invoice_show_logo', '1') === '1'; @endphp {{ trans('messages.delivery_note') }} {{ $invoice->invoice_number }}
@if($showLogo && $storeLogo) {{ $storeName }} @else

{{ $storeName }}

@endif

{{ strtoupper(trans('messages.delivery_note')) }}

N°: {{ $invoice->invoice_number }}

{{ $isRTL ? 'المرسل' : 'Expéditeur' }} / {{ trans('messages.store') }}

{{ trans('messages.name') }}: {{ $storeName }}

@php $storeAddress = \App\Models\Setting::get('store_address'); $storePhone = \App\Models\Setting::get('store_phone'); $storeEmail = \App\Models\Setting::get('store_email'); @endphp @if($storeAddress)

{{ trans('messages.address') }}: {{ $storeAddress }}

@endif @if($storePhone)

{{ trans('messages.phone') }}: {{ $storePhone }}

@endif @if($storeEmail)

{{ trans('messages.email') }}: {{ $storeEmail }}

@endif

{{ $isRTL ? 'المستلم' : 'Destinataire' }} / {{ trans('messages.customer') }}

{{ trans('messages.name') }}: {{ $invoice->customer?->name ?? $invoice->customer_name }}

@if($invoice->customer) @if($invoice->customer->email)

{{ trans('messages.email') }}: {{ $invoice->customer->email }}

@endif @if($invoice->customer->phone)

{{ trans('messages.phone') }}: {{ $invoice->customer->phone }}

@endif @if($invoice->customer->address)

{{ trans('messages.address') }}: {{ $invoice->customer->address }}

@endif @endif
{{ trans('messages.date') }}: {{ $invoice->created_at->format('d/m/Y') }}
{{ trans('messages.created_by') }}: {{ $invoice->user->name }}
{{ $isRTL ? 'رقم الفاتورة المرجعية' : 'Référence Facture' }}: {{ $invoice->invoice_number }}
@if($invoice->status === 'draft')
{{ $isRTL ? 'الحالة' : 'Statut' }}: {{ $isRTL ? 'مسودة' : 'Brouillon' }}
@endif
@foreach($invoice->items as $index => $item) @endforeach
# {{ trans('messages.products') }} {{ trans('messages.quantity') }} {{ trans('messages.unit_price') }} {{ trans('messages.tax') }} {{ trans('messages.total') }}
{{ $index + 1 }} {{ $item->product->name }} @if($item->product->sku)
SKU: {{ $item->product->sku }} @endif
{{ $item->quantity }} {{ $item->product->unit ?? '' }} {{ number_format($item->unit_price, 2) }} {{ $currency }} {{ $item->tax_rate }}% {{ number_format($item->total, 2) }} {{ $currency }}
@if($invoice->discount > 0) @endif
{{ trans('messages.subtotal') }} {{ number_format($invoice->subtotal, 2) }} {{ $currency }}
{{ trans('messages.discount') }} -{{ number_format($invoice->discount, 2) }} {{ $currency }}
{{ trans('messages.tax') }} {{ number_format($invoice->tax, 2) }} {{ $currency }}
{{ $isRTL ? 'المجموع الكلي' : 'Total TTC' }} {{ number_format($invoice->total, 2) }} {{ $currency }}
@if($invoice->notes)
{{ $isRTL ? 'ملاحظات' : 'Notes' }} / {{ trans('messages.notes') }}:

{{ $invoice->notes }}

@endif

{{ $isRTL ? 'توقيع المرسل' : 'Signature Expéditeur' }}

_________________________

{{ $invoice->user->name }}

{{ $invoice->created_at->format('d/m/Y') }}

{{ $isRTL ? 'توقيع المستلم' : 'Signature Destinataire' }}

_________________________

{{ $invoice->customer?->name ?? $invoice->customer_name }}

{{ $isRTL ? 'التاريخ' : 'Date' }}: _______________

@if($footerText)

{{ $footerText }}

@endif