@extends('layouts.app') @section('title', $purchase->po_number) @section('page-title', 'Purchase Order Detail') @section('content')
Supplier
{{ $purchase->supplier?->name ?? 'Direct Purchase' }}
@if($purchase->supplier?->contact_person)
{{ $purchase->supplier->contact_person }}
@endif @if($purchase->supplier?->phone)
{{ $purchase->supplier->phone }}
@endif
Branch
{{ $purchase->branch?->name ?? '—' }}
{{ $purchase->purchase_date->format('M j, Y') }}
@foreach($purchase->items as $i => $item) @endforeach
# Product Qty Cost/Unit (USD) Subtotal
{{ $i+1 }}
{{ $item->product?->name }}
{{ $item->product?->sku }}
{{ number_format($item->quantity) }} ${{ number_format($item->unit_price_usd,4) }} ${{ number_format($item->subtotal_usd,2) }}
TOTAL (USD)${{ number_format($purchase->total_usd,2) }}
TOTAL (LRD)LRD {{ number_format($purchase->total_local,2) }}
@if($purchase->notes)
Notes: {{ $purchase->notes }}
@endif
Order Summary
Total Units{{ number_format($purchase->items->sum('quantity')) }}
SKUs{{ $purchase->items->count() }}
Branch{{ $purchase->branch?->name }}
Processed by{{ $purchase->user?->name }}
Total${{ number_format($purchase->total_usd,2) }}
@endsection