@section('styles') @endsection
@if(!$hasAdminAccess)
My Statistics
@if($pendingInvoicePayments && count($pendingInvoicePayments['cycles']) > 0)
Invoice Required
Invoice Amount: KES {{ number_format($pendingInvoicePayments['totals']->total_net_payable + $pendingInvoicePayments['totals']->total_tax, 2) }}
Tax: KES {{ number_format($pendingInvoicePayments['totals']->total_tax, 2) }} | Advance: KES {{ number_format($pendingInvoicePayments['totals']->total_advance, 2) }}
@foreach($pendingInvoicePayments['cycles'] as $cycle)
{{ $cycle->cycle_description }} Net: KES {{ number_format($cycle->total_net_payable, 2) }}
Tax: KES {{ number_format($cycle->total_tax, 2) }} | Advance: KES {{ number_format($cycle->total_advance, 2) }} @if($cycle->has_rejected) @foreach($cycle->payments as $payment) @if($payment->status === 'Rejected' && $payment->rejection_reason) Rejection Reason: {{ $payment->rejection_reason }} @endif @endforeach @endif
@endforeach
@endif
Total Amount
Total Net Payable: KES {{ number_format($allTimeStats->total_all_time_earnings, 2) }}
Advance: KES {{ number_format($allTimeStats->total_all_time_advance, 2) }}
From {{ $allTimeStats->participated_cycles }} Payment Cycles
Payment Status
Net Paid: KES {{ number_format($allTimeStats->total_all_time_paid, 2) }}
Pending Payments: KES {{ number_format($allTimeStats->total_pending_amount, 2) }} ({{ $allTimeStats->pending_payment_count }} payments)
@php $paidPercentage = $allTimeStats->total_all_time_earnings > 0 ? ($allTimeStats->total_all_time_paid / $allTimeStats->total_all_time_earnings) * 100 : 0; @endphp
Tax & Deductions
{{ number_format($allTimeStats->total_all_time_tax, 2) }}
Current Tax: {{ number_format($stats->total_tax, 2) }}
Current Advance: {{ number_format($stats->total_advance, 2) }}
Overall Productivity
{{ number_format($allTimeStats->overall_avg_productivity, 1) }}
Average Productivity Rate
Payment Range
Highest

{{ number_format($allTimeStats->highest_payment, 2) }}

Lowest

{{ number_format($allTimeStats->lowest_payment, 2) }}

@else
Overall Statistics
Total Amount
{{ number_format($allTimeStats->total_all_time_payable, 2) }}
Net Paid: {{ number_format($allTimeStats->total_paid_amount, 2) }}
Across {{ $allTimeStats->total_cycles }} Payment Cycles
Deductions
{{ number_format($allTimeStats->total_tax + $allTimeStats->total_advance, 2) }}
Tax: {{ number_format($allTimeStats->total_tax, 2) }}
Advance: {{ number_format($allTimeStats->total_advance, 2) }}
Pending
{{ number_format($allTimeStats->total_pending_amount, 2) }}
{{ $allTimeStats->total_pending_count }} Payments Pending
Invoices
{{ number_format($allTimeStats->total_invoices) }}
Invoices Uploaded
System Users
{{ number_format($allTimeStats->total_users) }}
Registered Payment Recipients
Overall Performance
{{ number_format($allTimeStats->overall_avg_productivity, 1) }}
Average Productivity Rate
Current Cycle
@if($currentCycle)
{{ $currentCycle->description }}
Total: {{ number_format($stats->total_amount, 2) }}
Paid: {{ number_format($stats->net_paid, 2) }}
Pending: {{ number_format($stats->pending_amount, 2) }}
@else
No active payment cycle
@endif
@if($isAdmin || $isManager)
Payment Distribution
Approved Payments: {{ number_format($allTimeStats->total_paid_count) }}
Pending Payments: {{ number_format($allTimeStats->total_pending_count) }}
Total Tax Deducted: {{ number_format($allTimeStats->total_tax, 2) }}
Completion Rate: @php $totalPayments = $allTimeStats->total_paid_count + $allTimeStats->total_pending_count; $completionRate = $totalPayments > 0 ? ($allTimeStats->total_paid_count / $totalPayments) * 100 : 0; @endphp {{ number_format($completionRate, 1) }}%
System Overview
Total Cycles: {{ number_format($allTimeStats->total_cycles) }}
Active Users: {{ number_format($allTimeStats->total_users) }}
Invoice Compliance: @php $invoiceCompliance = $allTimeStats->total_possible_invoices > 0 ? ($allTimeStats->total_invoices / $allTimeStats->total_possible_invoices) * 100 : 0; @endphp {{ number_format($invoiceCompliance, 1) }}% ({{ $allTimeStats->total_invoices }}/{{ $allTimeStats->total_possible_invoices }})
@endif
@endif