@extends('layouts.app') @section('title', 'Invoices') @section('content')
Manage customer invoices
Total Invoices
{{ $stats['total'] }}
Paid
{{ $stats['paid'] }}
Pending
{{ $stats['pending'] }}
Overdue
{{ $stats['overdue'] }}
| Invoice # | Customer | Issue Date | Due Date | Amount | Balance | Status | Actions |
|---|---|---|---|---|---|---|---|
| {{ $invoice->invoice_number }} |
{{ $invoice->user->name }} {{ $invoice->company?->company_name }} |
{{ $invoice->issue_date->format('d M Y') }} | {{ $invoice->due_date->format('d M Y') }} | R {{ number_format($invoice->total_amount, 2) }} | R {{ number_format($invoice->balance_due, 2) }} | @php $statusColors = [ 'draft' => 'bg-gray-100 text-gray-800', 'sent' => 'bg-blue-100 text-blue-800', 'paid' => 'bg-green-100 text-green-800', 'partially_paid' => 'bg-yellow-100 text-yellow-800', 'overdue' => 'bg-red-100 text-red-800', ]; @endphp {{ ucfirst(str_replace('_', ' ', $invoice->status)) }} |
View
@if($invoice->status === 'draft')
@endif
|
| No invoices found | |||||||