@php $directory = app()->getLocale() == 'ar' ? 'rtl' : 'ltr'; @endphp Invoice @if ($directory == 'rtl') @else @endif

{{ __($generaleSetting?->name ?? config('app.name')) }}

{{ config('app.url') }}

{{ $generaleSetting?->email }}

{{ $generaleSetting?->mobile }}

{{ __('Business Address') }}

{{ __($generaleSetting?->address) }}

@php $address = $order->address; $user = $order->customer?->user; @endphp
{{ __('Bill To') }}:

{{ $user?->name }}

{{ __('Address') }}:

@if ($address?->address_type) {{ __($address?->address_type) }} @endif @if ($address?->address_line) ,{{ $address->address_line }} @endif @if ($address?->address_line2) ,{{ $address->address_line2 }} @endif @if ($address?->area) ,{{ $address?->area }} @endif

{{ __('Email') }}: {{ $user?->email }}
{{ __('Phone') }}: {{ $user?->phone }}

{{ __('Invoice of') }} ({{ $generaleSetting?->currency ?? '$' }})

{{ showCurrency($order->payable_amount) }}

{{ __('Payment Method') }} {{ __('Invoice Number') }} {{ __('Invoice Date') }} {{ __('Order Date') }}
{{ $order->payment_method->value }} #{{ $order->prefix . $order->order_code }} {{ now()->format('d F, Y') }} {{ $order->created_at->format('d F, Y') }}
@foreach ($order->products ?? [] as $product) @php $price = $product->discount_price > 0 ? $product->discount_price : $product->price; $name = $product->name; $shortDescription = $product->short_description; if ($directory == 'rtl') { $translation = $product->translations()?->where('lang', 'ar')->first(); $name = $translation?->name ?? $name; $shortDescription = $translation?->short_description ?? $short_description; } $plainShortDescription = strip_tags($shortDescription); @endphp @endforeach
{{ __('Item') }} {{ __('Item Name') }} {{ __('Rate') }} {{ __('Quantity') }} {{ __('Size') }} {{ __('Color') }} {{ __('Price') }}
{{ $loop->iteration }}.
{{ $name }}

{{ $plainShortDescription }}

{{ showCurrency($price) }} {{ $product->pivot->quantity }} {{ $product->pivot->size ?? '--' }} {{ $product->pivot->color ?? '--' }} {{ showCurrency($price * $product->pivot->quantity) }}
@if ($directory != 'rtl')

{{ __('Sub Total') }}

{{ showCurrency($order->total_amount) }}

@if ($order->coupon_discount > 0)

{{ __('Discount') }}

{{ showCurrency($order->coupon_discount) }}

@endif

{{ __('Delivery Charge') }}

{{ showCurrency($order->delivery_charge) }}

@foreach ($order->vatTaxes ?? [] as $vatTax)

{{ $vatTax->name . '(' . $vatTax->percentage . '%)' }}

{{ showCurrency($vatTax->amount) }}

@endforeach @if ($order->tax_amount > 0 && count($order->vatTaxes ?? []) <= 0)

{{ __('Total Tax Amount') }}

{{ showCurrency($order->tax_amount) }}

@endif

{{ __('Total Amount') }}

{{ showCurrency($order->payable_amount) }}

@else

{{ showCurrency($order->total_amount) }}

{{ __('Sub Total') }}

@if ($order->coupon_discount > 0)

{{ showCurrency($order->coupon_discount) }}

{{ __('Discount') }}

@endif

{{ showCurrency($order->delivery_charge) }}

{{ __('Delivery Charge') }}

@if ($order->tax_amount > 0)

{{ showCurrency($order->tax_amount) }}

{{ __('VAT & Tax') }}

@endif

{{ showCurrency($order->payable_amount) }}

{{ __('Total Amount') }}

@endif