Commission Report
Period: {{ $period }}
Generated on: {{ now()->format('d M Y H:i:s') }}
@php $prevBookingKey = ''; $totalPaid = 0; $totalDeposit = 0; $totalNett = 0; $totalGross = 0; @endphp @forelse($data as $item) @php $currentBookingKey = $item->booking_date . '|' . $item->no . '|' . $item->status . '|' . $item->agent . '|' . $item->paid . '|' . $item->currency . '|' . $item->deposit; $isNewBooking = $currentBookingKey !== $prevBookingKey; $prevBookingKey = $currentBookingKey; if ($isNewBooking) { $totalPaid += $item->paid; $totalDeposit += $item->deposit; } $totalNett += $item->nett; $totalGross += $item->gross; @endphp @empty @endforelse @if(count($data) > 0) @endif
{{ __('Booking Date') }} {{ __('Booking No') }} {{ __('Status') }} {{ __('Agent') }} {{ __('Payment Method') }} {{ __('Currency') }} {{ __('Paid') }} {{ __('Deposit') }} {{ __('Lesson Date') }} {{ __('Lesson Time') }} {{ __('Package Code') }} {{ __('Package Name') }} {{ __('Pax') }} {{ __('Nett') }} {{ __('Gross') }}
@if($isNewBooking) {{ \Carbon\Carbon::parse($item->booking_date)->format('d/m/Y') }} @endif @if($isNewBooking) {{ $item->no }} @endif @if($isNewBooking) {{ $item->status }} @endif @if($isNewBooking) {{ $item->agent }} @endif @if($isNewBooking) {{ $item->payment }} @endif @if($isNewBooking) {{ $item->currency }} @endif @if($isNewBooking) {{ number_format($item->paid, 0) }} @endif @if($isNewBooking) {{ number_format($item->deposit, 0) }} @endif {{ \Carbon\Carbon::parse($item->lesson_date)->format('d/m/Y') }} {{ $item->lesson_time }} {{ $item->code }} {{ $item->name }} {{ $item->pax }} {{ number_format($item->nett, 0) }} {{ number_format($item->gross, 0) }}
No data found
Total: {{ number_format($totalPaid, 0) }} {{ number_format($totalDeposit, 0) }} {{ $data->sum('pax') }} {{ number_format($totalNett, 0) }} {{ number_format($totalGross, 0) }}