@extends('layouts.app') @section('title', 'Dashboard') @section('page-title', 'Dashboard') @section('content') {{-- Stats Row --}}

Sales This Month

₹{{ number_format($salesThisMonth, 2) }}

{{ $salesGrowth >= 0 ? '▲' : '▼' }} {{ abs($salesGrowth) }}% vs last month

Outstanding

₹{{ number_format($outstanding, 2) }}

{{ $overdue->count() }} overdue invoice(s)

Gross Profit

₹{{ number_format($grossProfit, 2) }}

This month

Customers

{{ $totalCustomers }}

@if($lowStockItems > 0)

⚠ {{ $lowStockItems }} low stock

@else

{{ $totalProducts }} products

@endif
{{-- Recent Invoices --}}

Recent Invoices

View all
@forelse($recentInvoices as $inv) @empty @endforelse
Invoice # Customer Amount Status Date
{{ $inv->invoice_number }} {{ $inv->customer_name }} ₹{{ number_format($inv->total_amount, 2) }} {{ ucfirst($inv->status) }} {{ $inv->invoice_date->format('d M Y') }}
No invoices yet. Create one
{{-- Right column --}}
{{-- Overdue invoices --}} @if($overdue->count() > 0)

⚠ Overdue Invoices

@foreach($overdue->take(4) as $inv)

{{ $inv->customer_name }}

Due {{ $inv->due_date->diffForHumans() }}

₹{{ number_format($inv->amount_due, 0) }}
@endforeach
@endif {{-- Monthly summary --}}

This Month

Sales ₹{{ number_format($salesThisMonth, 2) }}
Purchases ₹{{ number_format($purchasesThisMonth, 2) }}
Expenses ₹{{ number_format($expensesThisMonth, 2) }}
Net Profit ₹{{ number_format($grossProfit, 2) }}
{{-- Quick actions --}}
@endsection