{{-- header start --}}

{{__('product.lbl_invoice')}}


{{__('product.invoice_no')}} : {{ getSetting('order_code_prefix') }} {{ $order->orderGroup->order_code }}
{{__('product.order_date')}} : {{ date('d M, Y', strtotime($order->created_at)) }}

@if ($order->location_id != null)

{{ optional($order->location)->name }}

@endif
logo

{{ setting('app_name') }}

Phone: {{ setting('helpline_number') }}

{{-- header end --}} {{-- billing and shipping start --}} @if (!$order->orderGroup->is_pos_order) @endif

{{__('product.shipping_info')}}

@php $shippingAddress = $order->orderGroup->shippingAddress; @endphp

@if ($order->orderGroup->is_pos_order) {{ $order->orderGroup->pos_order_address }} @else {{ optional($shippingAddress)->address }}, {{ optional(optional($shippingAddress)->city)->name }}, {{ optional(optional($shippingAddress)->state)->name }},
{{ optional(optional($shippingAddress)->country)->name }}
@endif @if ($order->orderGroup->alternative_phone_no)
{{ localize('Alternative Phone') }}: {{ $order->orderGroup->alternative_phone_no }} @endif
{{__('product.logistic')}}: {{ $order->logistic_name }}
@php $deliveryInfo = json_decode($order->scheduled_delivery_info); @endphp

{{__('product.delivery_type')}}: {{ Str::title(Str::replace('_', ' ', $order->shipping_delivery_type)) }}

@if ($order->shipping_delivery_type == getScheduledDeliveryType())

{{__('product.delivery_time')}}: {{ date('d F', $deliveryInfo->scheduled_date) }}, {{ $deliveryInfo->timeline }}

@endif

{{__('product.billing_info')}}

@php $billingAddress = $order->orderGroup->billingAddress; @endphp

{{ optional($billingAddress)->address }}, {{ optional(optional($billingAddress)->city)->name }}, {{ optional(optional($billingAddress)->state)->name }},
{{ optional(optional($billingAddress)->country)->name }}

{{-- billing and shipping end --}} {{-- item details start --}}
@foreach ($order->orderItems as $key => $item) @php $product = $item->product_variation->product; @endphp @endforeach
{{__('product.item')}} {{__('product.price')}} {{__('product.qty')}} {{__('product.sub_total')}}
{{ $product->collectLocalization('name') }}
@foreach (generateVariationOptions($item->product_variation->combinations) as $variation) {{ $variation['name'] }}: @foreach ($variation['values'] as $value) {{ $value['name'] }} @endforeach @if (!$loop->last) , @endif @endforeach
{{ formatPrice($item->unit_price) }} {{ $item->qty }} @if ($item->refundRequest && $item->refundRequest->refund_status == 'refunded') ({{ $item->refundRequest->refund_status }}) @endif {{ \Currency::format($item->total_price) }}
{{-- item details end --}} {{-- item total start --}}
@if ($order->orderGroup->total_coupon_discount_amount > 0) @endif @if ($order->orderGroup->is_pos_order) @endif
{{__('product.sub_total')}} {{ \Currency::format($order->orderGroup->sub_total_amount) }}
{{__('product.shipping_cost')}} {{ \Currency::format($order->orderGroup->total_shipping_cost) }}
{{__('product.coupon_discount')}} {{ \Currency::format($order->orderGroup->total_coupon_discount_amount) }}
{{__('product.tax')}} {{ \Currency::format($order->orderGroup->total_tax_amount) }}
{{__('product.discount')}} {{ \Currency::format($order->orderGroup->total_discount_amount) }}
{{__('product.grand_total')}} {{ \Currency::format($order->orderGroup->grand_total_amount) }}
{{-- item total end --}} {{-- footer start --}}

{{__('product.hello')}} {{ optional($order->user)->name }},
{{ setting('spacial_note') }}



{{__('product.best_regard')}}
{{ setting('app_name') }}
{{__('product.email')}}: {{ setting('inquriy_email') }}
{{__('product.website')}}: {{ env('APP_URL') }}

{{-- footer end --}}