@extends('crm.layouts.app') @section('title', 'Invoices') @section('content')

Invoices

Bill clients and track what has been paid.

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
@foreach([ ['label' => 'Billed', 'amount' => $stats['total'], 'count' => $stats['count']['total'], 'tone' => 'text-gray-900'], ['label' => 'Paid', 'amount' => $stats['paid'], 'count' => $stats['count']['paid'], 'tone' => 'text-green-700'], ['label' => 'Awaiting payment', 'amount' => $stats['pending'], 'count' => $stats['count']['pending'], 'tone' => 'text-blue-700'], ['label' => 'Overdue', 'amount' => $stats['overdue'], 'count' => $stats['count']['overdue'], 'tone' => 'text-red-700'], ] as $stat)
{{ $stat['label'] }}
${{ number_format($stat['amount'] ?? 0, 2) }}
{{ $stat['count'] ?? 0 }} {{ Str::plural('invoice', $stat['count'] ?? 0) }}
@endforeach
@if(request('search') || request('status', 'all') !== 'all') Clear @endif
@forelse($invoices as $invoice) @empty @endforelse
Invoice Client Artist Issued Due Total Status Open
{{ $invoice->invoice_number }} {{ $invoice->client?->name ?? '—' }} {{ $invoice->artist?->name ?? '—' }} {{ $invoice->invoice_date?->format('M j, Y') ?? '—' }} {{ $invoice->due_date?->format('M j, Y') ?? '—' }} ${{ number_format($invoice->total_amount, 2) }} {{ ucfirst($invoice->status) }} Open, invoice {{ $invoice->invoice_number }}

No invoices yet

@if(request('search') || request('status', 'all') !== 'all') Nothing matches those filters. @else Create your first invoice to start billing clients. @endif

New Invoice
@if($invoices->hasPages())
{{ $invoices->withQueryString()->links() }}
@endif
@endsection