@extends('layouts.app')
@section('title', 'Purchase')
@section('page', 'purchases')
@php
$statusVariant = fn ($s) => match ($s) {
'Received' => 'success',
'Ordered' => 'info',
'Partial' => 'warning',
'Cancelled' => 'danger',
default => 'neutral',
};
@endphp
@section('content')
@if (session('success'))
Total Orders {{ $totalOrders }} Ordered {{ $ordered }} Received {{ $received }} Total Value {{ number_format($totalValue, 2) }}
@empty
{{ $row->po_number }}
{{ $row->purchase_date?->format('Y-m-d') }}
{{ $row->supplier?->name ?? '—' }}
{{ $row->warehouse?->name ?? '—' }}
{{ $row->items_count }}
{{ number_format((float) $row->total, 2) }}
@endforelse
No purchase orders for this period. Adjust the date filter or add a purchase.