@foreach($checked as $id)
@php
$student = App\User::find($id);
$national = App\Lesson::where('category',1)
->where('active',1)
->where('year_id',$year->id)
->where('study_major_id',$class->study_major_id)
->where('study_program_id',$class->study_program_id)
->where('study_competency_id',$class->study_competency_id)
->groupBy('name')
->orderBy('urutan')
->get();
$area = App\Lesson::where('category',2)
->where('active',1)
->where('year_id',$year->id)
->where('study_major_id',$class->study_major_id)
->where('study_program_id',$class->study_program_id)
->where('study_competency_id',$class->study_competency_id)
->groupBy('name')
->orderBy('urutan')
->get();
$interestc1 = App\Lesson::where('category',3)
->where('subcategory',1)
->where('active',1)
->where('year_id',$year->id)
->where('study_major_id',$class->study_major_id)
->where('study_program_id',$class->study_program_id)
->where('study_competency_id',$class->study_competency_id)
->groupBy('name')
->orderBy('urutan')
->get();
$interestc2 = App\Lesson::where('category',3)
->where('subcategory',2)
->where('active',1)
->where('year_id',$year->id)
->where('study_major_id',$class->study_major_id)
->where('study_program_id',$class->study_program_id)
->where('study_competency_id',$class->study_competency_id)
->groupBy('name')
->orderBy('urutan')
->get();
$interestc3 = App\Lesson::where('category',3)
->where('subcategory',3)
->where('active',1)
->where('year_id',$year->id)
->where('study_major_id',$class->study_major_id)
->where('study_program_id',$class->study_program_id)
->where('study_competency_id',$class->study_competency_id)
->groupBy('name')
->orderBy('urutan')
->get();
$count = count($national) + count($area) + count($interestc1) + count($interestc2) + count($interestc3);
$count_real = $count;
if(count($interestc1)) {
$count = $count + 1;
}
if(count($interestc2)) {
$count = $count + 1;
}
$extra = DB::table('score_extras')
->select('*')
->where('user_id',$student->id)
->where('year_id',session('s_year'))
->where('classroom_id',session('s_classroom'))
->where('semester',session('s_semester'))
->first();
@endphp
SURAT KETERANGAN LULUS
Nomor : 194/SMK-PUSTEK/V/2023
Yang bertandatangan di bawah ini Kepala SMK PUSTEK Serpong Kota Tangerang Selatan Provinsi Banten, dengan ini menerangkan:
Nama |
: |
{{ $student->name }} |
Tempat / Tanggal Lahir |
: |
@if($student->birthplace)
{{ $student->birthplace }}, {{ dateSimple($student->birthdate) }}
@else
-
@endif
|
Nomor Induk Siswa |
: |
{{ $student->code }} |
Nomor Induk Siswa Nasional |
: |
@if($student->nisn)
{{ $student->nisn }}
@else
-
@endif
|
Program Studi Keahlian |
: |
{{ $class->program->name }} |
Kompetensi Keahlian |
: |
{{ $class->competency->name }} |
Berdasarkan kriteria kelulusan peserta didik yang sudah ditetapkan, maka yang bersangkutan dinyatakan:
LULUS
dengan hasil sebagai berikut :
No |
Mata Pelajaran |
Nilai Ujian Sekolah |
Muatan Nasional |
|
@php
$i = 1;
$count_mu = 0;
$sum_mu = 0;
@endphp
@foreach($national as $rows)
@php
$score = App\Transcript::where('active',1)
->whereRaw("lessonName like '%".$rows->name."%'")
->where('user_id',$student->id)
->first();
if(isset($score)){
$divide = 0;
if($score->semester_one > 0) {
$divide += 1;
}
if($score->semester_two > 0) {
$divide += 1;
}
if($score->semester_three > 0) {
$divide += 1;
}
if($score->semester_four > 0) {
$divide += 1;
}
if($score->semester_five > 0) {
$divide += 1;
}
if($score->semester_six > 0) {
$divide += 1;
}
$avg = ($score->semester_one + $score->semester_two + $score->semester_three + $score->semester_four + $score->semester_five + $score->semester_six) / ($divide == 0 ? 1 : $divide);
$final = ($avg * 0.6) + ($score->school_score * 0.4);
}
@endphp
{{ $i }} |
{{ $rows->name }} |
@if($score) {{ number_format($final, 2) }} @endif |
@php
$i++;
if($score){
$count_mu++;
$sum_mu += $final;
}
@endphp
@endforeach
@php
$i = 1;
$count_mk = 0;
$sum_mk = 0;
$score_kwu = 0;
$score_qr = 0;
@endphp
Muatan Kewilayahan |
|
@foreach($area as $rows)
@php
if($rows->name != 'Kewirausahaan' AND $rows->name != 'Baca Tulis Al-Quran/Iman dan Taqwa') {
$score = App\Transcript::where('active',1)
->whereRaw("lessonName like '%".$rows->name."%'")
->where('user_id',$student->id)
->first();
if(isset($score)){
$divide = 0;
if($score->semester_one > 0) {
$divide += 1;
}
if($score->semester_two > 0) {
$divide += 1;
}
if($score->semester_three > 0) {
$divide += 1;
}
if($score->semester_four > 0) {
$divide += 1;
}
if($score->semester_five > 0) {
$divide += 1;
}
if($score->semester_six > 0) {
$divide += 1;
}
$avg = ($score->semester_one + $score->semester_two + $score->semester_three + $score->semester_four + $score->semester_five + $score->semester_six) / ($divide == 0 ? 1 : $divide);
$final = ($avg * 0.6) + ($score->school_score * 0.4);
}
@endphp
{{ $i }} |
{{ $rows->name }} |
@if($score) {{ number_format($final, 2) }} @endif |
@php
$i++;
if($score){
$count_mk++;
$sum_mk += $final;
}
} elseif($rows->name == 'Baca Tulis Al-Quran/Iman dan Taqwa') {
$score = App\Transcript::where('active',1)
->whereRaw("lessonName like '%".$rows->name."%'")
->where('user_id',$student->id)
->first();
if(isset($score)){
$divide = 0;
if($score->semester_one > 0) {
$divide += 1;
}
if($score->semester_two > 0) {
$divide += 1;
}
if($score->semester_three > 0) {
$divide += 1;
}
if($score->semester_four > 0) {
$divide += 1;
}
if($score->semester_five > 0) {
$divide += 1;
}
if($score->semester_six > 0) {
$divide += 1;
}
$avg = ($score->semester_one + $score->semester_two + $score->semester_three + $score->semester_four + $score->semester_five + $score->semester_six) / ($divide == 0 ? 1 : $divide);
$final = ($avg * 0.6) + ($score->school_score * 0.4);
$score_qr = $final;
}
} else {
$score = App\Transcript::where('active',1)
->whereRaw("lessonName like '%".$rows->name."%'")
->where('user_id',$student->id)
->first();
if($score){
$divide = 0;
if($score->semester_one > 0) {
$divide += 1;
}
if($score->semester_two > 0) {
$divide += 1;
}
if($score->semester_three > 0) {
$divide += 1;
}
if($score->semester_four > 0) {
$divide += 1;
}
if($score->semester_five > 0) {
$divide += 1;
}
if($score->semester_six > 0) {
$divide += 1;
}
$avg = ($score->semester_one + $score->semester_two + $score->semester_three + $score->semester_four + $score->semester_five + $score->semester_six) / ($divide == 0 ? 1 : $divide);
$final = ($avg * 0.6) + ($score->school_score * 0.4);
$score_kwu = $final;
}
}
@endphp
@endforeach
@if($score_qr)
{{ $i }} |
Muatan Lokal |
|
Baca Tulis Al-Quran/Iman dan Taqwa |
@if($score_qr) {{ number_format($score_qr, 2) }} @endif |
@php
$sum_mk += $score_qr;
$count_mk++;
@endphp
@endif
Muatan Peminatan Kejuruan |
|
@if(count($interestc1))
@php
$i = 1;
$count_c1 = 0;
$sum_c1 = 0;
@endphp
@foreach($interestc1 as $rows)
@php
$score = App\Transcript::where('active',1)
->whereRaw("lessonName like '%".$rows->name."%'")
->where('user_id',$student->id)
->first();
if(isset($score)){
$divide = 0;
if($score->semester_one > 0) {
$divide += 1;
}
if($score->semester_two > 0) {
$divide += 1;
}
if($score->semester_three > 0) {
$divide += 1;
}
if($score->semester_four > 0) {
$divide += 1;
}
if($score->semester_five > 0) {
$divide += 1;
}
if($score->semester_six > 0) {
$divide += 1;
}
$avg = ($score->semester_one + $score->semester_two + $score->semester_three + $score->semester_four + $score->semester_five + $score->semester_six) / ($divide == 0 ? 1 : $divide);
$final = ($avg * 0.6) + ($score->school_score * 0.4);
}
@endphp
{{ $i }} |
{{ $rows->name }} |
@if($score) {{ number_format($final, 2) }} @endif |
@php
$i++;
if($score){
$count_c1++;
$sum_c1 += $final;
}
@endphp
@endforeach
@endif
@php $score_c2 = 0; @endphp
@if(count($interestc2))
@php
// $i = 1;
$count_c2 = 0;
$sum_c2 = 0;
$score_c2 = 0;
foreach($interestc2 as $rows) {
$score = App\Transcript::where('active',1)
->whereRaw("lessonName like '%".$rows->name."%'")
->where('user_id',$student->id)
->first();
$count_c2++;
if($score){
$divide = 0;
if($score->semester_one > 0) {
$divide += 1;
}
if($score->semester_two > 0) {
$divide += 1;
}
if($score->semester_three > 0) {
$divide += 1;
}
if($score->semester_four > 0) {
$divide += 1;
}
if($score->semester_five > 0) {
$divide += 1;
}
if($score->semester_six > 0) {
$divide += 1;
}
$avg = ($score->semester_one + $score->semester_two + $score->semester_three + $score->semester_four + $score->semester_five + $score->semester_six) / ($divide == 0 ? 1 : $divide);
$final = ($avg * 0.6) + ($score->school_score * 0.4);
$sum_c2 = $sum_c2 + $final;
}
}
$score_c2 = $sum_c2 / $count_c2;
@endphp
{{ $i }} |
Dasar Program Keahlian |
{{ number_format($score_c2, 2) }} |
@endif
@if(count($interestc3))
@php
// $i = 1;
$count_c3 = 0;
$sum_c3 = 0;
$score_c3 = 0;
$score_praktek = 0;
foreach($interestc3 as $rows) {
$score = App\Transcript::where('active',1)
->whereRaw("lessonName like '%".$rows->name."%'")
->where('user_id',$student->id)
->first();
$count_c3++;
if($score) {
$divide = 0;
if($score->semester_one > 0) {
$divide += 1;
}
if($score->semester_two > 0) {
$divide += 1;
}
if($score->semester_three > 0) {
$divide += 1;
}
if($score->semester_four > 0) {
$divide += 1;
}
if($score->semester_five > 0) {
$divide += 1;
}
if($score->semester_six > 0) {
$divide += 1;
}
$avg = ($score->semester_one + $score->semester_two + $score->semester_three + $score->semester_four + $score->semester_five + $score->semester_six) / ($divide == 0 ? 1 : $divide);
$final = ($avg * 0.6) + ($score->school_score * 0.4);
$sum_c3 = $sum_c3 + $final;
}
}
$score_c3 = $sum_c3 / $count_c3;
@endphp
@endif
{{ $i+1 }} |
Kompetensi Keahlian |
{{ number_format($score_c3, 2) }} |
@php
/*
2 |
Produk Kreatif dan Kewirausahaan |
{{ number_format($score_praktek, 2) }} |
*/
@endphp
@php
//$scount = ($score_c3 + $score_c2 + $sum_c1 + $sum_mk + $sum_mu + $score_praktek) / (3 + $count_c1 + $count_mk + $count_mu);
$scount = ($score_c3 + $score_c2 + $sum_c1 + $sum_mk + $sum_mu) / (2 + $count_c1 + $count_mk + $count_mu);
@endphp
Rata-rata |
{{ number_format($scount, 2) }} |
Surat Keterangan ini bersifat sementara dan berlaku sampai diterbitkannya ijazah untuk siswa yang bersangkutan.
Demikian Surat Keterangan diberikan agar dapat dipergunakan sebagaimana mestinya.
Tangerang Selatan, @if(session('date_mangsa')){{ dateIndo(session('date_mangsa')) }}@else{{ dateIndo(DATE('Y-m-d')) }}@endif
Kepala Sekolah,
{{ $setting->headmaster }}
@endforeach