{{ __('Dashboard') }}

{{-- Top Row: Date/Time/Greeting + Location --}}
{{ now()->format('l, F d, Y') }}
@php $hour = now()->hour; $greeting = $hour >= 5 && $hour < 12 ? '☀️ Good Morning' : ($hour >= 12 && $hour < 17 ? '🌤️ Good Afternoon' : ($hour >= 17 && $hour < 21 ? '🌇 Good Evening' : '🌙 Good Night')); @endphp {{ $greeting }}, {{ auth()->user()->name }}!
@csrf
{{-- Quick Stats Row --}}
{{-- Today Sale --}}
Today Sale
{{ number_format($todaySale, 2) }}
{{ $todayCount }} invoices
{{-- Yesterday Sale --}}
Yesterday
{{ number_format($yesterdaySale, 2) }}
{{ $yesterdayCount }} invoices
{{-- This Month --}}
This Month
{{ number_format($thisMonthSale, 2) }}
{{ $thisMonthCount }} invoices
{{-- Cash in Hand --}}
Cash & Wallets
{{ number_format($cashTotal, 2) }}
{{-- Banks --}}
Banks
{{ number_format($banksTotal, 2) }}
{{-- POS Pending --}}
POS Pending
{{ number_format($posPendingTotal, 2) }}
{{-- Payment Breakdown Row --}}
Today Cash
{{ number_format($todayCash, 2) }}
Today POS
{{ number_format($todayPos, 2) }}
Today Credit
{{ number_format($todayCredit, 2) }}
Today Expenses
{{ number_format($todayExpenses, 2) }}
Receivables
{{ number_format($customerReceivables, 2) }}
Payables
{{ number_format($supplierPayables, 2) }}
{{-- Main Content Grid --}}
{{-- Left Column --}}
{{-- Expired Items Notification --}} {{-- Other Items Pending Review Notification --}} {{-- Quick Actions --}} {{-- Recent Invoices --}}
Recent Invoices View All →
@forelse($recentInvoices as $invoice) @empty @endforelse
Invoice # Time Amount
{{ $invoice->invoice_number }} {{ optional($invoice->created_at)->format('M d, h:i A') }} {{ number_format($invoice->total, 2) }}
No invoices yet
{{-- Low Stock Alert --}}
Low Stock Alert @if($lowStockCount > 0) {{ $lowStockCount }} @endif
View All →
@forelse($lowStock as $item) @empty @endforelse
Barcode Product Alert Available Re-Order
{{ $item->barcode }} {{ Str::limit($item->name, 30) }} {{ number_format($item->alert, 0) }} {{ number_format($item->available, 0) }} {{ number_format($item->reorder, 0) }}
All stock levels are good!
{{-- Right Column --}}
{{-- Borrow/Lend Card --}}
Borrow / Lend Manage →
People owe you
{{ number_format($peopleOweYou, 2) }}
You owe people
{{ number_format($youOwePeople, 2) }}
{{-- Cheques Card --}}
Cheques Manage →
Pending
{{ $pendingCheques }}
Overdue
{{ $overdueCheques }}
@if($upcomingCheques->isNotEmpty())
Upcoming (7 days)
@foreach($upcomingCheques as $cheque)
{{ $cheque->cheque_no ?? 'N/A' }}
{{ $cheque->clear_date?->format('M d') }}
{{ number_format($cheque->amount, 2) }}
@endforeach
@else
No upcoming cheques
@endif
{{-- Recent Purchases --}}
Recent Purchases View All →
@forelse($recentPurchases as $purchase)
{{ $purchase->bill_id }}
{{ $purchase->supplier_name ?? 'N/A' }}
{{ number_format($purchase->total, 2) }}
{{ $purchase->paid >= $purchase->total ? 'Paid' : 'Due: ' . number_format($purchase->total - $purchase->paid, 2) }}
@empty
No recent purchases
@endforelse
{{-- Top Selling --}}
🏆 Top Selling
@forelse($topSelling as $idx => $item)
{{ $idx + 1 }}
{{ Str::limit($item->product_name, 25) }}
{{ number_format($item->qty, 0) }}
@empty
No data
@endforelse
{{-- Database Status --}}
🛢️ System Status
Main Database @if($mainDbActive) 🟢 Active @else 🔴 Offline @endif
Online Sync @if($secondDbActive) 🟢 Connected @else ⚫ Not configured @endif
Last Invoice {{ $lastInvoiceNumber ?? 'N/A' }}
@push('scripts') @endpush {{-- Other Items Review Modal --}} {{-- Merge to Product Modal --}} {{-- Create Product Modal --}} {{-- Invoice View Modal --}}