@extends('layouts.master') @section('title', 'Dashboard - Paidash') @push('styles') @endpush @push('styles') @endpush @section('content')

Business Dashboard

Real-time insights and analytics for {{ Auth::user()->name }}'s business

{{-- --}}
{{ now()->format('l') }} / {{ now()->format('F j, Y') }}
@if(Auth::user()->can('client-create') || Auth::user()->can('invoice-create') || Auth::user()->can('payment-create'))
Quick Actions
@can('client-create') Add Client @endcan @can('invoice-create') Create Invoice @endcan @can('payment-create') Record Payment @endcan @can('employee-create') Add Employee @endcan @can('report-list') Reports @endcan
@endif

Total Revenue

₹{{ App\Http\Controllers\Controller::IND_money_format($data['total_revenue'], 0) }}

{{ $data['revenue_difference'] >= 0 ? '+' : '' }}₹{{ App\Http\Controllers\Controller::IND_money_format(abs($data['revenue_difference']), 0) }} vs last month

Active Clients

{{ App\Http\Controllers\Controller::IND_money_format($data['active_clients'], 0) }}

{{ App\Http\Controllers\Controller::IND_money_format($data['total_clients'], 0) }} Total clients registered

Pending Payments

₹{{ App\Http\Controllers\Controller::IND_money_format($data['unpaid_amount'], 0) }}

{{ $data['unpaid_difference'] >= 0 ? '+' : '' }}₹{{ App\Http\Controllers\Controller::IND_money_format(abs($data['unpaid_difference']), 0) }} vs last month

Active Services

{{ App\Http\Controllers\Controller::IND_money_format($data['active_services'], 0) }}

{{ App\Http\Controllers\Controller::IND_money_format($data['no_of_invoices'], 0) }} Invoices currently running
@can('inventory-list')

Inventory Items

{{ $inventoryMetrics['total_items'] ?? 0 }}

₹{{ App\Http\Controllers\Controller::IND_money_format($inventoryMetrics['total_value'] ?? 0) }} Value in stock
@endcan

Monthly Expenses

₹{{ App\Http\Controllers\Controller::IND_money_format($expenseMetrics['monthly_total'] ?? 0) }}

{{ $expenseMetrics['monthly_count'] ?? 0 }} Transactions this month
@if(isset($performanceMetrics))

Performance Metrics

This Month

{{ $performanceMetrics['collection_efficiency'] }}%

Collection Efficiency

@if($performanceMetrics['collection_efficiency'] >= 80) Excellent @elseif($performanceMetrics['collection_efficiency'] >= 60) Good @else Needs Attention @endif

₹{{ App\Http\Controllers\Controller::IND_money_format($performanceMetrics['overdue_amount'], 0) }}

Overdue Amount

₹{{ App\Http\Controllers\Controller::IND_money_format($performanceMetrics['avg_invoice_value'], 0) }}

Avg Invoice Value

{{ $performanceMetrics['client_growth'] >= 0 ? '+' : '' }}{{ $performanceMetrics['client_growth'] }}%

Client Growth

@if($performanceMetrics['client_growth'] > 10) Strong Growth @elseif($performanceMetrics['client_growth'] > 0) Positive @elseif($performanceMetrics['client_growth'] == 0) Stable @else Declining @endif
@endif

Revenue Analytics

Monthly revenue trends and invoice metrics

Loading...

Loading revenue data...

Payment Analysis

Payment mode distribution

Loading...

Loading payment data...

Service Distribution

Active services by type

Bedded Service

{{ App\Http\Controllers\Controller::IND_money_format($data['total_beds'], 0) }} Beds

{{ App\Http\Controllers\Controller::IND_money_format($data['beded_clients'], 0) }}

Clients

Non-Bedded Service

{{ $data['non_beded_data']->count() }} Categories

{{ App\Http\Controllers\Controller::IND_money_format($data['non_beded_clients'], 0) }}

Clients

Weight-Based Service

Per Kg Pricing

{{ App\Http\Controllers\Controller::IND_money_format($data['weight_based_clients'], 0) }}

Clients

Bedded Fixed Price

{{ App\Http\Controllers\Controller::IND_money_format($data['total_beds_fixed'], 0) }} Beds

{{ App\Http\Controllers\Controller::IND_money_format($data['bedded_fixed_clients'], 0) }}

Clients

Recent Activities

Latest system activities

@if(isset($recentActivities) && $recentActivities->count() > 0)
@foreach($recentActivities->take(8) as $activity)
{{ $activity['title'] }}

{{ $activity['description'] }}

@if($activity['amount']) ₹{{ App\Http\Controllers\Controller::IND_money_format($activity['amount'], 0) }} @endif

{{ $activity['date']->diffForHumans() }}

@endforeach
@else

No recent activities found

@endif

Monthly Invoice Analytics

Invoice count and amount trends

Loading...

Loading invoice analytics...

Payment Trends

Monthly payment collection trends

Loading...

Loading payment trends...

Pending Amount Analytics

Outstanding payments by aging

Loading...

Loading pending amount analytics...

Client Growth

Monthly client acquisition

Loading...

Loading client growth data...

Top Due Clients {{ $top_due_clients->count() }}

Clients with highest pending payments

@foreach ($top_due_clients as $index => $client) @endforeach @if($top_due_clients->isEmpty()) @endif
# Client Name Employee Invoice Amount Paid Amount Pending Amount
{{ $index + 1 }}
@if(auth()->user()->can('client-view')) {{ $client->client_name }} @else {{ $client->client_name }} @endif

{{ $client->client_type_name ?? 'N/A' }}

@if($client->employee_id)
@if(auth()->user()->can('employee-view')) {{ $client->employee_name }} @else {{ $client->employee_name }} @endif
@else - @endif
₹{{ App\Http\Controllers\Controller::IND_money_format($client->total_invoice_amount, 0) }} ₹{{ App\Http\Controllers\Controller::IND_money_format($client->total_paid_amount, 0) }} ₹{{ App\Http\Controllers\Controller::IND_money_format($client->total_pending_amount, 0) }}

No pending payments found

@stop @section('style') @endsection @section('script') @endsection