{{-- resources/views/invoicing/index.blade.php --}} @extends('layouts.app') @section('title', 'Invoices') @section('page_title', 'Invoices') @section('page_subtitle', 'Billing and invoice management') @section('content') {{-- Stats --}}
${{ number_format($stats['total_outstanding'], 0) }}
Outstanding @if($stats['overdue_count'] > 0) {{ $stats['overdue_count'] }} overdue @endif
${{ number_format($stats['paid_this_month'], 0) }}
Paid This Month
{{ $stats['overdue_count'] }}
Overdue Invoices
{{-- Filters --}}
@if(request()->hasAny(['search','status','date_from','date_to'])) Clear @endif
{{-- Table --}}
Invoices {{ $invoices->total() }} total
@if($invoices->isEmpty())

No invoices found

Create Invoice
@else
@foreach($invoices as $inv) @php $sc = [ 'draft' => ['bg'=>'#f1f5f9','color'=>'#475569'], 'issued' => ['bg'=>'#dbeafe','color'=>'#1e40af'], 'partially_paid' => ['bg'=>'#fef3c7','color'=>'#92400e'], 'paid' => ['bg'=>'#d1fae5','color'=>'#065f46'], 'overdue' => ['bg'=>'#fee2e2','color'=>'#991b1b'], 'cancelled' => ['bg'=>'#f1f5f9','color'=>'#9ca3af'], ][$inv->status] ?? ['bg'=>'#f1f5f9','color'=>'#475569']; @endphp @endforeach
Invoice # Guest / Company Date Due Total Balance Status
{{ $inv->invoice_number }}
@if($inv->guest) {{ $inv->guest->first_name }} {{ $inv->guest->last_name }} @elseif($inv->company) {{ $inv->company->name }} @else — @endif
{{ $inv->invoice_date->format('d M Y') }} {{ $inv->due_date->format('d M Y') }} {{ $inv->currency }} {{ number_format($inv->total_amount, 2) }} @if($inv->balance_due > 0) {{ $inv->currency }} {{ number_format($inv->balance_due, 2) }} @else Paid @endif {{ str_replace('_', ' ', $inv->status) }} View →
@if($invoices->hasPages())
{{ $invoices->links() }}
@endif @endif
@endsection