Commission Range Report

Commission Range Report

{{ \Carbon\Carbon::parse($start)->format('d M Y') }} — {{ \Carbon\Carbon::parse($end)->format('d M Y') }}
@if(session('success'))
{{ session('success') }}
@endif
Total Earned
KSh {{ number_format($summary['total_earned'], 2) }}
Total Paid
KSh {{ number_format($summary['total_paid'], 2) }}
Balance Owed
KSh {{ number_format($summary['balance'], 2) }}
Staff
{{ $employees->count() }}
Staff Commission Summary
@forelse($employees as $emp) @php $earned = $commissions[$emp->id] ?? 0; $paid = $emp->employeePayments->sum('amount'); $balance = round($earned - $paid, 2); $empBd = $breakdown[$emp->id] ?? []; @endphp @empty @endforelse @if($employees->isNotEmpty()) @php $tE = array_sum($commissions); $tP = $employees->sum(fn($e) => $e->employeePayments->sum('amount')); $tB = round($tE - $tP, 2); @endphp @endif
Employee Services Earned Paid Balance Actions
{{ strtoupper(substr($emp->name, 0, 1)) }}
{{ $emp->name }}
{{ $emp->display_role }}
{{ count($empBd) }} KSh {{ number_format($earned, 2) }} KSh {{ number_format($paid, 2) }} @if($balance > 0) KSh {{ number_format($balance, 2) }} @elseif($balance < 0) KSh {{ number_format($balance, 2) }} @else Settled @endif
No commission data for this period.
Totals KSh {{ number_format($tE, 2) }} KSh {{ number_format($tP, 2) }} KSh {{ number_format($tB, 2) }}
@push('modals') {{-- Work Log Modal --}}

Work Log

{{ \Carbon\Carbon::parse($start)->format('d M') }} — {{ \Carbon\Carbon::parse($end)->format('d M Y') }}

Date & Time Service Client Vehicle Sale Commission
Total Commission
{{-- Pay Modal --}}

Commission Payment

Date & Time Service Client Vehicle Sale Commission
Total Earned
@csrf
@endpush @push('scripts') @endpush