@extends('backEnd.layouts.master') @section('title', 'Order #' . $order->invoice_id) @section('content') @push('styles') @if($canCustomize ?? false) @endif @endpush
{{-- Left: Order Details --}}
@if($canCustomize ?? false) @include('backEnd.order.partials.customize-order') @else {{-- Order Items (read-only) --}}
Order Items ({{ $order->items->count() }})
@foreach($order->items as $i => $item) @endforeach @if($order->discount > 0) @endif @if($order->coupon_discount > 0) @endif
# Product Variant Price Qty Total
{{ $i + 1 }}
{{ $item->product_name }}
@if($item->product) SKU: {{ $item->product->sku ?? 'N/A' }} @endif
@if($item->size){{ $item->size }}@endif @if($item->color){{ $item->color }}@endif @if(!$item->size && !$item->color)@endif ৳{{ number_format($item->unit_price) }} {{ $item->qty }} ৳{{ number_format($item->unit_price * $item->qty) }}
Subtotal: ৳{{ number_format($order->items->sum(fn($i) => $i->unit_price * $i->qty)) }}
Shipping (+): ৳{{ number_format($order->shipping_charge) }}
Discount (-): -৳{{ number_format($order->discount) }}
Coupon ({{ $order->coupon_code }}): -৳{{ number_format($order->coupon_discount) }}
TOTAL DUE: ৳{{ number_format($order->amount) }}
@endif {{-- Customer read-only when not customizing --}} @if(!($canCustomize ?? false)) {{-- Customer & Shipping Info --}}
Customer & Shipping
CUSTOMER
{{ $order->customer_name }}
{{ $order->customer_phone }} @can('customers.block') @if($activeBlock) Blocked
@csrf @method('DELETE')
@else @endif @endcan
@if($blockIp ?? null)
IP: {{ $blockIp }}
@endif @if($order->customer_email)
{{ $order->customer_email }}
@endif
{{-- Phone History Result --}}
SHIPPING ADDRESS
{{ $order->shipping_address }}
@if($order->district)
{{ $order->district }}
@endif @if($order->upazila)
{{ $order->upazila }}
@endif @if($order->district || $order->upazila)
{{ $order->district }}@if($order->upazila) >> {{ $order->upazila }}@endif
@endif
@endif {{-- Courier & Fulfillment --}} @if($order->courier_type || $order->consignment_id || $order->fulfillment_stage)
Courier & Fulfillment
Courier
{{ $order->courier_type ? \App\Models\CourierApi::displayName($order->courier_type) : '—' }}
Consignment ID
{{ $order->consignment_id ?: '—' }}
Stage
{{ $order->fulfillment_stage ? ucwords(str_replace('_', ' ', $order->fulfillment_stage)) : '—' }}
@if($order->collected_at)Collected: {{ $order->collected_at->format('d M, h:i A') }}@endif @if($order->booked_at)Booked: {{ $order->booked_at->format('d M, h:i A') }}@endif @if($order->packed_at)Packed: {{ $order->packed_at->format('d M, h:i A') }}@endif @if($order->shipped_at)Shipped: {{ $order->shipped_at->format('d M, h:i A') }}@endif @if($order->delivered_at)Delivered: {{ $order->delivered_at->format('d M, h:i A') }}@endif
@endif {{-- Delivery Status + Courier Timeline --}} @include('backEnd.order.partials.delivery-status')
{{-- Right: Order Summary & Actions --}}
@include('backEnd.order.partials.manual-payment-review') {{-- Order Summary --}}
Order Summary
@if((float) ($order->advance_amount ?? 0) > 0) @if((float) ($order->due_amount ?? 0) > 0) @endif @endif @if($order->courier_type) @endif @if($order->consignment_id) @endif @if($order->fulfillment_stage) @endif @if($order->collected_at) @endif @if($order->booked_at) @endif @if($order->packed_at) @endif @if($order->shipped_at) @endif @if($order->delivered_at) @endif @if($order->admin_note) @endif
Invoice ID #{{ $order->invoice_id }}
Date {{ $order->created_at->format('d M Y') }}
Payment @if(\App\Services\ManualPaymentService::isManual($order->payment_method)) {{ \App\Services\ManualPaymentService::label($order->payment_method) }} @else {{ strtoupper($order->payment_method ?? 'COD') }} @endif @if($order->payment_status === 'pending_verification') Awaiting Verify @endif
Advance Paid ৳{{ number_format($order->advance_amount) }}
Due (COD) ৳{{ number_format($order->due_amount) }}
Source {{ \App\Models\Order::sourceLabel($order->order_source ?? 'website') }}
Status {{ \App\Models\Order::statusLabel($order->order_status) }}
Courier {{ \App\Models\CourierApi::displayName($order->courier_type) }}
Tracking ID {{ $order->consignment_id }}
Fulfillment {{ ucwords(str_replace('_', ' ', $order->fulfillment_stage)) }}
Collected{{ $order->collected_at->format('d M Y, h:i A') }}
Booked{{ $order->booked_at->format('d M Y, h:i A') }}
Packed{{ $order->packed_at->format('d M Y, h:i A') }}
Shipped{{ $order->shipped_at->format('d M Y, h:i A') }}
Delivered{{ $order->delivered_at->format('d M Y, h:i A') }}
Admin Notes:
@include('backEnd.order.partials.order-note-list', ['noteText' => $order->admin_note])
{{-- Update Status --}}
Update Status
@csrf @method('PATCH')
Settings-এ ON থাকা courier + manual list — এক dropdown
{{-- Send SMS --}}
Send SMS
{{-- Quick Actions --}}
@can('customers.block') @if(!$activeBlock) @php $blockCustomer = $order->customer ?? new \App\Models\Customer([ 'id' => $order->customer_id, 'name' => $order->customer_name, 'phone' => $order->customer_phone, ]); @endphp @include('backEnd.customer.partials.block-modal', ['modalId' => 'orderDetailBlockModal', 'customer' => $blockCustomer]) @endif @endcan @endsection @push('scripts') @if($canCustomize ?? false) @endif @endpush