@extends('backend.layouts.app') @section('title', $title) @section('content')
{{$order->user->fullname()}} {{$order->user->roles()->first()->name}}
ID: {{$order->id}}
Code: {{$order->code}}
Created at:: {{$order->created_at->format('d/m/Y')}}
Currency: {{$order->currency->name}}
@if(!is_null($order->coupon_id))Coupon: {{$order->coupon->code}}
@endifCountry: {{$order->address->city->country->name}}
City: {{$order->address->city->name}}
Address: {{$order->address->address}}
Street: {{$order->address->street}}
@if(!is_null($order->address->flat_number))Flat: {{$order->address->flat_number}}
@endif @if(!is_null($order->address->villa_number))Villa: {{$order->address->villa_number}}
@endif @if(!is_null($order->address->postal_code))Postal: {{$order->address->postal_code}}
@endifPayment: {{$order->payment->name}}
@if(!is_null($order->invoice_id))Invoice id: {{$order->invoice_id}}
@endifPoints earned: {{$order->points_earned}}
Tax: {{Helper::calculatePrice($order->tax, $order->currency->getTranslation('code', 'en'))}} {{$order->currency->code}}
Shipping cost: {{Helper::calculatePrice($order->shipping_cost, $order->currency->getTranslation('code', 'en'))}} {{$order->currency->code}}
Subtotal: {{Helper::calculatePrice($order->subtotal, $order->currency->getTranslation('code', 'en'))}} {{$order->currency->code}}
Total: {{Helper::calculatePrice($order->total, $order->currency->getTranslation('code', 'en'))}} {{$order->currency->code}}
@if($order->deduct_from_wallet != 0)Deduct from wallet: {{Helper::calculatePrice($order->deduct_from_wallet, $order->currency->getTranslation('code', 'en'))}} {{$order->currency->code}}
@endif @if($order->deduct_from_points != 0)Deduct from points: {{Helper::calculatePrice(Helper::convertPointsToCurrency($order->deduct_from_points), $order->currency->getTranslation('code', 'en'))}} (Points: {{$order->deduct_from_points}})
@endif@php $deliveryColor = match ($order->delivery_status) { \App\Enums\OrderDeliveryStatus::PENDING,\App\Enums\OrderDeliveryStatus::CANCELLED,\App\Enums\OrderDeliveryStatus::RETURNED => "danger", \App\Enums\OrderDeliveryStatus::PROCESSED,\App\Enums\OrderDeliveryStatus::SHIPPED => "warning", \App\Enums\OrderDeliveryStatus::DELIVERED => "success", }; $paymentColor = match ($order->payment_status) { \App\Enums\OrderPaymentStatus::PENDING,\App\Enums\OrderPaymentStatus::FAILED,\App\Enums\OrderPaymentStatus::REFUNDED,\App\Enums\OrderPaymentStatus::CANCELLED => "danger", \App\Enums\OrderPaymentStatus::PAID => "success", }; @endphp Delivery status: {{$order->delivery_status}}
Payment status: {{$order->payment_status}}
Notes: {{$order->notes}}
| Product | Color | Size | Quantity | Unit price |
|---|---|---|---|---|
|
|
{{$item->variation->color->name}} | @if(isset($item->variation->size->size)) {{$item->variation->size->size}} {{$item->variation->size->unit}} @else N/A @endif | {{$item->quantity}} | {{Helper::calculatePrice($item->unit_price, $order->currency->getTranslation('code', 'en'))}} {{$order->currency->code}} |
Code:{{$order->coupon->code}}
@if($order->coupon->isFreeShippingCoupon())Free shipping
@elseType:{{$order->coupon->discount_type}}
Discount:{{$order->coupon->discount}} AED
@endif