@php $streams = [ 'stores' => ['label' => 'Nearby Vendors', 'turnover' => $record->stores_turnover, 'crc' => $record->stores_crc], 'eshops' => ['label' => 'eShop Orders', 'turnover' => $record->eshop_turnover, 'crc' => $record->eshop_crc], 'recharge' => ['label' => 'E-Services', 'turnover' => $record->eservice_turnover, 'crc' => $record->eservice_crc], 'billavenue' => ['label' => 'Bill Payments', 'turnover' => $record->billpay_turnover, 'crc' => $record->billpay_crc], 'activation' => ['label' => 'Affiliate Activation', 'turnover' => $record->activation_turnover, 'crc' => $record->activation_crc], ]; $candidates = collect($details['candidates'] ?? []); $byState = collect($details['crc_by_state'] ?? [])->sortDesc(); @endphp
Financial Year {{ $record->financial_year }} Period {{ date('d-m-Y', strtotime($record->start_date)) }} to {{ date('d-m-Y', strtotime($record->end_date)) }}
Total CRC (All India) ₹{{ number_format($record->total_crc, 2) }} Status @if ($record->status == 1) Credited {{ $record->credited_at?->format('d-m-Y H:i') }} @else Generated (not yet credited) @endif
DCP Pool Amount ₹{{ number_format($record->pool_amount, 2) }} ({{ $record->pool_percentage }}%) Eligible / Candidate Members {{ $record->eligible_users_count }} / {{ $record->candidate_users_count }}
Total DCP Shares {{ $record->total_shares }} Value Per Share ₹{{ number_format($record->value_per_share, 2) }}
Total Distributed ₹{{ number_format($record->total_distributed_amount, 2) }} Remarks {{ $record->remarks ?? '-' }}
CRC by Stream
@foreach ($streams as $key => $s) @endforeach
StreamTurnoverCRC
@if ($s['crc'] > 0 || $s['turnover'] > 0) {{ $s['label'] }} @else {{ $s['label'] }} @endif ₹{{ number_format($s['turnover'], 2) }} ₹{{ number_format($s['crc'], 2) }}
Total ₹{{ number_format($record->total_turnover, 2) }} ₹{{ number_format($record->total_crc, 2) }}

Affiliate Pro and EMO upgrade sales are excluded from the turnover base.

CRC by State
@forelse ($byState as $state => $crc) @empty @endforelse
StateCRC
{{ $state }}₹{{ number_format($crc, 2) }}
-
Candidates (Active EMO / Black Diamond+, all India)
@forelse ($candidates->sortByDesc('shares') as $c) @php $u = $users[$c['user_id']] ?? null; $roleRank = array_filter([ $c['role_id'] == 4 ? 'EMO' : null, $c['rank_id'] ? ($ranks[$c['rank_id']] ?? 'Rank #' . $c['rank_id']) : null, ]); @endphp @empty @endforelse
#Access CodeNameMobileRole / RankDCP SharesShare ValueEligible
{{ $loop->iteration }} @if ($u) {{ $u->access_code }} @else {{ $c['access_code'] }} @endif {{ $u ? trim($u->name . ' ' . $u->last_name) : '-' }} {{ $u?->mobile ?? '-' }} {{ implode(' / ', $roleRank) ?: '-' }} {{ $c['shares'] }} @if ($c['positions'])({{ $c['positions'] }})@endif ₹{{ number_format($c['shares'] * $record->value_per_share, 2) }} {!! $c['eligible'] ? 'Yes' : 'No shares' !!}
No active EMO / Black Diamond+ member found.
Calculation Steps
    @foreach ($details['calculation_steps'] ?? [] as $step)
  1. {{ $step }}
  2. @endforeach