@php $counter = 0; $totals = 0; $studentRowCounter = 0; $pageNumber = 1; @endphp @foreach ($students as $key => $stud) @foreach ($stud['courses'] as $item) @if ($counter == 0)

ELITE TRAINING INSTITUTE PTY. LTD.

20 Otter Street, Collingwood, VIC, 3066

0390880255

accounts@eti.edu.au

http://www.eti.edu.au/

ABN 42163187862 | RTO CODE: 40965 | CRICOS NO: 03470A

Commission Payment Results for
{{$agent[0]->agent->detail->company_name}}

Total No. of Students
{{count($students)}}
@if ($totals == 0)
Total amount received for all students   : ${{number_format($totalStudentPayment, 2)}}
Total commission already paid for all students   : ${{number_format($totalCommissionPaid, 2)}}
{{-- --}} @php if($registeredGST == 1 && $gstType == 'Including'){ $zz = 'Including GST'; }elseif($registeredGST == 1 && $gstType == 'Excluding'){ $zz = 'Plus GST'; }else{ $zz = 'No GST'; } @endphp @if ($registeredGST == 1) @elseif ($registeredGST == 0) {{-- --}} @endif
Due commission payable as of {{\Carbon\Carbon::now()->setTimezone('Australia/Brisbane')->format('d/m/Y')}}   : ${{number_format($totalCommissionPayable, 2)}}
Total Amount Payable as of {{\Carbon\Carbon::now()->setTimezone('Australia/Brisbane')->format('d/m/Y')}} {{$item['commValue']}}% {{$zz}}   : ${{number_format($totalCommissionPayableGST, 2)}}N/A${{number_format($totalCommissionPayable, 2)}}
@php $totals = 1; @endphp @endif @php if($counter == 0){ $counter = 1; } @endphp {{--
* 2nd Course *
--}} @elseif ($counter == 2)

ELITE TRAINING INSTITUTE PTY. LTD.

20 Otter Street, Collingwood, VIC, 3066

0390880255

accounts@eti.edu.au

http://www.eti.edu.au/

ABN 42163187862 | RTO CODE: 40965 | CRICOS NO: 03470A

