{{-- resources/views/purchase/index.blade.php --}} @extends('layouts.finance.finance') @section('content')
{{-- Page Header --}}

Purchase Management

{{-- Purchase Overview Stats --}}

Total Committed PO Value

₹{{ number_format($stats['total_po_value'], 2) }}

Pending Approvals

{{ $stats['pending_approvals_count'] }}

Verified GRNs

{{ $stats['completed_grns_count'] }}

{{-- 1. SECTION: PURCHASE ORDERS --}}

Recent Purchase Orders

@forelse($purchaseOrders as $po) @empty @endforelse
PO Number Vendor Items Total Amount Status Action
{{ $po->po_number }} {{ $po->vendor->company_name }} {{ $po->items_count }} items ₹{{ number_format($po->total_amount, 2) }} {{ ucfirst($po->status) }} View
No Purchase Orders found.
{{-- 2. SECTION: APPROVALS QUEUE --}}

Pending Due Approvals Queue

Manage Approvals →
@forelse($pendingApprovals as $approval) @empty @endforelse
Document Amount Action
{{ $approval->po_number }}
Vendor: {{ $approval->vendor->company_name ?? 'N/A' }}
₹{{ number_format($approval->total_amount, 2) }} {{-- Pay Due Button triggering the modal --}}
All caught up! No pending approvals.
{{-- 3. SECTION: GOODS RECEIVED NOTES (GRN) --}}

Goods Received Notes (GRN)

Inward Registry →
@forelse($grns as $grn) @empty @endforelse
GRN No. Ref PO Received Date
{{ $grn->grn_number }}
{{ $grn->vendor_name }}
{{ $grn->po_number }} {{ \Carbon\Carbon::parse($grn->received_date)->format('M d, Y') }}
No goods received logs found.
{{-- ADD PAYMENT MODAL --}} {{-- END ADD PAYMENT MODAL --}}
@endsection