Purchase #{{ $purchase->reference_no ?? 'N/A' }}

Purchase #{{ $purchase->reference_no ?? 'N/A' }}

Supplier: {{ $purchase->supplier?->name ?? '—' }}

Date: {{ $purchase->purchase_date ? $purchase->purchase_date->format('d M Y') : '—' }}

Status: @switch(strtolower($purchase->status ?? 'draft')) @case('confirmed') Confirmed @break @case('draft') Draft @break @default {{ ucfirst($purchase->status ?? 'Unknown') }} @endswitch

@if (strtolower($purchase->status ?? '') === 'draft')
@csrf
@endif

Purchased Items

@forelse ($purchase->items as $item) @empty @endforelse
Product Quantity Buying Price Line Total
{{ $item->product?->name ?? '—' }} {{ $item->quantity ?? 0 }} {{ number_format($item->buying_price ?? 0, 2) }} {{ number_format($item->line_total ?? 0, 2) }}
No items in this purchase.
Grand Total {{ number_format($purchase->total ?? 0, 2) }}
@if ($purchase->notes)

Notes

{{ $purchase->notes }}
@endif