{{ $order->restaurant->name }}
{{ $order->restaurant->address }}
{{ Carbon\Carbon::parse($order['created_at'])->locale(app()->getLocale())->translatedFormat('d/M/Y ' . config('timeformat')) }}
{{ translate('phone') }} : {{ $order->restaurant->phone }}
@if ($order->restaurant->gst_status)
{{ translate('Gst_No') }} : {{ $order->restaurant->gst_code }}
@endif
{{ translate('Order_Type') }} {{ $order->order_type == 'delivery' ? translate('Home_Delivery'): translate($order->order_type) }}
{{ translate('Order_ID') }} {{ $order['id'] }}
@if ($order->order_type == 'dine_in' && $order?->OrderReference?->table_number )
{{ translate('Table_Number') }} {{ $order?->OrderReference?->table_number }}
@endif @if ($order->order_type == 'dine_in' && $order?->OrderReference?->token_number )
{{ translate('Token_Number') }} {{ $order?->OrderReference?->token_number }}
@endif @if ($order?->delivery_address)
{{ translate('Customer_Name') }} {{ isset($order->delivery_address) ? json_decode($order->delivery_address, true)['contact_person_name'] : '' }}
{{ translate('messages.phone') }} {{ isset($order->delivery_address) ? json_decode($order->delivery_address, true)['contact_person_number'] : '' }}
@if (!in_array($order->order_type, ['dine_in','take_away']) )
{{ translate('messages.delivery_Address') }} {{ isset($order->delivery_address) ? json_decode($order->delivery_address, true)['address'] : '' }}
@if (isset($order->delivery_address) && isset(json_decode($order->delivery_address, true)['road']) )
{{ translate('messages.street_No') }}: {{ json_decode($order->delivery_address, true)['road'] }}
@endif @if (isset($order->delivery_address) && isset(json_decode($order->delivery_address, true)['house']) )
{{ translate('messages.House') }}: {{ json_decode($order->delivery_address, true)['house'] }}
@endif @if (isset($order->delivery_address) && isset(json_decode($order->delivery_address, true)['floor']) )
{{ translate('messages.floor') }}: {{ json_decode($order->delivery_address, true)['floor'] }}
@endif
@endif @elseif($order?->customer)
{{ translate('Customer_Name') }} {{ $order?->customer?->f_name .' '. $order?->customer?->l_name}}
{{ translate('messages.phone') }} {{ $order?->customer?->phone}}
@else
{{ translate('Customer_Name') }} : {{ translate('messages.walk_in_customer')}}
@endif
@php($sub_total = 0) @php($total_tax = 0) @php($total_dis_on_pro = 0) @php($add_ons_cost = 0) @foreach ($order->details as $detail) @if ($detail->food_id || $detail->campaign == null) @php($sub_total += $amount) @php($total_tax += $detail['tax_amount'] * $detail['quantity']) @elseif($detail->campaign) @php($sub_total += $amount) @php($total_tax += $detail['tax_amount'] * $detail['quantity']) @endif @endforeach
{{ translate('messages.QTY') }} {{ translate('messages.item') }} {{ translate('messages.price') }}
{{ $detail['quantity'] }}x {{ json_decode($detail->food_details, true)['name'] }}
@if (count(json_decode($detail['variation'], true)) > 0) {{ translate('messages.variation') }} : @foreach(json_decode($detail['variation'],true) as $variation) @if ( isset($variation['name']) && isset($variation['values'])) {{ $variation['name']}} - @foreach ($variation['values'] as $value) {{ $value['label']}} : {{\App\CentralLogics\Helpers::format_currency( $value['optionPrice'])}} @endforeach @else @if (isset(json_decode($detail['variation'],true)[0])) @foreach(json_decode($detail['variation'],true)[0] as $key1 =>$variation)
{{$key1}} : {{$variation}}
@endforeach @endif @break @endif @endforeach @else
{{ translate('messages.Price') }} : {{ \App\CentralLogics\Helpers::format_currency($detail->price) }}
@endif @foreach (json_decode($detail['add_ons'], true) as $key2 => $addon) @if ($key2 == 0) {{ translate('messages.addons') }} : @endif
{{ $addon['name'] }} : {{ $addon['quantity'] }} x {{ \App\CentralLogics\Helpers::format_currency($addon['price']) }}
@php($add_ons_cost += $addon['price'] * $addon['quantity']) @endforeach
@php($amount = $detail['price'] * $detail['quantity']) {{ \App\CentralLogics\Helpers::format_currency($amount) }}
{{ $detail['quantity'] }} {{ $detail->campaign['title'] }}
@if (count(json_decode($detail['variation'], true)) > 0) {{ translate('messages.variation') }} : @foreach(json_decode($detail['variation'],true) as $variation) @if ( isset($variation['name']) && isset($variation['values'])) {{ $variation['name']}} - @foreach ($variation['values'] as $value)     {{ $value['label']}} : {{\App\CentralLogics\Helpers::format_currency( $value['optionPrice'])}} @endforeach @else @if (isset(json_decode($detail['variation'],true)[0])) @foreach(json_decode($detail['variation'],true)[0] as $key1 =>$variation)
{{$key1}} : {{$variation}}
@endforeach @endif @break @endif @endforeach @else
{{ translate('messages.Price') }} : {{ \App\CentralLogics\Helpers::format_currency($detail->price) }}
@endif @foreach (json_decode($detail['add_ons'], true) as $key2 => $addon) @if ($key2 == 0) {{ translate('messages.addons') }} : @endif
{{ $addon['name'] }} : {{ $addon['quantity'] }} x {{ \App\CentralLogics\Helpers::format_currency($addon['price']) }}
@php($add_ons_cost += $addon['price'] * $addon['quantity']) @endforeach
@php($amount = $detail['price'] * $detail['quantity']) {{ \App\CentralLogics\Helpers::format_currency($amount) }}
{{ translate('Items_Price') }}
{{ \App\CentralLogics\Helpers::format_currency($sub_total) }}
{{ translate('Addon_Cost') }}
{{ \App\CentralLogics\Helpers::format_currency($add_ons_cost) }}
{{ translate('messages.subtotal') }} @if ($order->tax_status == 'included' ) ({{ translate('messages.TAX_Included') }}) @endif
{{ \App\CentralLogics\Helpers::format_currency($sub_total + $add_ons_cost) }}
{{ translate('messages.discount') }}
- {{ \App\CentralLogics\Helpers::format_currency($order['restaurant_discount_amount']) }}
{{ translate('messages.coupon_discount') }}
- {{ \App\CentralLogics\Helpers::format_currency($order['coupon_discount_amount']) }}
@if ($order['ref_bonus_amount'] > 0)
{{ translate('messages.Referral_Discount') }}:
- {{ \App\CentralLogics\Helpers::format_currency($order['ref_bonus_amount']) }}
@endif @if ($order->tax_status == 'excluded' || $order->tax_status == null )
{{ translate('messages.vat/tax') }}
{{ \App\CentralLogics\Helpers::format_currency($order['total_tax_amount']) }}
@endif
{{ translate('messages.delivery_man_tips') }}
@php($dm_tips = $order['dm_tips']) {{ \App\CentralLogics\Helpers::format_currency($dm_tips) }}
{{ translate('messages.delivery_charge') }}
@php($del_c = $order['delivery_charge']) {{ \App\CentralLogics\Helpers::format_currency($del_c) }} @if (\App\CentralLogics\Helpers::get_business_data('additional_charge_status') == 1 || $order['additional_charge'] > 0) @php($additional_charge_status = 1) @else @php($additional_charge_status = 0)
@endif
@if ($additional_charge_status )
{{ \App\CentralLogics\Helpers::get_business_data('additional_charge_name')??translate('messages.additional_charge') }}:
+ {{ \App\CentralLogics\Helpers::format_currency($order['additional_charge']) }}
@endif @if ($order['extra_packaging_amount'] > 0)
{{ translate('messages.Extra_Packaging_Amount') }}:
+ {{ \App\CentralLogics\Helpers::format_currency($order['extra_packaging_amount']) }}
@endif
{{ translate('messages.total') }}
{{ \App\CentralLogics\Helpers::format_currency($order['order_amount'] ) }}
@if ($order?->payments) @foreach ($order?->payments as $payment) @if ($payment->payment_status == 'paid') @if ( $payment->payment_method == 'cash_on_delivery')
{{ translate('messages.Paid_with_Cash') }} ({{ translate('COD')}})
@else
{{ translate('messages.Paid_by') }} {{ translate($payment->payment_method)}}
@endif @else
{{ translate('Due_Amount') }} ({{ $payment->payment_method == 'cash_on_delivery' ? translate('messages.COD') : translate($payment->payment_method) }}) :
@endif
{{ \App\CentralLogics\Helpers::format_currency($payment->amount) }}
@endforeach @endif
{{ translate('Paid_by') }} : {{ translate(str_replace('_', ' ', $order['payment_method'])) }} @if ($order->adjusment > $order->order_amount) {{translate('messages.amount')}}: {{$order->adjusment}} {{translate('messages.change')}}: {{$order->adjusment - $order->order_amount}} @endif
{{ translate('messages.THANK_YOU') }}
{{ translate('for_ordering_food_from') }} {{\App\Models\BusinessSetting::where(['key'=>'business_name'])->first()->value}}
© {{date('Y')}} {{\App\Models\BusinessSetting::where(['key'=>'business_name'])->first()->value}}. {{translate('messages.all_right_reserved')}}