{{-- header start --}}
Invoice {{ setting('inv_prefix') }}{{ $order->orderGroup->order_code }}
Order Date: {{ date('d M, Y', strtotime($order->created_at)) }}
Delivery Date: {{ date('d M, Y', strtotime($order->updated_at)) }} @if ($order->location_id != null)
{{ optional($order->location)->name }}
@endif
Customer Info

Name: {{ optional($order->user)->full_name }}

Email: {{ optional($order->user)->email }}

Phone: {{ optional($order->user)->mobile }}


Payment Method: {{ ucwords(str_replace('_', ' ', $order->orderGroup->payment_method)) }}
Logistic: {{ $order->logistic_name }}
Status: {{ Str::title(Str::replace('_', ' ', $order->delivery_status)) }}
Shipping Address
@php $shippingAddress = $order->orderGroup->shippingAddress; @endphp

{{ optional($shippingAddress)->address_line_1 }}, {{ optional($shippingAddress->city_data)->name }}, {{ optional($shippingAddress->state_data)->name }}, {{ optional($shippingAddress->country_data)->name }}

@if (!$order->orderGroup->is_pos_order)
Billing Address
@php $billingAddress = $order->orderGroup->billingAddress; @endphp

{{ optional($billingAddress)->address_line_1 }}, {{ optional($billingAddress->city_data)->name }}, {{ optional($billingAddress->state_data)->name }}, {{ optional($billingAddress->country_data)->name }}

@endif
@foreach ($order->orderItems as $key => $item) @php $product = $item->product_variation->product; @endphp @endforeach @if ($order->orderGroup->total_tips_amount > 0) @endif @if ($order->orderGroup->total_coupon_discount_amount > 0) @endif
S/L Products Unit Price QTY Total Price
{{ $key + 1 }}

{{ $product->name }}

@foreach (generateVariationOptions($item->product_variation->combinations) as $variation) {{ $variation['name'] }}: @foreach ($variation['values'] as $value) {{ $value['name'] }} @endforeach @if (!$loop->last) , @endif @endforeach
{{ \Currency::format($item->unit_price) }} {{ $item->qty }} @if ($item->refundRequest && $item->refundRequest->refund_status == 'refunded') {{ $item->refundRequest->refund_status }} @endif {{ \Currency::format($item->total_price) }}
Sub Total:
{{ \Currency::format($order->orderGroup->sub_total_amount) }}
Tips:
{{ \Currency::format($order->orderGroup->total_tips_amount) }}
Tax:
{{ \Currency::format($order->orderGroup->total_tax_amount) }}
Delivery Charge:
{{ \Currency::format($order->orderGroup->total_shipping_cost) }}
Coupon Discount:
{{ \Currency::format($order->orderGroup->total_coupon_discount_amount) }}
Grand Total:
{{ \Currency::format($order->orderGroup->grand_total_amount) }}
{{-- footer end --}}