Select a pupil on the left to populate the certificate.
@else
@php
$leftOn = $student->status === 'Transferred' ? $student->transferred_on->toDateString() : now()->toDateString();
$kcpe = \App\Models\LeavingCertificate::kcpeIndexFor($student->admission_no);
$draft = [
'full_name' => $student->full_name,
'admission_no' => $student->admission_no,
'kcpe_index' => $kcpe,
'date_of_birth' => $student->date_of_birth?->toDateString(),
'issued_on' => now()->toDateString(),
'entered_on' => $student->date_of_admission?->toDateString(),
'entered_standard' => '1',
'left_on' => $leftOn,
'left_standard' => '8',
'course_standard' => '8',
'report' => $student->full_name.' is a disciplined, hardworking and industrious pupil of good character. '.($student->gender === 'Female' ? 'She' : 'He').' showed commendable ability in classwork and cooperated well with teachers and fellow pupils throughout '.($student->gender === 'Female' ? 'her' : 'his').' stay at the school. '.($student->gender === 'Female' ? 'She' : 'He').' leaves the school in good standing.',
];
@endphp
@endif
@if ($student)