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
| 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) }} | ||