@extends('layouts.app') @section('title', 'Invoices') @push('styles') @endpush @section('content')
{{-- ── HEADER ── --}}

Invoices

Ministry of Fisheries & Ocean Resources — Local Fish Licensing System

{{-- ── TOOLBAR ── --}}
All Invoices ({{ $invoices->total() }} total)
{{-- ── SUCCESS FLASH ── --}} @if(session('success'))
{{ session('success') }}
@endif {{-- ── TABLE ── --}}
@forelse($invoices as $invoice) @php $showRoute = auth()->user()?->role === 'admin' ? route('admin.invoice.show', $invoice) : route('reviewer.invoice.show', $invoice); $badgeClass = match($invoice->status) { 'paid' => 'badge-paid', 'overdue' => 'badge-overdue', 'cancelled' => 'badge-cancelled', 'draft' => 'badge-draft', default => 'badge-pending', }; @endphp {{-- Invoice number --}} {{-- Applicant --}} {{-- Company type --}} {{-- Duration --}} {{-- Total --}} {{-- Status badge --}} {{-- Due date --}} {{-- Proof of Payment ← ADD THIS ENTIRE CELL --}} {{-- View action --}} @empty @endforelse
Invoice # Applicant Company Type Duration Total Status Due Date Proof of Payment
{{ $invoice->invoice_number }}
{{ $invoice->application?->companyDetail?->registered_name ?? $invoice->application?->cd_business_name ?? '—' }}
App #{{ $invoice->application_id ?? '—' }}
{{ ucfirst($invoice->company_type ?? '—') }} {{ $invoice->license_duration === '6months' ? '6 Months' : '12 Months' }} ${{ number_format($invoice->total_amount, 2) }} {{ ucfirst($invoice->status ?? 'pending') }} {{ $invoice->due_date ? \Carbon\Carbon::parse($invoice->due_date)->format('d M Y') : '—' }} @if($invoice->proof_of_payment_path) View @if($invoice->proof_of_payment_uploaded_at)
{{ \Carbon\Carbon::parse($invoice->proof_of_payment_uploaded_at)->format('d M Y') }}
@endif @else Not uploaded @endif
View

No invoices found.

{{-- ── PAGINATION ── --}} @if($invoices->hasPages())
{{ $invoices->links() }}
@endif
{{-- /.invoice-card --}}
{{-- /.invoice-wrap --}}
{{-- /.invoice-page --}} @endsection