@extends('layouts.back-end.app-seller') @section('title',\App\CPU\translate('Order Details')) @push('css_or_js') @endpush @section('content')

{{\App\CPU\translate('order_details')}}

{{\App\CPU\translate('Order_ID')}} #{{$order['id']}}

{{date('d M Y H:i:s',strtotime($order['created_at']))}}
@if (isset($shipping_address['latitude']) && isset($shipping_address['longitude'])) @else @endif
{{\App\CPU\translate('Print')}} {{\App\CPU\translate('invoice')}}
{{\App\CPU\translate('Status')}}: @if($order['order_status']=='pending') {{str_replace('_',' ',$order['order_status'])}} @elseif($order['order_status']=='failed') {{str_replace('_',' ','Failed To Deliver')}} @elseif($order['order_status']=='processing' || $order['order_status']=='out_for_delivery') {{str_replace('_',' ',$order['order_status'] == 'processing' ? 'Packaging' : $order['order_status'])}} @elseif($order['order_status']=='delivered' || $order['order_status']=='confirmed') {{str_replace('_',' ',$order['order_status'])}} @else {{str_replace('_',' ',$order['order_status'])}} @endif
{{\App\CPU\translate('Payment')}} {{\App\CPU\translate('Method')}} : {{\App\CPU\translate(str_replace('_',' ',$order['payment_method']))}}
@if($order->payment_method != 'cash_on_delivery' && $order->payment_method != 'pay_by_wallet')
{{\App\CPU\translate('Reference')}} {{\App\CPU\translate('Code')}} : {{str_replace('_',' ',$order['transaction_ref'])}} {{ $order->payment_method == 'offline_payment' ? '('.$order->payment_by.')':'' }}
@endif
{{\App\CPU\translate('Payment_Status')}}: @if($order['payment_status']=='paid') {{\App\CPU\translate('Paid')}} @else {{\App\CPU\translate('Unpaid')}} @endif
@if($order->payment_method == 'offline_payment')
{{\App\CPU\translate('Payment_Note')}}: {{ $order->payment_note }}
@endif @if(\App\CPU\Helpers::get_business_settings('order_verification')) {{\App\CPU\translate('order_verification_code')}} : {{$order['verification_code']}} @endif
@if ($order->order_note !=null) {{\App\CPU\translate('order_note')}} :

{{$order->order_note}}

@endif
@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->product) @php($subtotal=$detail['price']*$detail->qty+$detail['tax']-$detail['discount']) @if(isset($detail->product->digital_product_type) && $detail->product->digital_product_type == 'ready_after_sell') @endif @php($discount+=$detail['discount']) @php($tax+=$detail['tax']) @php($shipping+=$detail->shipping ? $detail->shipping->cost :0) @php($total+=$subtotal) @endif @endforeach
{{\App\CPU\translate('SL')}} {{\App\CPU\translate('Item Details')}} {{\App\CPU\translate('Variations')}} {{\App\CPU\translate('Tax')}} {{\App\CPU\translate('Discount')}} {{\App\CPU\translate('Price')}}
{{ ++$row }}
Image Description
{{substr($detail->product['name'],0,30)}}{{strlen($detail->product['name'])>10?'...':''}}
{{\App\CPU\translate('price')}} : {{\App\CPU\BackEndHelper::set_symbol(\App\CPU\BackEndHelper::usd_to_currency($detail['price']))}}
{{\App\CPU\translate('qty')}} : {{$detail->qty}}
@if($detail->product->digital_product_type == 'ready_after_sell') @endif
{{$detail['variant']}} {{\App\CPU\BackEndHelper::set_symbol(\App\CPU\BackEndHelper::usd_to_currency($detail['tax']))}} {{\App\CPU\BackEndHelper::set_symbol(\App\CPU\BackEndHelper::usd_to_currency($detail['discount']))}}{{\App\CPU\BackEndHelper::set_symbol(\App\CPU\BackEndHelper::usd_to_currency($subtotal))}}

