@extends('frontend.layouts.user.master') @section('title', 'Dashboard') @section('content')

Order Single

Back to all orders

Order ID: #{{ $order->order_number }}

@php // $orderstatus = 'pending','approved','decline','packing','performa_invoice','invoice_review','delivered','cancelled','completed','shipping','invoiced','shipped' $status = $order->status; $color = ''; if ($status == 'pending') { $color = 'warning'; } elseif ($status == 'approved') { $color = 'primary'; } elseif ($status == 'decline') { $color = 'danger'; } elseif ($status == 'packing') { $color = 'info'; } elseif ($status == 'performa_invoice') { $color = 'success'; } elseif ($status == 'invoice_review') { $color = 'secondary'; } elseif ($status == 'delivered') { $color = 'success'; } elseif ($status == 'cancelled') { $color = 'danger'; } elseif ($status == 'completed') { $color = 'success'; } elseif ($status == 'shipping') { $color = 'info'; } elseif ($status == 'invoiced') { $color = 'success'; } elseif ($status == 'shipped') { $color = 'success'; } else { $color = 'dark'; } @endphp {{ ucwords(str_replace('_', ' ', $status)) }}
@php $invoice = $order->invoices()->first(); @endphp
@php $order_cannot_be_cancelled = [ 'invoiced', 'packed', 'shipped', 'delivered', 'completed', 'shipping', 'declined', 'cancelled', ]; @endphp @if ((!$invoice || $invoice->status != 'real') && !in_array($order->status, $order_cannot_be_cancelled)) Cancel Order @endif @if ($invoice && $invoice->status != 'draft') @if ($order->hasRefundRequest()) Refund Request @endif See Invoice @endif
Customer Details

{{ $order->user->first_name . ' ' . $order->user->last_name }}
{{ $order->user->email }}
{{ $order->user->phone }}

{{-- View Profile --}}
@php $shippingAddress = $order->shippingAddress; @endphp @if ($shippingAddress)
Shipping Address

{{ $shippingAddress->first_name . ' ' . $shippingAddress->last_name }}
{{ $shippingAddress->email }}
{{ $shippingAddress->phone }}
{{ $shippingAddress->address_line_1 }}
{{ $shippingAddress->address_line_2 }}
{{ $shippingAddress->city }}
{{ $shippingAddress->post_code }}

@endif @php $pickupAddress = $order->pickupAddress; @endphp @if ($pickupAddress)
Pickup Address

Name: {{ $pickupAddress->name }}

Phone: {{ $pickupAddress->phone }}

Note: {{ $pickupAddress->note }}

@endif
Order Details

Order ID: {{ $order->order_number }}
Order Date: {{ $order->created_at->format('d M Y, h:i A') }}
Order Total: £{{ $order->grand_total }}

@foreach ($order->orderDetails as $item) @endforeach @if ($order->vat_tax_amount != null && $order->vat_tax_amount > 0) @endif
Products Price Quantity Total
{{ $item->product->name }}
{{ $item->product->specification }}
£{{ $item->price }} {{ $item->quantity }} £{{ $item->total_amount }}
Items Sub Total £{{ $order->total_amount }}
Shipping Charges @if (is_null($order->shipping_charges)) Still not added @else £{{ $order->shipping_charges }} @endif
VAT Tax ({{ $order->vat_tax_percentage }}%) £{{ $order->vat_tax_amount }}
Grand Total £{{ $order->grand_total }}
Payment Info
Payment Method: {{ $order->payment_method == 'stripe' ? 'Payment before Delivery' : 'Payment after Delivery' }}
Payment Status: @php // $paymentStatus = 'pending','credit','paid' $paymentStatus = $order->payment_status; $color = ''; if ($paymentStatus == 'pending') { $color = 'warning'; } elseif ($paymentStatus == 'credit') { $color = 'primary'; } elseif ($paymentStatus == 'paid') { $color = 'success'; } @endphp {{ ucwords($paymentStatus) }}
@if ($order->status == 'cancelled')

REASON FOR CANCELLATION: {{ $order->cancelled_reason }}

@endif
@if (!empty($order->notes))
{{--
Notes
--}} {{-- Save Notes --}}

NOTES: {{ $order->notes }}

@endif
{{--

Invoice Negotiation

Hello, I'd like to negotiate the invoice price.

Customer - 2 hours ago

Sure, what price are you proposing?

Admin - 1 hour ago

I can offer $500 for this invoice.

Customer - 30 minutes ago
--}} @endsection