@php use App\Utils\Helpers; @endphp @extends('layouts.back-end.app') @section('title', translate('order_details')) @push('css_or_js') @endpush @section('content')

{{translate('order_details')}}

{{translate('order_details')}} #{{$order['id']}}

{{date('d M, Y , h:i A',strtotime($order['created_at']))}}
@if ($linked_orders->count() >0)
{{translate('linked_orders')}} ({{$linked_orders->count().':'}})
@foreach($linked_orders as $linked) {{$linked['id']}} @endforeach
@endif
@if ($order->order_note !=null)
{{'#'.translate('note').':'}}
{{$order->order_note}}
@endif
@if (isset($order->verificationImages) && count($order->verificationImages)>0 && $order->verification_status ==1)
@endif
@if (isset($shipping_address['latitude']) && isset($shipping_address['longitude'])) @else @endif
{{translate('print_Invoice')}}
{{translate('status')}}: @if($order['order_status']=='pending') {{translate(str_replace('_',' ',$order['order_status']))}} @elseif($order['order_status']=='failed') {{ $order['order_status'] === 'failed' ? translate('failed_to_Deliver') : ''}} @elseif($order['order_status']=='processing' || $order['order_status']=='out_for_delivery') {{translate(str_replace('_',' ',$order['order_status'] == 'processing' ? 'Packaging' : $order['order_status']))}} @elseif($order['order_status']=='delivered' || $order['order_status']=='confirmed') {{translate(str_replace('_',' ',$order['order_status']))}} @else {{translate(str_replace('_',' ',$order['order_status']))}} @endif
{{translate('payment_Method').':'}} {{translate($order['payment_method'])}}
@if($order->payment_method != 'cash_on_delivery' && $order->payment_method != 'pay_by_wallet' && !isset($order->offline_payments))
{{translate('reference_Code')}} : {{str_replace('_',' ',$order['transaction_ref'])}} {{ $order->payment_method == 'offline_payment' ? '('.$order->payment_by.')':'' }}
@endif @if($order->payment_method == 'offline_payment' && isset($order->offline_payments)) @foreach (json_decode($order->offline_payments->payment_info) as $key=>$item) @if (isset($item) && $key != 'method_id')
{{translate($key)}} : {{ $item }}
@endif @endforeach @endif
{{translate('payment_Status')}}: @if($order['payment_status']=='paid') {{translate('paid')}} @else {{translate('unpaid')}} @endif
@if(isset($order->payment_note) && $order->payment_method == 'offline_payment')
{{translate('payment_Note')}}: {{ $order->payment_note }}
@endif @if(getWebConfig(name: 'order_verification')) {{translate('order_verification_code').':'.$order['verification_code']}} @endif
@php($item_price=0) @php($subtotal=0) @php($total=0) @php($shipping=0) @php($discount=0) @php($tax=0) @php($row=0) @foreach($order->details as $key=>$detail) @if($detail->productAllStatus) @php($subtotal=$detail['price']*$detail['qty']+$detail['tax']-$detail['discount']) @php($item_price+=$detail['price']*$detail['qty']) @php($discount+=$detail['discount']) @php($tax+=$detail['tax']) @php($total+=$subtotal) @endif @php($sellerId=$detail->seller_id) @if(isset($detail->productAllStatus->digital_product_type) && $detail->productAllStatus->digital_product_type == 'ready_after_sell') @php($product_details = json_decode($detail->product_details)) @endif @endforeach
{{translate('SL')}} {{translate('item Details')}} {{translate('variations')}} {{translate('tax')}} {{translate('discount')}} {{translate('price')}}
{{ ++$row }}
{{translate('image_description')}}
{{substr($detail->productAllStatus['name'],0,30)}}{{strlen($detail->productAllStatus['name'])>10?'...':''}}
{{translate('qty')}} : {{$detail['qty']}}
{{translate('unit_price')}} : {{setCurrencySymbol(amount: usdToDefaultCurrency(amount: $detail['price']+($detail->tax_model =='include' ? $detail['tax']:0)), currencyCode: getCurrencyCode())}} @if ($detail->tax_model =='include') ({{translate('tax_incl.')}}) @else ({{translate('tax').":".($detail->productAllStatus->tax)}}{{$detail->productAllStatus->tax_type ==="percent" ? '%' :''}}) @endif
@if ($detail->variant)
{{translate('variation')}} : {{$detail['variant']}}
@endif
@if($detail->productAllStatus->digital_product_type == 'ready_after_sell') @endif
{{ setCurrencySymbol(amount: usdToDefaultCurrency(amount: $detail['price']*$detail['qty']), currencyCode: getCurrencyCode()) }} {{ setCurrencySymbol(amount: usdToDefaultCurrency(amount: $detail['tax']), currencyCode: getCurrencyCode()) }} {{setCurrencySymbol(amount: usdToDefaultCurrency(amount: $detail['discount']), currencyCode: getCurrencyCode())}}{{setCurrencySymbol(amount: usdToDefaultCurrency(amount: $subtotal), currencyCode: getCurrencyCode())}}
@php($shipping=$order['shipping_cost']) @php($coupon_discount=$order['discount_amount'])
{{translate('item_price')}}
{{setCurrencySymbol(amount: usdToDefaultCurrency(amount:$item_price))}}
{{translate('sub_total')}}
{{setCurrencySymbol(amount: usdToDefaultCurrency(amount:$total))}}
{{translate('coupon_discount')}}
{{'-'.setCurrencySymbol(amount: usdToDefaultCurrency(amount:$coupon_discount))}}
{{translate('vat').'/'.translate('tax')}}
{{setCurrencySymbol(amount: usdToDefaultCurrency(amount:$tax))}}
{{translate('shipping')}}
{{setCurrencySymbol(amount: usdToDefaultCurrency(amount:$shipping))}}
@php($delivery_fee_discount = 0) @if ($order['is_shipping_free'])
{{translate('delivery_fee_discount')}} ({{ translate($order['free_delivery_bearer']) }} {{translate('bearer')}})
{{'-'.' '.setCurrencySymbol(amount: usdToDefaultCurrency(amount:$shipping))}}
@php($delivery_fee_discount = $shipping) @endif @if($order['coupon_discount_bearer'] == 'inhouse' && !in_array($order['coupon_code'], [0, NULL]))
{{translate('coupon_discount').'('.translate('admin_bearer').')'}}
{{'+'.' '.setCurrencySymbol(amount: usdToDefaultCurrency(amount:$coupon_discount))}}
@php($total += $coupon_discount) @endif
{{translate('total')}}
{{setCurrencySymbol(amount: usdToDefaultCurrency(amount:$total+$shipping-$coupon_discount -$delivery_fee_discount))}}

