@php use App\Constants\Constant; use App\Http\Helpers\Uploader; @endphp Document

{{ $keywords['ORDER INVOICE'] ?? __('ORDER INVOICE') }}

{{ $keywords['Order Details'] ?? __('Order Details') }}

@if (!empty($order->token_no)) @endif @if (!empty($order->shipping_method)) @endif @if (!empty($order->shipping_method)) @endif
{{ $keywords['Token No'] ?? __('Token No') }}: #{{ $order->token_no }}
{{ $keywords['Order Number'] ?? __('Order Number') }}: #{{ $order->order_number }}
{{ $keywords['Order Date'] ?? __('Order Date') }}: {{ $order->created_at->format('d-m-Y') }}
{{ $keywords['Serving Method'] ?? __('Serving Method') }}: @if (strtolower($order->serving_method) == 'on_table') {{ $keywords['On Table'] ?? __('On Table') }} @elseif(strtolower($order->serving_method) == 'home_delivery') {{ $keywords['Home Delivery'] ?? __('Home Delivery') }} @elseif(strtolower($order->serving_method) == 'pick_up') {{ $keywords['Pick up'] ?? __('Pick up') }} @endif
{{ $keywords['Payment Method'] ?? __('Payment Method') }}: {{ $order->method }}
{{ $keywords['Payment Status'] ?? __('Payment Status') }}: {{ $order->payment_status }}
{{ $keywords['Shipping Method'] ?? __('Shipping Method') }}: {{ $order->shipping_method }}
{{ $keywords['Shipping Charge'] ?? __('Shipping Charge') }}: {{ $userBe->base_currency_text_position == 'left' ? $userBe->base_currency_text : '' }} {{ $order->shipping_charge }} {{ $userBe->base_currency_text_position == 'right' ? $userBe->base_currency_text : '' }}
{{ $keywords['Grand Total'] ?? __('Grand Total') }}: {{ $userBe->base_currency_text_position == 'left' ? $userBe->base_currency_text : '' }} {{ $order->total }} {{ $userBe->base_currency_text_position == 'right' ? $userBe->base_currency_text : '' }}

@if ($order->serving_method == 'home_delivery') {{ $keywords['Billing Details'] ?? __('Billing Details') }} @else {{ $keywords['Information'] ?? __('Information') }} @endif

@if (!empty($order->billing_lname)) @endif @if (!empty($order->billing_email)) @endif @if (!empty($order->billing_number)) @endif @if (!empty($order->billing_address)) @endif @if (!empty($order->billing_city)) @endif @if (!empty($order->billing_country)) @endif @if ($order->serving_method == 'on_table') @if (!empty($order->table_number)) @endif @if (!empty($order->waiter_name)) @endif @endif @if ($order->serving_method == 'pick_up') @if (!empty($order->pick_up_date)) @endif @if (!empty($order->pick_up_time)) @endif @endif
{{ $keywords['Billing Name'] ?? __('Billing Name') }}: {{ $order->billing_fname }} {{ $order->billing_lname }}
{{ $keywords['Billing Email'] ?? __('Billing Email') }}: {{ $order->billing_email }}
{{ $keywords['Billing Number'] ?? __('Billing Number') }}: {{ $order->billing_number }}
{{ $keywords['Billing Address'] ?? __('Billing Address') }}: {{ $order->billing_address }}
{{ $keywords['Billing City'] ?? __('Billing City') }}: {{ $order->billing_city }}
{{ $keywords['Billing Country'] ?? __('Billing Country') }}: {{ $order->billing_country }}
{{ $keywords['Table Number'] ?? __('Table Number') }}: {{ $order->table_number }}
{{ $keywords['Waiter Name'] ?? __('Waiter Name') }}: {{ $order->waiter_name }}
{{ $keywords['Pick up Date'] ?? __('Pick up Date') }}: {{ $order->pick_up_date }}
{{ $keywords['Pick up Time'] ?? __('Pick up Time') }}: {{ $order->pick_up_time }}
@if ($order->serving_method == 'home_delivery')

{{ $keywords['Shipping Details'] ?? __('Shipping Details') }}

{{ $keywords['Shipping Name'] ?? __('Shipping Name') }}: {{ $order->shipping_fname }} {{ $order->shipping_lname }}
{{ $keywords['Shipping Email'] ?? __('Shipping Email') }}: {{ $order->shipping_email }}
{{ $keywords['Shipping Number'] ?? __('Shipping Number') }}: {{ $order->shipping_number }}
{{ $keywords['Shipping Address'] ?? __('Shipping Address') }}: {{ $order->shipping_address }}
{{ $keywords['Shipping City'] ?? __('Shipping City') }}: {{ $order->shipping_city }}
{{ $keywords['Shipping Country'] ?? __('Shipping Country') }}: {{ $order->shipping_country }}
@endif

{{ $keywords['Ordered Products'] ?? __('Ordered Products') }}

@foreach ($order->orderitems as $key => $item) @endforeach
# Product Title Price Qty Total
{{ $key + 1 }}

{{ $item->title }}

@php $variations = json_decode($item->variations, true); @endphp @if (!empty($variations))

{{ $keywords['Variation'] ?? __('Variation') }}:
@foreach ($variations as $vKey => $variation) {{ str_replace('_', ' ', $vKey) }}: {{ $variation['name'] }} @if (!$loop->last) , @endif @endforeach

@endif @php $addons = json_decode($item->addons, true); @endphp @if (!empty($addons))

{{ $keywords['Addons'] ?? __('Addons') }}: @foreach ($addons as $addon) {{ $addon['name'] }} @if (!$loop->last) , @endif @endforeach

@endif

{{ $keywords['Product'] ?? __('Product') }}: {{ $order->currency_code_position == 'left' ? $order->currency_code : '' }} {{ (float) $item->product_price }} {{ $order->currency_code_position == 'right' ? $order->currency_code : '' }}

@if (is_array($variations))

{{ $keywords['Variation'] ?? __('Variation') }}: {{ $order->currency_code_position == 'left' ? $order->currency_code : '' }} {{ (float) $item->variations_price }} {{ $order->currency_code_position == 'right' ? $order->currency_code : '' }}

@endif @if (is_array($addons))

{{ $keywords['Addons'] ?? __('Addons') }}: {{ $order->currency_code_position == 'left' ? $order->currency_code : '' }} {{ (float) $item->addons_price }} {{ $order->currency_code_position == 'right' ? $order->currency_code : '' }}

@endif
{{ $item->qty }} {{ $order->currency_code_position == 'left' ? $order->currency_code : '' }} {{ $item->total }} {{ $order->currency_code_position == 'right' ? $order->currency_code : '' }}