Invoices

@php $fmt = fn($v) => '₹' . number_format($v ?? 0, 2, '.', ','); @endphp {{-- Stats --}}

{{ $fmt($stats['monthRevenue'] ?? 0) }}

Total Invoiced (Month)

{{ $fmt($stats['totalDue'] ?? 0) }}

Outstanding

{{ $stats['overdue'] ?? 0 }}

Overdue Invoices

{{-- Filter bar --}}
to {{-- Table --}}
@if($invoices->isEmpty())

No invoices found.

Try adjusting your filters or create a new invoice.

@else
@foreach($invoices as $inv) @php $isOverdue = $inv->due_date && !in_array($inv->status, ['paid','cancelled']) && \Carbon\Carbon::parse($inv->due_date)->isPast(); $statusColor = match($inv->status) { 'draft' => 'bg-gray-100 text-gray-500', 'issued' => 'bg-blue-100 text-blue-700', 'partially_paid' => 'bg-yellow-100 text-yellow-700', 'paid' => 'bg-green-100 text-green-700', 'cancelled' => 'bg-red-100 text-red-500', default => 'bg-gray-100 text-gray-500', }; @endphp @endforeach
Invoice # Member Plan Amount Status Due Date
{{ $inv->invoice_number }}

{{ $inv->member?->name }}

{{ $inv->member?->member_id }}

{{ $inv->membership?->plan?->name ?? '—' }}

{{ $fmt($inv->total_amount) }}

@if($inv->amount_due > 0)

{{ $fmt($inv->amount_due) }} due

@endif
{{ str_replace('_', ' ', $inv->status) }} {{ $inv->due_date ? \Carbon\Carbon::parse($inv->due_date)->format('M j, Y') : '—' }} @if($isOverdue) Overdue @endif
@if($inv->amount_due > 0) Collect @endif
@endif
{{ $invoices->withQueryString()->links() }}
{{-- Create Invoice slide-over --}}