Payments & Invoicing — ProcureFlow Payments & Invoicing @php $totalPayable = $invoices->sum('amount'); $pendingCount = $invoices->where('status', 'pending_approval')->count(); $totalPaid = $invoices->where('status', 'paid')->sum('amount'); $overdueCount = $invoices->filter(fn($i) => $i->status !== 'paid' && $i->due_date?->isPast())->count(); $currency = $invoices->first()?->currency ?? 'USD'; $statusBadge = ['pending_approval' => 'badge-yellow', 'approved' => 'badge-blue', 'paid' => 'badge-green', 'rejected' => 'badge-red', 'void' => 'badge-gray']; @endphp {{-- ═══════════ STAT CARDS ═══════════ --}}
Total Payables
{{ $currency }} {{ number_format($totalPayable, 2) }}
{{ $invoices->count() }} invoice{{ $invoices->count() !== 1 ? 's' : '' }} total
Pending Approval
{{ $pendingCount }} Invoice{{ $pendingCount !== 1 ? 's' : '' }}
@if($overdueCount > 0) {{ $overdueCount }} overdue @else Awaiting authorization @endif
Total Paid
{{ $currency }} {{ number_format($totalPaid, 2) }}
{{ $invoices->where('status','paid')->count() }} payment{{ $invoices->where('status','paid')->count() !== 1 ? 's' : '' }} settled
{{-- ═══════════ INVOICE TABLE ═══════════ --}}
Financial Commitments
Supplier invoices & payment authorizations — Section 14
@forelse ($invoices as $invoice) @empty @endforelse
Invoice # Supplier / Contract Amount Due Date Status Action
{{ $invoice->invoice_number }}
{{ $invoice->contract->supplier->name }}
{{ $invoice->contract->contract_number }}
{{ $invoice->currency }} {{ number_format($invoice->amount, 2) }} {{ $invoice->due_date->format('M d, Y') }} {{ ucfirst(str_replace('_', ' ', $invoice->status)) }} View
No Invoices Yet
When invoices are submitted, they will appear here.
@if($invoices->hasPages()) @endif