Total Earned
KSh {{ number_format($totalEarned, 2) }}
Accrued commissions
Total Paid
KSh {{ number_format($totalPaid, 2) }}
Payments made
Balance Owed
KSh {{ number_format(abs($balanceOwed), 2) }}
{{ $balanceOwed > 0 ? 'Outstanding' : 'Fully settled' }}
Commission Days
{{ $commissions->count() }}
Days with earnings
{{-- Commission history --}}
Commission History by day
@if($commissions->isEmpty())
No commission records yet.
@else
| Date |
Amount |
@foreach($commissions as $row)
| {{ \Carbon\Carbon::parse($row->date)->format('d M Y') }} |
KSh {{ number_format($row->total, 2) }} |
@endforeach
| Total |
KSh {{ number_format($totalEarned, 2) }} |
@endif
{{-- Right column: payment form + payment history --}}
{{-- Record payment form --}}
@if($balanceOwed > 0)
@endif
{{-- Payment history --}}
Payment History {{ $payments->count() }} records
@if($payments->isEmpty())
No payments recorded yet.
@else
| Date |
Method |
Amount |
@foreach($payments as $pmt)
| {{ $pmt->payment_date->format('d M Y') }} |
@php $method = strtolower($pmt->payment_method ?? 'cash'); @endphp
{{ $pmt->payment_method ?? 'Cash' }}
|
KSh {{ number_format($pmt->amount, 2) }} |
@endforeach
| Total Paid |
KSh {{ number_format($totalPaid, 2) }} |
@endif