@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.quotation') }} {{ $invoice->invoice_number }}
@if($showLogo && $storeLogo) {{ $storeName }} @else

{{ $storeName }}

@endif

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

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

{{ $isRTL ? 'البائع' : 'Vendeur' }} / {{ 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 ? 'العميل' : 'Client' }} / {{ 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 }}
@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 }}
{{ $isRTL ? 'صالح لمدة' : 'Valable pour' }}: {{ $isRTL ? '30 يوم من تاريخ العرض' : '30 jours à compter de la date de l\'offre' }}
@if($invoice->notes)

{{ $isRTL ? 'ملاحظات' : 'Notes' }} / {{ trans('messages.notes') }}:

{{ $invoice->notes }}

@endif

{{ $isRTL ? 'توقيع البائع' : 'Signature Vendeur' }}

_________________________

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

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

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

_________________________

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

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

@if($footerText) @endif