@extends('layouts/layoutMaster') @section('title', __('locale.Order Details')) @section('vendor-style') @vite(['resources/assets/css/datatables.scss', 'resources/assets/vendor/libs/raty-js/raty-js.scss', 'resources/assets/vendor/scss/pages/app-invoice.scss']) @endsection @section('vendor-script') @vite(['resources/assets/js/datatables.js', 'resources/assets/vendor/libs/raty-js/raty-js.js', 'resources/assets/js/star-ratings.js']) @endsection @section('content') @php $currency = $order->currency ?? Helper::setting('currency_symbol', 'currency'); @endphp
{{ __('locale.Order') }} #{{ $order->order_id }} {{ $order->payment_status }} {{ $order->status }}

{{ $order->created_at->format('d, M') }} {{ $order->created_at->format('Y') }}, {{ $order->created_at->format('h:i A') }}

@foreach ($order->items as $item) @endforeach
{{ __('Image') }} {{ __('locale.Products') }} {{ __('locale.Price') }} {{ __('locale.Qty') }} {{ __('locale.Total') }}
@php $img=$item->product?->image?->file ?? ''; @endphp Avatar
{{ $item->name ?? 'N/A' }} {{ $currency }}{{ number_format($item->price, 2) }} {{ $item->quantity }} {{ $currency }}{{ number_format($item->price * $item->quantity, 2) }}
{{ __('locale.Subtotal') }}:
{{ $currency }}{{ number_format($order->subtotal, 2) }}
{{ __('locale.Discount') }}:
{{ $currency }}{{ number_format($order->discount ?? 0, 2) }}
{{ __('locale.Shipping') }}:
{{ $currency }}{{ number_format($order->shipping ?? 0, 2) }}
{{ __('locale.Tax') }}:
{{ $currency }}{{ number_format($order->tax ?? 0, 2) }}
{{ __('locale.Total') }}:
{{ $currency }}{{ number_format($order->grand_total, 2) }}
{{ __('locale.Shipping Activity') }}
    @forelse($order->statusLogs->sortBy('created_at') as $log)
  • {{ str_replace('_', ' ', $log->status) }}
    {{ $log->created_at->format('l h:i A') }}

    {{ Helper::getStatusMessage($log->status) }}

  • @empty
  • {{ __('locale.No Status Updates') }}
  • @endforelse
@if ( $order->status == 'Ready' || $order->status == 'Dispatched' || $order->status == 'Out for Delivery' || $order->status == 'Delivered')
@else @endif @if (auth()->user()->user_type == 'Admin')
{{ __('locale.Driver Details') }}
@if (!empty($order->ride))
{{ $order->ride?->driver?->user?->name }}

{{ $order->ride?->driver?->address }}, {{ $order->ride?->driver?->city }}

{{ __('locale.Contact info') }}

{{ __('locale.Email') }}: {{ $order->ride?->driver?->user?->email ?? 'N/A' }}

{{ __('locale.Phone') }}: {{ $order->ride?->driver?->user?->dial_code ?? 'N/A' }}{{ $order->ride?->driver?->user?->phone ?? 'N/A' }}

@else
{{ __('locale.Assign Driver') }}
@endif
@endif @if (auth()->user()->user_type != 'Store')
{{ __('locale.Store Details') }}
{{ $order->store->user->name }}

{{ $order->store->address }}, {{ $order->store->city }}

{{ __('locale.Contact info') }}

{{ __('locale.Email') }}: {{ $order->store?->user?->email ?? 'N/A' }}

{{ __('locale.Phone') }}: {{ $order->store?->user?->dial_code ?? 'N/A' }}{{ $order->store?->user?->phone ?? 'N/A' }}

@endif
{{ __('locale.Customer details') }}
Avatar
{{ $order->user->name ?? 'N/A' }}
{{ __('locale.Customer ID') }}: #{{ $order->user->id }}
{{ __('locale.Contact info') }}

{{ __('locale.Email') }}: {{ $order->user->email ?? 'N/A' }}

{{ __('locale.Phone') }}: {{ $order->user->phone ?? 'N/A' }}

@php $address = is_array($order->address) ? $order->address : json_decode($order->address, true); @endphp
{{ __('locale.Shipping Address') }}
@if (!empty($address))

{{ $address['name'] ?? '' }}
{{ $address['address'] ?? '' }}
{{ $address['city'] ?? '' }} - {{ $address['postcode'] ?? '' }}
{{ $address['state'] ?? '' }}
{{ $address['country'] ?? '' }}

@else

{{ __('locale.No address available.') }}

@endif
{{ __('locale.Platform Commission') }}

{{ $order->currency }} {{ $order->platform_commission }}

{{ __('locale.Payment Details') }}

{{ __('locale.Payment Type') }}: {{ $order->payment_type }}

@if ($order->transaction)

{{ __('locale.Txn ID') }}: {{ $order->transaction->txn_id ?? 'N/A' }}

{{ __('locale.Payment Type') }}: {{ $order->transaction->payment_mode ?? 'N/A' }}

{{ __('locale.Amount') }}: {{ $order->transaction->currency ?? $currency }}{{ $order->transaction->amount ?? 0 }}

@endif
@include('store.orders.invoice')
@include('_partials/_offcanvas/offcanvas-send-invoice') @endsection @section('page-script') @endsection