@php($shipping=$order['shipping_cost']) @php($coupon_discount=$order['discount_amount'])
{{\App\CPU\translate('Shipping')}}
{{\App\CPU\BackEndHelper::set_symbol(\App\CPU\BackEndHelper::usd_to_currency($shipping))}}
{{\App\CPU\translate('coupon_discount')}}
- {{\App\CPU\BackEndHelper::set_symbol(\App\CPU\BackEndHelper::usd_to_currency($coupon_discount))}}
@if($order['coupon_discount_bearer'] == 'inhouse' && !in_array($order['coupon_code'], [0, NULL]))
{{\App\CPU\translate('coupon_discount')}} ({{\App\CPU\translate('admin_bearer')}})
+ {{\App\CPU\BackEndHelper::set_symbol(\App\CPU\BackEndHelper::usd_to_currency($coupon_discount))}}
@php($total += $coupon_discount) @endif
{{\App\CPU\translate('Total')}}
{{\App\CPU\BackEndHelper::set_symbol(\App\CPU\BackEndHelper::usd_to_currency($total+$shipping-$coupon_discount))}}

{{\App\CPU\translate('Order_&_Shipping_Info')}}

@if(($order['payment_method']=='cash_on_delivery' || $order['payment_method']=='offline_payment') && $shipping_method=='sellerwise_shipping')
@endif @if($physical_product)
  • @if ($order->shipping_type == 'order_wise')
  • @endif @if ($shipping_method=='sellerwise_shipping')
  • @endif
  • {{\App\CPU\translate('delivery_service_name')}} : {{$order->delivery_service_name}}
    {{\App\CPU\translate('tracking_id')}} : {{$order->third_party_delivery_tracking_id}}
@endif
@if($order->customer)

{{\App\CPU\translate('Customer_information')}}

Image
{{$order->customer['f_name'].' '.$order->customer['l_name']}} {{\App\Model\Order::where('customer_id',$order['customer_id'])->count()}} {{\App\CPU\translate('orders')}} {{$order->customer['phone']}} {{$order->customer['email']}}
@else
{{\App\CPU\translate('no_customer_found')}}
@endif
@if($physical_product)
@if($order->customer)

{{\App\CPU\translate('shipping_address')}}

@if($order->shippingAddress) @php($shipping_address=$order->shippingAddress) @else @php($shipping_address=json_decode($order['shipping_address_data'])) @endif
{{\App\CPU\translate('Name')}} : {{$shipping_address? $shipping_address->contact_person_name : ''}}
{{\App\CPU\translate('Contact')}}: {{$shipping_address ? $shipping_address->phone : ''}}
{{\App\CPU\translate('City')}}: {{$shipping_address ? $shipping_address->city : ''}}
{{\App\CPU\translate('zip_code')}} : {{$shipping_address ? $shipping_address->zip : ''}}
{{$shipping_address ? $shipping_address->address : ''}}
@else
{{\App\CPU\translate('no_customer_found')}}
@endif
@endif
@if($order->customer)

{{\App\CPU\translate('billing_address')}}

@if($order->billingAddress) @php($billing=$order->billingAddress) @else @php($billing=json_decode($order['billing_address_data'])) @endif
{{\App\CPU\translate('Name')}} : {{$billing? $billing->contact_person_name : ''}}
{{\App\CPU\translate('Contact')}}: {{$billing ? $billing->phone : ''}}
{{\App\CPU\translate('City')}}: {{$billing ? $billing->city : ''}}
{{\App\CPU\translate('zip_code')}} : {{$billing ? $billing->zip : ''}}
{{$billing ? $billing->address : ''}}
@else
{{\App\CPU\translate('no_customer_found')}}
@endif

{{\App\CPU\translate('Shop_Information')}}

@if(!empty($order->seller->shop))
{{ $order->seller->shop->name }}
{{ $total_delivered }} {{\App\CPU\translate('Orders Served')}} {{ $order->seller->shop->contact }}
{{ $order->seller->shop->address }}
@else
{{\App\CPU\translate('no_data_found')}}
@endif
@endsection @push('script') @endpush