@extends('admin.layouts.app') @section('title', 'Order ' . $order->order_number) @section('content')
Back to Orders
Send Invoice to Customer

Order Details

{{ $order->status_badge['label'] }}
Order Number
{{ $order->order_number }}
Date
{{ $order->created_at->format('M d, Y h:i A') }}

@csrf @method('PATCH')
@csrf @method('PATCH')

Customer Information

Name
{{ $order->customer_name }}
@if($order->shipping_address)
Shipping Address
{{ $order->shipping_address }}
@if($order->city || $order->county)
{{ $order->city }}{{ $order->county ? ', ' . $order->county : '' }}
@endif
@endif @if($order->notes)
Order Notes
{{ $order->notes }}
@endif

Order Items

@foreach($order->items as $item) @endforeach
Product SKU Price Quantity Subtotal
{{ $item->product_name }} @if($item->includes_installation)
+ Installation
@endif
{{ $item->product_sku }} KSh {{ number_format($item->price, 2) }} {{ $item->quantity }} KSh {{ number_format($item->subtotal, 2) }} @if($item->includes_installation)
+ KSh {{ number_format($item->installation_price * $item->quantity, 2) }} installation
@endif
Subtotal KSh {{ number_format($order->subtotal, 2) }}
@if($order->shipping_cost > 0)
Shipping KSh {{ number_format($order->shipping_cost, 2) }}
@endif @if($order->installation_cost > 0)
Installation KSh {{ number_format($order->installation_cost, 2) }}
@endif @if($order->installation_discount > 0)
Installation Discount (Shop Customer) - KSh {{ number_format($order->installation_discount, 2) }}
@endif @if($order->discount > 0)
Discount - KSh {{ number_format($order->discount, 2) }}
@endif
Total KSh {{ number_format($order->total, 2) }}
@if($order->payments->count() > 0)

Payment History

@foreach($order->payments as $payment) @endforeach
Method Transaction ID Amount Status Date
{{ strtoupper($payment->payment_method) }} {{ $payment->transaction_id ?? '-' }} KSh {{ number_format($payment->amount, 2) }} {{ $payment->status_badge['label'] }} {{ $payment->created_at->format('M d, Y h:i A') }}
@endif @endsection