@extends('layouts.app') @section('title', 'Purchase orders') @section('content')

Purchase orders

{{ $orders->total() }} order(s) matching your filters.

+ New purchase order
@include('components.kpi', ['label' => 'Open value', 'value' => money($totals['open']), 'variant' => 'warn']) @include('components.kpi', ['label' => 'Received', 'value' => money($totals['received']), 'variant' => 'good']) @include('components.kpi', ['label' => 'Awaiting receipt', 'value' => (string) $totals['pending'], 'variant' => 'info']) @include('components.kpi', ['label' => 'Drafts', 'value' => (string) $totals['drafts']])
@if ($orders->isEmpty()) @include('components.empty-state', [ 'icon' => '📦', 'title' => 'No purchase orders yet', 'message' => 'Raise one to buy CPE, radios or fibre from a supplier.', ]) @else @foreach ($orders as $order) @endforeach
PO numberSupplierOrderedExpected WarehouseTotalStatus
{{ $order->po_number }} {{ $order->supplier?->name ?: '—' }} {{ $order->order_date?->format('d M Y') }} {{ $order->expected_date?->format('d M Y') ?: '—' }} {{ $order->warehouse?->name ?: '—' }} {{ money($order->total) }} {{ title_case_words($order->status) }} Open
@endif
@if ($orders->hasPages())
{{ $orders->links('partials.pagination') }}
@endif
@endsection