@extends('layouts.app') @section('title', 'Dashboard') @section('content')
Revenue This Month
৳{{ number_format($revenueThisMonth, 2) }}
@php $change = $revenueLastMonth > 0 ? (($revenueThisMonth - $revenueLastMonth) / $revenueLastMonth) * 100 : 0; @endphp
{{ number_format(abs($change), 1) }}% vs last month
Outstanding Receivables
৳{{ number_format($outstandingReceivables, 2) }}
{{ $overdueInvoices }} overdue invoice{{ $overdueInvoices != 1 ? 's' : '' }}
Outstanding Payables
৳{{ number_format($outstandingPayables, 2) }}
To be paid to suppliers
Total Employees
{{ $metrics['total_employees'] }}
{{ $metrics['total_customers'] }} customers · {{ $metrics['total_suppliers'] }} suppliers
Revenue vs Expenses (12 Months)
Top Selling Items This Month
@if($topItems->isNotEmpty()) @foreach($topItems as $item) @endforeach
Item Qty Amount
{{ $item->name }} {{ number_format($item->total_qty, 0) }} ৳{{ number_format($item->total_amount, 2) }}
@else

No sales data this month

@endif
Recent Sales Invoices View All
@forelse($recentInvoices as $inv) @empty @endforelse
Invoice Customer Amount Status
{{ $inv->number }}
{{ $inv->date->format('d M Y') }}
{{ $inv->customer->name }} ৳{{ number_format($inv->total, 2) }} @php $statusMap = [ 'draft'=>'secondary','submitted'=>'info','partially_paid'=>'warning', 'paid'=>'success','overdue'=>'danger','cancelled'=>'secondary' ]; @endphp {{ ucfirst(str_replace('_',' ',$inv->status)) }}
No invoices yet
⚠ Low Stock Items Stock Report
@if($lowStockItems->isNotEmpty())
@foreach($lowStockItems as $item) @endforeach
Item Stock Reorder Action
{{ $item->name }}
{{ $item->code }}
{{ number_format($item->getStockQty(), 2) }} {{ $item->unit }} {{ $item->reorder_level }} {{ $item->unit }} Order
@else

All items are adequately stocked

@endif
@push('scripts') @endpush @endsection