@extends('mainlayout.layout') @section('title', config('app.name') . ' | Orders') @section('topbar-search', 'enabled') @section('content') @php $ordersIndexUrl = request()->routeIs('support.orders.index') ? route('support.orders.index') : url('/property/list/orders'); @endphp
Order management

Orders

Monitor order value, progress and customer purchase activity.

Total orders{{ number_format($metrics['total']) }}
Current orders{{ number_format($metrics['current']) }}
Completed orders{{ number_format($metrics['completed']) }}
Total order valueTZS {{ number_format($metrics['value']) }}
@if(request()->filled('per_page'))@endif @if(request()->filled('search') || request()->filled('status')) Clear @endif

{{ request()->filled('search') || request()->filled('status') ? 'Matching orders' : 'Recent orders' }}

{{ request()->filled('search') || request()->filled('status') ? 'All matching orders, with adjustable page sizes.' : 'Newest orders first. Choose how many results to show per page.' }}

@if($orders->total()) {{ number_format($orders->firstItem()) }}–{{ number_format($orders->lastItem()) }} of {{ number_format($orders->total()) }} @else 0 orders @endif
Loading orders…
@forelse($orders as $order) @php $orderUrl = request()->routeIs('support.orders.index') ? route('support.orders.show', $order) : url('/property/orders/view/' . encrypt($order->id)); $customerName = trim(optional($order->user)->first_name . ' ' . optional($order->user)->middle_name . ' ' . optional($order->user)->last_name); $statusLabel = $order->status_description ?: ([0 => 'Generated', 1 => 'Initialized', 2 => 'Completed', 3 => 'Expired', 4 => 'Cancelled', 5 => 'Refunded'][$order->status] ?? 'Status ' . $order->status); @endphp @empty @endforelse
Order IDCustomerProperty & plotPayment planAmountStatusCreated
{{ $order->referenceid ?: '#' . $order->id }}Internal #{{ $order->id }} {{ $customerName ?: 'Unknown customer' }}{{ optional($order->user)->phone ?: ($order->phonenumber ?: ($order->msisdn ?: 'Phone not available')) }} {{ optional($order->property)->name ?: 'Property unavailable' }}Plot {{ optional($order->plot)->plotnumber ?: 'not selected' }} {{ ucfirst($order->order_type ?: 'Not specified') }} TZS {{ number_format((int) $order->amount) }} {{ $statusLabel }}@if($order->ownerDisbursementOrder)Paid to owner@elseif((int) $order->status === 2)Awaiting disbursement@endif {{ optional($order->created_at)->format('d M Y') ?: '—' }}{{ optional($order->created_at)->format('H:i') }}
No orders match the current search.
@include('partials.directory-pagination', ['paginator' => $orders])
@endsection @push('scripts') @endpush