@extends('admin.layouts.app') @section('title','Reports') @section('breadcrumb','Reports') @section('content')
OPERATIONS REPORTING

Reports

Operational and customer activity for {{ $periodLabel }}.

Export CSV ↓
Reporting periodAll figures update to match the selected period.
Reset
@php $reportIcons = [ 'package' => '□', 'check-circle' => '✓', 'truck' => '↗', 'x-circle' => '×', 'users' => '♙', 'file-text' => '▤', 'receipt' => '▧', ]; $reportKpis = [ ['Total Shipments', $stats['orders'], 'package', 'navy'], ['Delivered', $stats['delivered'], 'check-circle', 'green'], ['In Transit', $stats['in_transit'], 'truck', 'blue'], ['Cancelled', $stats['cancelled'], 'x-circle', 'red'], ['New Customers', $stats['customers'], 'users', 'purple'], ['Quotes', $stats['quotes'], 'file-text', 'amber'], ['Invoices', $stats['invoices'], 'receipt', 'orange'], ]; @endphp
@foreach($reportKpis as $item)
{{ $item[0] }}{{ $reportIcons[$item[2]] ?? '▧' }}
{{ number_format($item[1]) }}{{ $periodLabel }}
@endforeach

Shipment Status

How shipments are progressing in this period.

{{ $stats['orders'] }} total
@forelse($statusMix as $status => $count)
{{ $status ?: 'Unspecified' }}{{ number_format($count) }} {{ number_format(($count / max(1, $totalStatusShipments)) * 100, 0) }}%
@empty
No shipment status data for this period.
@endforelse

Shipment Service Mix

Shipment records grouped by courier service.

{{ $serviceMix->count() }} services
@forelse($serviceMix as $service => $count)
{{ $service ?: 'Other' }}{{ number_format($count) }} {{ number_format(($count / max(1, $totalServiceShipments)) * 100, 0) }}%
@empty
No shipment service data for this period.
@endforelse

Shipment Details

Latest shipments within {{ $periodLabel }}.

Up to 10 records
@forelse($recentShipments as $shipment) @empty @endforelse
Tracking IDCustomerDestinationServiceStatusDate
{{ $shipment->tracking_id }}{{ optional($shipment->user)->name ?? '—' }}{{ trim(($shipment->destination_city ?? '') . ', ' . ($shipment->destination_country ?? ''), ', ') ?: '—' }}{{ $shipment->service_type ?: '—' }}{{ $shipment->status ?: 'Unknown' }}{{ optional($shipment->created_at)->format('d M Y') ?? '—' }}
No shipments found for the selected period.

Counts are based on record creation dates in the selected period. Financial totals are not shown here because a created invoice or displayed payment QR does not by itself confirm that money was received.

@endsection