@extends("admin.layouts.app") @section("title", __("admin.invoices.title")) @section("content")
@foreach(["" => "All", "unpaid" => "Unpaid", "paid" => "Paid", "overdue" => "Overdue", "cancelled" => "Cancelled", "draft" => "Draft"] as $val => $label) @php $isActive = (request("status","") == $val); @endphp $val]) }}" style="display:inline-block;padding:8px 16px;font-size:13px;text-decoration:none;color:{{ $isActive ? "#1a4d80" : "#666" }};font-weight:{{ $isActive ? "700" : "400" }};border-bottom:{{ $isActive ? "3px solid #1a4d80" : "3px solid transparent" }};margin-bottom:-1px;"> {{ $label }} @endforeach
@forelse($invoices as $invoice) @php $badgeClass = match(strtolower($invoice->status ?? "")) { "active", "paid" => "badge-paid", "pending" => "badge-pending", "unpaid" => "badge-unpaid", "overdue" => "badge-overdue", "suspended" => "badge-suspended", "terminated" => "badge-terminated", "cancelled" => "badge-cancelled", "fraud" => "badge-fraud", "draft" => "badge-draft", "refunded" => "badge-refunded", default => "badge-cancelled", }; @endphp @empty @endforelse
{{ __('common.table.invoice_num') }} {{ __('common.table.client') }} {{ __('common.table.date') }} {{ __('common.table.due_date') }} {{ __('common.table.total') }} {{ __('common.table.status') }} {{ __('common.table.actions') }}
#{{ $invoice->id }} @if($invoice->client) client_id) }}" style="color:#337ab7;text-decoration:none;">{{ $invoice->client->full_name }} @else N/A @endif {{ $invoice->date?->format("d M Y") ?? "-" }} {{ $invoice->due_date?->format("d M Y") ?? "-" }} ${{ number_format($invoice->total, 2) }} {{ ucfirst($invoice->status ?? "") }} {{ __('common.actions.view') }}
{{ __('admin.invoices.no_invoices') }}
{{ $invoices->withQueryString()->links() }}
@endsection