@extends('admin.layouts.master') @section('content')

Order Preview

Invoice

Order #{{ $order->invoice_id }}

Deliver To:
Name: {!! @$order->userAddress->first_name !!} {!! @$order->userAddress->last_name !!}
Phone: {!! @$order->userAddress->phone !!}
Address: {!! @$order->userAddress->address !!}
Aria: {!! @$order->userAddress->deliveryArea->area_name !!}
Order Date:
{{ date('F d, Y / H:i', strtotime($order->created_at)) }}

Payment Method:
{{ $order->payment_method }}
Payment Status: @if(strtoupper($order->payment_status) == 'COMPLETED') COMPLETED @elseif(strtoupper($order->payment_status) == 'PENDING') PENDING @else {{ $order->payment_status }} @endif
Order Status:
@if($order->order_status === 'delivered') Delivered'; @elseif($order->order_status === 'declined') Declined'; @else {{ $order->order_status }} @endif

Order Summary

All items here cannot be deleted.

@foreach ($order->orderItems as $orderItem) @php $size = json_decode($orderItem->product_size); $options = json_decode($orderItem->product_option); $qty = $orderItem->qty; $untiPrice = $orderItem->unit_price; $sizePrice = $size->price; $optionPrice = 0; foreach ($options as $optionItem) { $optionPrice += $optionItem->price; } $productTotal = ($untiPrice + $sizePrice + $optionPrice) * $qty; @endphp @endforeach
# Item Size & Optional Price Quantity Totals
{{ ++$loop->index }} {{ $orderItem->product_name }} {{ @$size->name }} ({{ currencyPosition(@$size->price) }})
options:
@foreach ($options as $option) {{ @$option->name }} ({{ currencyPosition(@$option->price) }})
@endforeach
{{ currencyPosition($orderItem->unit_price) }} {{ $orderItem->qty }} {{ currencyPosition($productTotal) }}
@csrf @method('PUT')
Subtotal
{{ currencyPosition($order->subtotal) }}
Shipping
{{ currencyPosition($order->delivery_charge) }}
Discount
{{ currencyPosition($order->discount) }}

Total
{{ currencyPosition($order->grand_total) }}

@endsection @push('scripts') @endpush