{{translate('order_&_shipping_info')}}

{{translate('payment_status')}}
{{ $order->payment_status=='paid' ? translate('paid'):translate('unpaid')}}
@if($physical_product)
  • @if ($order->shipping_type == 'order_wise') @endif
  • @if (isset($order->deliveryMan))
    {{translate('image')}}
    {{ isset($order->delivery_man) ? $order->deliveryMan->f_name.' '.$order->delivery_man->l_name :''}}
    {{isset($order->deliveryMan) ? $order->deliveryMan->phone :''}}
    @else
    {{translate('image')}}
    {{translate('no_delivery_man_assigned')}}
    @endif
  • @if (isset($order->delivery_man))
  • @endif
  • Image
    {{ $order?->delivery_service_name ?? translate('not_assign_yet')}}
    {{translate('track_ID').' '.':'.' '.$order->third_party_delivery_tracking_id}}
@endif
@if(!$order->is_guest && $order->customer)

{{translate('customer_information')}}

{{translate('image')}}
{{$order->customer['f_name'].' '.$order->customer['l_name']}} {{$orderCount}} {{translate('orders')}} {{$order->customer['phone']}} {{$order->customer['email']}}
@else
@if($order->is_guest)

{{translate('guest_customer')}}

@else
{{ translate('no_customer_found') }}
@endif
@endif
@if($physical_product)
@php($shipping_address=$order['shipping_address_data']) @if($shipping_address)

{{translate('shipping_address')}}

{{translate('name')}} : {{$shipping_address->contact_person_name}}
{{translate('contact')}}: {{$shipping_address->phone}}
{{translate('city')}}: {{$shipping_address->city}}
{{translate('zip_code')}} : {{$shipping_address->zip}}
{{$shipping_address->address ?? translate('empty')}}
@else
{{translate('no_shipping_address_found')}}
@endif
@endif
@php($billing=$order['billing_address_data']) @if($billing)

{{translate('billing_address')}}

{{translate('name')}} : {{$billing->contact_person_name}}
{{translate('contact')}}: {{$billing->phone}}
{{translate('city')}}: {{$billing->city}}
{{translate('zip_code')}} : {{$billing->zip}}
{{$billing->address}}
@else
{{translate('no_billing_address_found')}}
@endif

{{translate('shop_information')}}