{{-- resources/views/dashboard.blade.php --}} @extends('layouts.app') @section('title', 'Dashboard') @section('content')
{{-- TOP METRIC CARDS --}}
{{-- Products count --}}
Products
Active items
{{-- Purchase Total --}}
Purchase Total
{{ number_format($purchaseTotal ?? 0, 2) }}
All-time purchases
{{-- Sales Total --}}
Sales Total
{{ number_format($salesTotal ?? 0, 2) }}
All-time sales
{{-- Expenses (All time) --}}
Expenses
{{ number_format($expensesTotal ?? 0, 2) }}
All-time expenses
{{-- Received --}}
Received
{{ number_format($receivedTotal ?? 0, 2) }}
From customers
{{-- Paid --}}
Paid
{{ number_format($paidTotal ?? 0, 2) }}
To suppliers
{{-- SECOND ROW: STOCK + DUES --}}
{{-- Total Quantity --}}
Total Quantity (Pieces)
{{ number_format($totalQuantity ?? 0) }}
Current Stock
{{-- Supplier Due --}}
Suppliers Due (You Will Pay)
{{ number_format($totalSupplierDue ?? 0, 2) }}
Opening + Purchase Due
{{-- Customer Due --}}
Customers Due (You Will Receive)
{{ number_format($totalCustomerReceivable ?? 0, 2) }}
Opening + Sales Due
{{-- ⭐ THIRD + FOURTH ROW: শুধুই SUPER ADMIN দেখতে পাবে --}} @if(auth()->check() && auth()->user()->isSuperAdmin()) {{-- THIRD ROW: MONTHLY SUMMARY --}}
{{-- This Month Sales --}}
This Month Sales
{{ number_format($monthlySalesTotal ?? 0, 2) }}
{{-- This Month Expenses --}}
This Month Expenses
{{ number_format($monthlyExpensesTotal ?? 0, 2) }}
{{-- Gross Profit (This Month) --}}
Gross Profit (This Month)
{{ number_format($monthlyGrossProfit ?? 0, 2) }}
Sales – (COGS + Customer Returns)
{{-- Net Profit (This Month) --}}
Net Profit (This Month)
{{ number_format($monthlyNetProfit ?? 0, 2) }}
Gross Profit – Expenses
{{-- FOURTH ROW: CHARTS --}}
This Month: Sales vs Expenses
This Month: Profit Summary
@endif {{-- super admin check শেষ --}}
@endsection {{-- Simple Chart.js graphs --}} @section('scripts') @if(auth()->check() && auth()->user()->isSuperAdmin()) {{-- যদি layout-এ @yield('scripts') না থাকে, তাহলে এই @endif @endsection