@extends('layouts.app') @section('title', 'Dashboard') @section('page-specific-style') @endsection @section('content')
| Source | New | Open | Won | Closed |
|---|---|---|---|---|
| {{ $source == '' || $source == null ? 'Null' : $source }} | {{ $counts['new'] }} | {{ $counts['open'] }} | {{ $counts['won'] }} | {{ $counts['closed'] }} |
| Data not found! | ||||
| Null | {!! $totals['new'] - array_sum(array_column($summary, 'new')) > 0 ? $totals['new'] - array_sum(array_column($summary, 'new')) : 0 !!} | {!! $totals['open'] - array_sum(array_column($summary, 'open')) > 0 ? $totals['open'] - array_sum(array_column($summary, 'open')) : 0 !!} | {!! $totals['won'] - array_sum(array_column($summary, 'won')) > 0 ? $totals['won'] - array_sum(array_column($summary, 'won')) : 0 !!} | {!! $totals['closed'] - array_sum(array_column($summary, 'closed')) > 0 ? $totals['closed'] - array_sum(array_column($summary, 'closed')) : 0 !!} |
| Total | {{ $totals['new'] }} | {{ $totals['open'] }} | {{ $totals['won'] }} | {{ $totals['closed'] }} |
| Agent | New | Open | Won | Closed |
|---|---|---|---|---|
| {{ $user->name }} | {{ $new }} | {{ $open }} | {{ $won }} | {{ $closed }} |
| No agents found | ||||
| Null | {{-- sum of new from the able and minus $$totalLeadCount --}} {!! $totals['new'] - $agentTotals['new'] > 0 ? $totals['new'] - $agentTotals['new'] : 0 !!} | {!! $totals['open'] - $agentTotals['open'] > 0 ? $totals['open'] - $agentTotals['open'] : 0 !!} | {!! $totals['won'] - $agentTotals['won'] > 0 ? $totals['won'] - $agentTotals['won'] : 0 !!} | {!! $totals['closed'] - $agentTotals['closed'] > 0 ? $totals['closed'] - $agentTotals['closed'] : 0 !!} |
| Total | {{ $totals['new'] }} | {{ $totals['open'] }} | {{ $totals['won'] }} | {{ $totals['closed'] }} |
| No data found | ||||
| Agent | Overdue | Pending | Done | Deleted |
|---|---|---|---|---|
| {{ $summary['agent'] }} | {{ $summary['overdue'] }} | {{ $summary['pending'] }} | {{ $summary['done'] }} | {{ $summary['deleted'] }} |
| {{ $user->name }} | {{ $overdue }} | {{ $pending }} | {{ $done }} | {{ $deleted }} |
| No Data Found | ||||
| Total | {{ $totalOverdue }} | {{ $totalPending }} | {{ $totalDone }} | {{ $totalDeleted }} |
| No Data Found | ||||
| Activity Type | Overdue | Pending | Done | Deleted |
|---|---|---|---|---|
| {{ $activityType }} | {{ $overdue }} | {{ $pending }} | {{ $done }} | {{ $deleted }} |
| Data not found | ||||
| {{ $activityType }} | {{ $overdue }} | {{ $pending }} | {{ $done }} | {{ $deleted }} |
| Data not found | ||||
| Total | {{ $activityTotals['overdue'] }} | {{ $activityTotals['pending'] }} | {{ $activityTotals['done'] }} | {{ $activityTotals['deleted'] }} |
| Agent | New | CPA | @can('View commission setting')Estimated Commission | @endcan|||
|---|---|---|---|---|---|---|
| {{ $assignedToUsers->firstWhere('id', $userId)->name ?? 'N/A' }} | {{ $new }} | ${{ number_format($policiesCPA, 2) }} | @can('View commission setting')${{ number_format($earnedCommission, 2) }} | @endcan|||
| No data available | @elseNo data available | @endcan|||||
| Null | {{ $unassignedNew }} | ${{ number_format($unassignedCPA, 2) }} | @can('View commission setting'){!! $totalEstimatedCommission - array_sum(array_column($policiesSummary, 'estimated_commission')) > 0 ? '$' . number_format($totalEstimatedCommission - array_sum(array_column($policiesSummary, 'estimated_commission')), 2) : '$'. $totalEstimatedCommission - array_sum(array_column($policiesSummary, 'earned_commission')) !!} | @endcan|||
| Total | {{ $totalNew }} | ${{ number_format($totalCPA, 2) }} | @can('View commission setting')${{ number_format($totalEstimatedCommission, 2) }} | @endcan|||
| Product | New | CPA | @can('View commission setting')Estimated Commission | @endcan|||
|---|---|---|---|---|---|---|
| {{ $summary['name'] }} | {{ $new }} | ${{ number_format($productCPA, 2) }} | @can('View commission setting')${{ number_format($ProductEstimatedCommission, 2) }} | @endcan|||
| No data available | @elseNo data available | @endcan|||||
| Null | {!! $totalLeadCount - array_sum(array_column($policiesProductSummary, 'new')) > 0 ? $totalLeadCount - array_sum(array_column($policiesProductSummary, 'new')) : 0 !!} | {!! $productTotalCPA - array_sum(array_column($policiesProductSummary, 'cpa')) > 0 ? '$' . number_format($productTotalCPA - array_sum(array_column($policiesProductSummary, 'cpa')), 2) : 0 !!} | @can('View commission setting'){!! $totalEstimatedCommission - array_sum(array_column($policiesProductSummary, 'estimated_commission')) > 0 ? '$' . number_format($totalEstimatedCommission - array_sum(array_column($policiesProductSummary, 'estimated_commission')), 2) : '$'. $totalEstimatedCommission - array_sum(array_column($policiesProductSummary, 'estimated_commission')) !!} @endcan | |||
| Total | {{ array_sum(array_column($policiesProductSummary, 'new')) }} | ${{ number_format($productTotalCPA, 2) }} | @can('View commission setting')${{ number_format($totalEstimatedCommission, 2) }} | @endcan|||
| No data available | @elseNo data available | @endcan|||||
| State | New | CPA | @can('View commission setting')Estimated Commission | @endcan|||
|---|---|---|---|---|---|---|
| {{ $summary['name'] }} | {{ $stateNew }} | ${{ number_format($stateCPA, 2) }} | @can('View commission setting')${{ number_format($stateEstimatedCommission, 2) }} | @endcan|||
| No data available | @elseNo data available | @endcan|||||
| Null | {!! $totalLeadCount - array_sum(array_column($policiesProductSummary, 'new')) > 0 ? $totalLeadCount - array_sum(array_column($policiesProductSummary, 'new')) : 0 !!} | {!! $stateTotalCPA - array_sum(array_column($policiesProductSummary, 'cpa')) > 0 ? '$' . number_format($stateTotalCPA - array_sum(array_column($policiesProductSummary, 'cpa')), 2) : 0 !!} | @can('View commission setting'){!! $stateTotalEstimatedCommission - array_sum(array_column($policiesProductSummary, 'estimated_commission')) > 0 ? '$' . number_format($stateTotalEstimatedCommission - array_sum(array_column($policiesProductSummary, 'estimated_commission')), 2) : '$'. $stateTotalEstimatedCommission - array_sum(array_column($policiesProductSummary, 'estimated_commission')) !!} | @endcan|||
| Total | {{ array_sum(array_column($policiesProductSummary, 'new')) }} | ${{ number_format($stateTotalCPA, 2) }} | @can('View commission setting')${{ number_format($stateTotalEstimatedCommission, 2) }} | @endcan|||
| No data available | @elseNo data available | @endcan|||||