{{-- resources/views/purchases/orders/show.blade.php --}} @extends('layouts.app') @section('title', 'PO ' . $po->po_number) @section('page_title', $po->po_number) @section('page_subtitle', 'Purchase Order · ' . $po->supplier?->name) @section('content') @php $sc = [ 'pending' => ['bg'=>'#fef3c7','color'=>'#92400e'], 'approved' => ['bg'=>'#dbeafe','color'=>'#1e40af'], 'partially_received' => ['bg'=>'#e0f2fe','color'=>'#0369a1'], 'fully_received' => ['bg'=>'#d1fae5','color'=>'#065f46'], 'cancelled' => ['bg'=>'#fee2e2','color'=>'#991b1b'], 'rejected' => ['bg'=>'#fee2e2','color'=>'#991b1b'], ][$po->status] ?? ['bg'=>'#f1f5f9','color'=>'#475569']; @endphp {{-- Action bar --}}
| Description | Unit | Ordered | Received | Unit Price | Total |
|---|---|---|---|---|---|
| {{ $item->description }} | {{ $item->unit ?? '—' }} | {{ $item->quantity_ordered }} | {{ $item->quantity_received }} @if(!$fullyReceived && $item->quantity_received > 0) ({{ $remaining }} remaining) @endif @if($fullyReceived) @endif | {{ $po->currency }} {{ number_format($item->unit_price, 2) }} | {{ $po->currency }} {{ number_format($item->total_price, 2) }} |
| TOTAL | {{ $po->currency }} {{ number_format($po->total_amount, 2) }} | ||||
| GRN # | Date | Items | Status | |
|---|---|---|---|---|
| {{ $grn->grn_number }} | {{ $grn->received_date->format('d M Y') }} | {{ $grn->items->count() }} {{ Str::plural('item', $grn->items->count()) }} | {{ ucfirst($grn->status) }} | View → |
| Reference | Method | Amount | Date |
|---|---|---|---|
| {{ $payment->reference }} | {{ ucfirst(str_replace('_', ' ', $payment->payment_method)) }} | {{ $payment->currency }} {{ number_format($payment->amount, 2) }} | {{ $payment->paid_at->format('d M Y') }} |