@php use App\Models\OrderItems; use App\Services\MediaService; use App\Services\ShiprocketService; use App\Services\OrderService; @endphp
{{ labels('admin_labels.order_number', 'Order Number') }}

#{{ $order_detls[0]->id }}

{{ labels('admin_labels.order_date', 'Order Date') }} : {{ date('d M, Y', strtotime($order_detls[0]->created_at)) }}
{{ labels('admin_labels.order_note', 'Order Note') }} : {{ $order_detls[0]->notes ?? '' }}
@if ($is_customer_privacy_permission == 1)
{{ labels('admin_labels.customer_info', 'Customer Info') }}
{{ labels('admin_labels.name', 'Name') }}: {{ $order_detls[0]->user_name }}
{{ labels('admin_labels.mobile', 'Contact') }}: @if (!empty($order_detls[0]->mobile)) {{ $order_detls[0]->mobile }} @else {{ !empty($mobile_data[0]->mobile) ? $mobile_data[0]->mobile : '' }} @endif
{{ labels('admin_labels.email', 'Email') }}: {{ $order_detls[0]->email }}
@endif
{{ labels('admin_labels.shipping_info', 'Shipping Info') }}
{{ labels('admin_labels.name', 'Name') }}: {{ $order_detls[0]->user_name }}
{{-- @dd($mobile_data); --}}
{{ labels('admin_labels.mobile', 'Contact') }}: @if ($order_detls[0]->mobile != '' && isset($order_detls[0]->mobile)) {{ $order_detls[0]->mobile }} @else {{ $mobile_data->isNotEmpty() ? $mobile_data[0]->mobile : '' }} @endif
{{ labels('admin_labels.address', 'Address') }}: {{ $order_detls[0]->address }}
{{-- @dd($sellers[0]); --}}
{{ labels('admin_labels.seller_info', 'Seller Info') }}
{{ labels('admin_labels.seller_name', 'Seller Name') }}: {{ $sellers[0]['seller_name'] }}
{{ labels('admin_labels.mobile', 'Contact') }}: {{ $sellers[0]['seller_mobile'] }}
{{ labels('admin_labels.email', 'Email') }}: {{ $sellers[0]['seller_email'] }}
{{-- @dd($items); --}} @if ($items[0]['product_type'] == 'digital_product') @endif @php $total = 0; $tax_amount = 0; $item_subtotal = 0; @endphp @foreach ($items as $index => $item) @php $is_allow_to_ship_order = true; @endphp @if ($item['active_status'] == 'draft' || $item['active_status'] == 'awaiting') @php $is_allow_to_ship_order = false; @endphp @endif @php $selected = ''; $item['discounted_price'] = $item['discounted_price'] == '' ? 0 : $item['discounted_price']; $total += $subtotal = $item['quantity'] != 0 && ($item['discounted_price'] != '' && $item['discounted_price'] > 0) && $item['price'] > $item['discounted_price'] ? $item['price'] - $item['discounted_price'] : $item['price'] * $item['quantity']; $tax_amount += $item['tax_amount']; $total += $subtotal = $tax_amount; $item_subtotal += (float) $item['item_subtotal']; @endphp @if ($items[0]['product_type'] == 'digital_product') @endif @php $product_name = json_decode($item['pname'], true); $product_name = $product_name['en'] ?? ''; @endphp @php $badges = [ 'awaiting' => 'secondary', 'received' => 'primary', 'processed' => 'info', 'shipped' => 'warning', 'delivered' => 'success', 'returned' => 'danger', 'cancelled' => 'danger', 'return_request_approved' => 'success', 'return_request_decline' => 'danger', 'return_request_pending' => 'warning', 'return_pickedup' => 'success', ]; if ($item['active_status'] == 'return_request_pending') { $status = 'Return Requested'; } elseif ($item['active_status'] == 'return_request_approved') { $status = 'Return Approved'; } elseif ($item['active_status'] == 'return_request_decline') { $status = 'Return Declined'; } else { $status = $item['active_status']; } @endphp {!! json_encode([ 'id' => $item['id'], 'unit_price' => $item['price'], 'quantity' => $item['quantity'], 'delivered_quantity' => $item['delivered_quantity'], 'active_status' => $item['active_status'], ]) !!} @endforeach
{{ labels('admin_labels.id', 'Id') }} {{ labels('admin_labels.name', 'Name') }} {{ labels('admin_labels.image', 'Image') }} {{ labels('admin_labels.attachment', 'Attachment') }} {{ labels('admin_labels.quantity', 'Quantity') }} {{ labels('admin_labels.product_type', 'Product Type') }} {{ labels('admin_labels.variations', 'Variant') }} {{ labels('admin_labels.discount', 'Discounted Price') }} {{ labels('admin_labels.sub_total', 'Sub Total') }} {{ labels('admin_labels.active_status', 'Active Status') }}
{{ $index + 1 }}
{{ $product_name }}
@if (!empty($item['attachment'])) @endif {{ $item['quantity'] }} {{ str_replace('_', ' ', ucfirst($item['product_type'])) }} {{ isset($item['product_variants']) && !empty($item['product_variants'][0]['variant_values']) ? str_replace(',', ' | ', $item['product_variants'][0]['variant_values']) : '-' }} {{ $item['discounted_price'] > 0 ? $item['discounted_price'] : $item['price'] }} {{ $item['item_subtotal'] }} {{ $status }}
@if ($items[0]['product_type'] == 'digital_product')
@endif
@if ($items[0]['product_type'] != 'digital_product' && empty($order_tracking_data[0]['shipment_id']))
{{ labels('admin_labels.search', 'Search') }}
{{ labels('admin_labels.id', 'Id') }} {{ labels('admin_labels.order_id', 'Order Id') }} {{ labels('admin_labels.name', 'Name') }} {{ labels('admin_labels.status', 'Status') }} {{ labels('admin_labels.otp', 'OTP') }} {{ labels('admin_labels.date_created', 'Date Created') }} {{ labels('admin_labels.action', 'Action') }}
@endif
{{-- modal for create parcel --}} @if ($is_allow_to_ship_order == true) @endif {{-- shiprocket order parcel modal --}} {{-- modal for show parcel product details --}}