@extends('layouts.app') @section('title', 'Dashboard') @section('page-title', 'Dashboard') @push('styles') @endpush @section('content') {{-- ── OVERDUE ALERT BANNER ── --}} @if($overdueCount > 0)
{{ $overdueCount }} overdue invoice{{ $overdueCount > 1 ? 's' : '' }} — totalling ₦{{ number_format($totalOverdue, 2) }}
Follow up with your clients to collect outstanding payments.
View Overdue
@endif {{-- ── FREE PLAN LIMIT WARNING ── --}} @if(auth()->user()->isFreePlan()) @php $limit = config('invotrack.free_invoice_limit', 5); @endphp
Free Plan: {{ $monthlyInvoiceCount }}/{{ $limit }} invoices used this month. @if($monthlyInvoiceCount >= $limit) Limit reached! @else {{ $limit - $monthlyInvoiceCount }} remaining. @endif
Upgrade
@endif {{-- ── SUMMARY CARDS ── --}}
This month
₦{{ number_format($totalInvoicedThisMonth / 1000, 1) }}k
Total Invoiced
This month
₦{{ number_format($totalPaidThisMonth / 1000, 1) }}k
Total Paid
All time
₦{{ number_format($totalOutstanding / 1000, 1) }}k
Outstanding
Action needed
₦{{ number_format($totalOverdue / 1000, 1) }}k
Overdue
{{-- ── QUICK ACTIONS ── --}}
New Invoice
Add Client
@if(!auth()->user()->isFreePlan())
Add Expense
@endif
All Invoices
{{-- ── CHART + STATS ROW ── --}}
{{-- Revenue Chart --}}
Revenue — Last 6 Months
Paid invoices only
₦ NGN
{{-- Mini stats --}}
Quick Overview
Total Clients {{ $totalClients }}
Draft Invoices {{ $draftCount }}
Overdue Invoices {{ $overdueCount }}

@php $collectionRate = $totalInvoicedThisMonth > 0 ? round(($totalPaidThisMonth / $totalInvoicedThisMonth) * 100) : 0; @endphp {{ $collectionRate }}%
Collection Rate (this month)
{{-- ── RECENT INVOICES ── --}}
Recent Invoices
View All
@if($recentInvoices->isEmpty())
No invoices yet

Create your first invoice and start getting paid.

Create Invoice
@else
@foreach($recentInvoices as $invoice) @endforeach
Invoice # Client Date Due Amount Status
{{ $invoice->invoice_number }}
{{ $invoice->client->display_name }}
{{ $invoice->issue_date->format('d/m/Y') }}
{{ $invoice->issue_date->format('d/m/Y') }} {{ $invoice->due_date->format('d/m/Y') }} @if($invoice->isOverdue()) {{ $invoice->due_date->diffForHumans() }} @endif ₦{{ number_format($invoice->total, 2) }} {{ $invoice->status_badge['label'] }} View
@endif
@endsection @push('scripts') @endpush