@php // Initialize summary totals for all users $totalRiderCost = 0; $totalClawback = 0; $totalAdvance = 0; $totalOtherDeductions = 0; $totalFinalAmount = 0; $totalRevenue = 0; @endphp @forelse ($revenues as $revenue) @php // Accumulate for ALL users (no designation check) $totalRiderCost += $revenue->rider_cost; $totalClawback += $revenue->clawback_amount; $totalAdvance += $revenue->advances; $totalOtherDeductions += $revenue->dedection_if_needed; $totalFinalAmount += $revenue->final_amount; $totalRevenue += $revenue->total_revenue; $totalDeduction = $revenue->rider_cost + $revenue->clawback_amount + $revenue->advances + $revenue->dedection_if_needed; @endphp

User Revenue Report

ID User ID User Month Total Deductions Net Payout
{{ $revenue->id }} {{ $revenue->user_id }} {{ $revenue->user_name }} {{ $revenue->month }} {{ $totalDeduction }} {{ $revenue->final_amount }}

User Revenue Breakdown

Description Current Month Total
Total Leads {{ $revenue->total_leads }}
Total Submission {{ $revenue->total_submission }}
Total In Process {{ $revenue->total_inprocess }}
Total Closed {{ $revenue->total_closed }}
Rider Cost {{ $revenue->rider_cost }}
Clawback {{ $revenue->clawback_amount }}
Advance {{ $revenue->advances }}
Other Deductions {{ $revenue->dedection_if_needed }}
Elife Commission (%) {{ $revenue->elife_percentage }}
Wireless Commission {{ $revenue->wireless_commission }}
Postpaid Commission {{ $revenue->postpaid_commission }}
Final Amount {{ $revenue->final_amount }}

Total Deduction: {{ $totalDeduction }}

Total Revenue: {{ $revenue->total_revenue }}

Net Payout: {{ $revenue->final_amount }}

@empty

No user revenue found.

@endforelse @if ($totalFinalAmount > 0)

Overall Revenue Summary

Total Rider Cost Total Clawback Total Advance Total Other Deductions Total Revenue Total Final Amount (Net Payout)
{{ $totalRiderCost }} {{ $totalClawback }} {{ $totalAdvance }} {{ $totalOtherDeductions }} {{ $totalRevenue }} {{ $totalFinalAmount }}
@endif