@extends('admin.layouts.app') @section('page-title') Order Details #{{ $order->id }} @endsection @section('content')
@if ($order->trashed())

This order has been deleted.

@endif

Date

{{ $order->created_at->format('F d, Y') }}

Order reference

{{ $order->order_reference }}

@if($order->voucher)

Voucher

{{ $order->voucher->code }}

@endif

#{{ $order->order_reference }} {{ $order->payment_status }} {{ $order->status }}

{{ $order->created_at->format('F d, Y \a\t g:i a') }}

@if (!$order->trashed())
@csrf @method('PATCH')
@endif

Progress

@php use App\Enums\OrderStatus; $progressSteps = [ OrderStatus::Pending, OrderStatus::Processing, OrderStatus::Shipping, OrderStatus::Delivered, OrderStatus::Completed ]; $currentStatus = $order->status; @endphp
@foreach($progressSteps as $step)
{{ $step->label() }}
@endforeach

Products

@foreach($order->items as $item) @endforeach
Product Name & Size Quantity Price Tax Total Amount Discount Discount type
{{ $item->product->name }}

Size : {{ $item->size }}

{{ $item->quantity }} {{ number_format($item->unit_price, 2) }} {{ number_format($item->tax, 2) }} {{ number_format(($item->total_price * $item->quantity), 2) }} {{ $item->discount_amount }} {{ $item->discount_type }}

Order Summary

Sub Total :

{{ number_format($order->total_amount, 2) }} €

Discount :

-{{ number_format($order->discount_amount, 2) }} €

Delivery Charge :

{{ number_format($order->shipping_cost, 2) }} €

Estimated Tax :

{{ number_format($order->tax, 2) }} €

Payment Information

{{ $order->payment_method }}

Transaction ID : {{ $order->transaction_id }}

Customer Details

{{ $order->user->firstname }} {{ $order->user->lastname }}
{{ $order->user->email }}
Contact Number

{{ $order->user->phonenumber }}

Shipping Address

{{ $order->getFormattedShippingAddress() }}

Billing Address
@if($order->billing_same_as_shipping)

Same as shipping address

@else

{{ $order->getFormattedBillingAddress() }}

@endif
@endsection @section('scripts') @endsection