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

Purchase Orders

Track orders sent to suppliers and their linked customer revenue.

New Purchase Order
@forelse($pos as $po) @empty @endforelse
PO Info Customer Job Item Description Total Cost Status Actions
{{ $po->po_number }}
{{ $po->supplier->name }}
{{ $po->order_date->format('d/m/Y') }}
{{ $po->clientInvoice->invoice_number ?? 'N/A' }}
{{ $po->clientInvoice->client->name ?? '' }}
{{ $po->item_description }}
{{ (float)$po->quantity }} {{ $po->uom }} @ ${{ number_format($po->unit_price, 2) }}
RM{{ number_format($po->total_price, 2) }} @php $statusMap = [ 'draft' => 'bg-gray-100 text-gray-800', 'ordered' => 'bg-blue-100 text-blue-800', 'received' => 'bg-indigo-100 text-indigo-800', 'invoiced' => 'bg-purple-100 text-purple-800', 'paid' => 'bg-green-100 text-green-800', ]; @endphp {{ ucfirst($po->status) }}
@csrf @method('DELETE')
No purchase orders found.
{{ $pos->links() }}
@endsection