@extends('admin.layouts.app', ['title' => 'Admin Dashboard']) @section('content') @php($dashboardStats = $dashboardStats ?? [ 'active_users' => 0, 'total_users' => 0, 'payin_orders' => 0, 'payout_orders' => 0, 'settlements' => 0, 'scope_label' => 'All Merchants', 'parent_range' => 'weekly', 'range' => 'weekly', 'total_payin_amount_all_time' => 0, 'total_payout_amount_all_time' => 0, 'total_combined_amount_all_time' => 0, 'total_payin_amount' => 0, 'total_payout_amount' => 0, 'jazzcash_payin_orders' => 0, 'jazzcash_payin_amount' => 0, 'easypaisa_payin_orders' => 0, 'easypaisa_payin_amount' => 0, 'payout_mobile_wallet_orders' => 0, 'payout_ibft_orders' => 0, 'payout_ibft_amount' => 0, 'jazzcash_payin_success_rate' => 98, 'easypaisa_payin_success_rate' => 96, 'payout_mobile_wallet_success_rate' => 99, 'payout_ibft_success_rate' => 95, ]) @php($dashboardCharts = $dashboardCharts ?? ['income' => ['labels' => [], 'payin' => [], 'payout' => []]]) {{--

{{ __('admin.dashboard') }}

{{ __('admin.overview_analytics') }}
--}}
Total Payin vs Payout
Quick financial snapshot
Total Payin (PKR)
Rs {{ number_format((float) ($dashboardStats['top_kpi_total_payin_amount'] ?? 0), 2) }}
Total Payout (PKR)
Rs {{ number_format((float) ($dashboardStats['top_kpi_total_payout_amount'] ?? 0), 2) }}
Merchant Settlement
Rs {{ number_format((float) ($dashboardStats['top_kpi_settlements'] ?? 0), 2) }}
Available Balance
Rs {{ number_format((float) ($dashboardStats['top_kpi_net_payin_amount'] ?? 0), 2) }}
Payout Orders
{{ number_format((int) ($dashboardStats['top_kpi_payout_orders'] ?? 0)) }}
Total Merchants
{{ number_format((int) ($dashboardStats['top_kpi_total_users'] ?? 0)) }}
Payin & Payout Success
Realtime success trend
Total Payin
Rs {{ number_format((float) $dashboardStats['total_payin_amount'], 2) }}
Total Payout
Rs {{ number_format((float) $dashboardStats['total_payout_amount'], 2) }}
Rs {{ number_format((float) ($dashboardStats['jazzcash_payin_amount'] ?? 0), 2) }}
Jazzcash payin
No of orders: {{ number_format((int) ($dashboardStats['jazzcash_payin_orders'] ?? 0)) }}
Rs {{ number_format((float) ($dashboardStats['easypaisa_payin_amount'] ?? 0), 2) }}
Easypaisa payin
No of orders: {{ number_format((int) ($dashboardStats['easypaisa_payin_orders'] ?? 0)) }}
{{ number_format((int) $dashboardStats['payout_mobile_wallet_orders']) }}
Payout Mobile wallet
Rs {{ number_format((float) ($dashboardStats['payout_ibft_amount'] ?? 0), 2) }}
Payout IBFT
Channel Usage
{{ number_format((int) ($dashboardStats['channel_total_orders'] ?? 0)) }} total orders in selected range
Payin Channels
@php($jazzcashRate = max(0, min(100, (int) ($dashboardStats['jazzcash_payin_success_rate'] ?? 98)))) @php($easypaisaRate = max(0, min(100, (int) ($dashboardStats['easypaisa_payin_success_rate'] ?? 96))))
{{ $jazzcashRate }}%
Success
{{ $easypaisaRate }}%
Success
Payout Channels
@php($mobileWalletRate = max(0, min(100, (int) ($dashboardStats['payout_mobile_wallet_success_rate'] ?? 99)))) @php($ibftRate = max(0, min(100, (int) ($dashboardStats['payout_ibft_success_rate'] ?? 95))))
Mobile Wallet
{{ $mobileWalletRate }}%
Success
IBFT
{{ $ibftRate }}%
Success
Dealers
Total Dealers
{{ number_format((int) ($dashboardStats['dealers_total'] ?? 0)) }}
@php($dealerTotal = max(1, (int) ($dashboardStats['dealers_total'] ?? 0))) @php($merchantsTotal = max(1, (int) ($dashboardStats['total_users'] ?? 0))) @php($dealerActivePct = min(100, (int) round(((int) ($dashboardStats['dealers_active'] ?? 0) / $dealerTotal) * 100))) @php($dealerInactivePct = min(100, (int) round(((int) ($dashboardStats['dealers_inactive'] ?? 0) / $dealerTotal) * 100))) @php($dealerAssignedPct = min(100, (int) round(((int) ($dashboardStats['dealers_assigned_merchants'] ?? 0) / $merchantsTotal) * 100)))
Total Dealers {{ number_format((int) ($dashboardStats['dealers_total'] ?? 0)) }}
Assigned Merchants {{ number_format((int) ($dashboardStats['dealers_assigned_merchants'] ?? 0)) }}
{{ $dealerActivePct }}%
Active
{{ number_format((int) ($dashboardStats['dealers_active'] ?? 0)) }}
{{ $dealerInactivePct }}%
Inactive
{{ number_format((int) ($dashboardStats['dealers_inactive'] ?? 0)) }}
{{ $dealerAssignedPct }}%
Assigned
{{ number_format((int) ($dashboardStats['dealers_assigned_merchants'] ?? 0)) }}
Merchants
Total Merchants
{{ number_format((int) ($dashboardStats['total_users'] ?? 0)) }}
@php($merchantTotal = max(1, (int) ($dashboardStats['total_users'] ?? 0))) @php($merchantActive = (int) ($dashboardStats['active_users'] ?? 0)) @php($merchantInactive = max(0, $merchantTotal - $merchantActive)) @php($merchantActivePct = min(100, (int) round(($merchantActive / $merchantTotal) * 100))) @php($merchantInactivePct = min(100, (int) round(($merchantInactive / $merchantTotal) * 100)))
Active Merchants {{ number_format((int) ($dashboardStats['active_users'] ?? 0)) }}
Inactive Merchants {{ number_format($merchantInactive) }}
{{ $merchantActivePct }}%
Active
{{ number_format((int) ($dashboardStats['active_users'] ?? 0)) }}
{{ $merchantInactivePct }}%
Inactive
{{ number_format($merchantInactive) }}
Transactions
Total Transactions
{{ number_format((int) ($dashboardStats['transactions_total'] ?? 0)) }}
Payin {{ number_format((int) $dashboardStats['payin_orders']) }} | Payout {{ number_format((int) $dashboardStats['payout_orders']) }}
@php($totalTx = max(1, (int) ($dashboardStats['transactions_total'] ?? 0))) @php($successTotal = (int) ($dashboardStats['payin_success_count'] ?? 0) + (int) ($dashboardStats['payout_success_count'] ?? 0)) @php($pendingTotal = (int) ($dashboardStats['payin_pending_count'] ?? 0) + (int) ($dashboardStats['payout_pending_count'] ?? 0)) @php($failedTotal = (int) ($dashboardStats['payin_failed_count'] ?? 0) + (int) ($dashboardStats['payout_failed_count'] ?? 0)) @php($successPct = min(100, (int) round(($successTotal / $totalTx) * 100))) @php($pendingPct = min(100, (int) round(($pendingTotal / $totalTx) * 100))) @php($failedPct = min(100, (int) round(($failedTotal / $totalTx) * 100)))
Payin {{ number_format((int) ($dashboardStats['payin_orders'] ?? 0)) }}
Payout {{ number_format((int) ($dashboardStats['payout_orders'] ?? 0)) }}
{{ $successPct }}%
Success
{{ number_format((int) ($dashboardStats['payin_success_count'] ?? 0)) }} / {{ number_format((int) ($dashboardStats['payout_success_count'] ?? 0)) }}
{{ $pendingPct }}%
Pending
{{ number_format((int) ($dashboardStats['payin_pending_count'] ?? 0)) }} / {{ number_format((int) ($dashboardStats['payout_pending_count'] ?? 0)) }}
{{ $failedPct }}%
Failed
{{ number_format((int) ($dashboardStats['payin_failed_count'] ?? 0)) }} / {{ number_format((int) ($dashboardStats['payout_failed_count'] ?? 0)) }}
@endsection @push('head') @endpush