@extends('layouts.app') @section('content')

Invoices

Manage and track all invoices.

@if(auth()->user()->hasPermission($currentBusiness->id, 'can_edit_invoices')) New Invoice @endif
Number Client Issue Date Due Date Status Total Actions @forelse($invoices ?? [] as $invoice) {{ $invoice->invoice_number }} {{ $invoice->client_name }} {{ $invoice->issue_date->format('d M Y') }} {{ $invoice->due_date->format('d M Y') }} @php $statusColors = [ 'draft' => 'bg-gray-100 text-gray-700', 'sent' => 'bg-blue-100 text-blue-700', 'paid' => 'bg-green-100 text-green-700', 'overdue' => 'bg-red-100 text-red-700', 'cancelled' => 'bg-yellow-100 text-yellow-700', ]; @endphp {{ ucfirst($invoice->status) }} {{ $currentBusiness->currency_symbol }}{{ number_format($invoice->total, 2) }} View @if(auth()->user()->hasPermission($currentBusiness->id, 'can_edit_invoices'))
@csrf @method('DELETE')
@endif @empty No invoices found. @endforelse
@if(isset($invoices) && $invoices instanceof \Illuminate\Pagination\LengthAwarePaginator)
{{ $invoices->links() }}
@endif
@endsection