@elseif ($counter == 3) @endif @if ($item['order'] != 1) @php $order = ''; switch ($item['order']){ case 2: $order = '2nd Course'; break; case 3: $order = '3rd Course'; break; default: $order = $item['order'].'th Course'; } @endphp
* {{$order}} *
@endif @php $studentRowCounter = 1; $totalCommDue = 0; $totalCommDueGST = 0; $totalCommAdvance = 0; $totalCommPaid = 0; $totalFeesPaid = 0; @endphp
Student Name {{$stud['firstname']}} {{$stud['lastname'] != '-' ? $stud['lastname'] : ''}} ETI ID {{$stud['student_id']}} Date of Birth {{\Carbon\Carbon::createFromFormat('Y-m-d', $stud['dob'])->format('d/m/Y')}}
Course Start {{\Carbon\Carbon::parse($item['course_start_date'])->format('d/m/Y')}} Course End {{\Carbon\Carbon::parse($item['course_end_date'])->format('d/m/Y')}} Status {{$item['status']}}
Course Name {{$item['course_name']}} Tuition Fee ${{number_format($item['tuition_fee'], 2)}} Non-Tuition Fee ${{number_format($item['non_tuition_fee'], 2)}}
{{-- START INITIAL PAYMENT --}} @if( isset($item['initial_payment']) ) @if( $item['initial_payment']['is_comm_released'] == 1 ) @elseif ($item['initial_payment']['is_comm_released'] != 1 && $item['initial_payment']['pre_deducted_amount'] != 0.00) @else @endif @php $totalFeesPaid += $item['initial_payment']['actual_amount']; @endphp {{-- --}} @php $totalCommDue = $totalCommDue + $item['initial_payment']['commission_payable']; $totalCommDueGST = $totalCommDueGST + ($item['initial_payment']['commission_payable_gst']); $resourceLoop = 0; @endphp @else @endif {{-- END INITIAL PAYMENT --}} @if(isset($item['payment_schedule'])) @foreach ($item['payment_schedule'] as $pay) @php $studentRowCounter++; @endphp @foreach ($pay as $kpd => $vpd) @php $totalCommDue = $totalCommDue + $vpd['commission_payable']; $totalCommDueGST = $totalCommDueGST + ($vpd['commission_payable_gst']); $totalCommAdvance = $totalCommAdvance + $vpd['pre_deducted_amount']; @endphp @if ($vpd['is_comm_released'] == 1 || $vpd['pre_deducted_amount'] != 0) @elseif ($vpd['is_comm_released'] == 2 && $vpd['pre_deducted_amount'] == 0) @else @endif @if($kpd == 0) @endif @php $totalFeesPaid += $vpd['actual_amount']; @endphp {{-- --}} @endforeach @endforeach @endif
No. Student Payment
Due Date
Amount
Received
Date
Paid /
Refund
Date
Actual Amount
(does not include application & material fee)
Pre-Deducted
Commission
Commission
Payable
1 {{\Carbon\Carbon::parse($item['initial_payment']['student_payment_due_date'])->format('d/m/Y')}} ${{number_format($item['initial_payment']['amount_received'], 2)}} {{$item['initial_payment']['date_paid']}} ${{number_format($item['initial_payment']['actual_amount'], 2)}} @if ($item['initial_payment']['pre_deducted_amount'] != 0.00 && $item['initial_payment']['pre_deducted_amount'] != $item['initial_payment']['commission_payable_gst']) @if($item['initial_payment']['pre_deducted_amount'] > $item['initial_payment']['commission_payable_gst'])
${{number_format($item['initial_payment']['pre_deducted_amount'], 2)}}
@else
${{number_format($item['initial_payment']['pre_deducted_amount'], 2)}}
@endif @else ${{number_format($item['initial_payment']['pre_deducted_amount'], 2)}} @endif
${{number_format($item['initial_payment']['commission_payable_gst'], 2)}}${{number_format($item['initial_payment']['student_commission_total'], 2)}}
1 - - - - - -
{{$studentRowCounter}} {{\Carbon\Carbon::parse($vpd['student_payment_due_date'])->format('d/m/Y')}} ${{number_format($vpd['amount_received'], 2)}} {{$vpd['date_paid']}} ${{number_format($vpd['actual_amount'], 2)}} @if ($vpd['pre_deducted_amount'] != 0.00 && $vpd['pre_deducted_amount'] != $vpd['commission_payable_gst']) @if($vpd['pre_deducted_amount'] > $vpd['commission_payable_gst'])
${{number_format($vpd['pre_deducted_amount'], 2)}}
@else
${{number_format($vpd['pre_deducted_amount'], 2)}}
@endif @else ${{number_format($vpd['pre_deducted_amount'], 2)}} @endif
${{number_format($vpd['commission_payable_gst'], 2)}}${{number_format($pay['student_commission_total'], 2)}}
@php //$gst = $totalCommDue * 0.10; //$totalCommDue = $totalCommDue + $gst; @endphp
- Commission Paid
- Commission Paid but Payment Refunded
- Over Pre-deduction
- Less Pre-deduction
{{-- --}} {{-- --}} {{-- --}} {{-- --}} @php $initalPay = isset($item['initial_payment']) ? $item['initial_payment']['pre_deducted_amount'] : 0; @endphp
Total calculated commission: ${{number_format($item['stud_commission_payable'], 2)}}
Actual Total Amount Received as of {{\Carbon\Carbon::now()->setTimezone('Australia/Brisbane')->format('d/m/Y')}}: ${{number_format($totalFeesPaid, 2)}}
Total Calculated Paid Commission as of {{\Carbon\Carbon::now()->setTimezone('Australia/Brisbane')->format('d/m/Y')}}:${{number_format( $item['stud_commission_payable_no_deduction'] - $item['stud_commission_payable_no_released'], 2)}}${{number_format( $item['stud_commission_payable'] - $item['stud_commission_payable_no_released'], 2)}}
Total Commission Payable as of {{\Carbon\Carbon::now()->setTimezone('Australia/Brisbane')->format('d/m/Y')}}:${{number_format($item['stud_commission_payable_no_deduction'], 2)}}${{number_format($item['stud_commission_payable_no_released'], 2)}}
Above amount includes 10% GST
Calculated Pre-Deducted Commission: ${{number_format($totalCommAdvance + $initalPay, 2)}}
Commission Limit: ${{number_format($item['commission_limit'], 2)}}
Note:
*Upront Fees of ${{number_format($item['non_tuition_fee'], 2)}} has been taken on the initial payment as part of the non-tuition fees thus remaining amount will be taken as part of the pre-tuition fees paid.
*If the student misses his/her instalment payment, an equal amount of enrolment and material fee will be deducted from the next payment.
@php if($studentRowCounter != 0){ $counter = 2; } @endphp @endforeach @endforeach