@foreach($checked as $id) @php $student = App\User::find($id); $national = App\Lesson::where('category',1) ->where('active',1) ->where('study_major_id',$class->study_major_id) ->where('study_program_id',$class->study_program_id) ->where('study_competency_id',$class->study_competency_id) ->orderBy('urutan') ->get(); $area = App\Lesson::where('category',2) ->where('active',1) ->where('study_major_id',$class->study_major_id) ->where('study_program_id',$class->study_program_id) ->where('study_competency_id',$class->study_competency_id) ->orderBy('urutan') ->get(); $interestc1 = App\Lesson::where('category',3) ->where('subcategory',1) ->where('active',1) ->where('study_major_id',$class->study_major_id) ->where('study_program_id',$class->study_program_id) ->where('study_competency_id',$class->study_competency_id) ->orderBy('urutan') ->get(); $interestc2 = App\Lesson::where('category',3) ->where('subcategory',2) ->where('active',1) ->where('study_major_id',$class->study_major_id) ->where('study_program_id',$class->study_program_id) ->where('study_competency_id',$class->study_competency_id) ->orderBy('urutan') ->get(); $interestc3 = App\Lesson::where('category',3) ->where('subcategory',3) ->where('active',1) ->where('study_major_id',$class->study_major_id) ->where('study_program_id',$class->study_program_id) ->where('study_competency_id',$class->study_competency_id) ->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 : 258/SMK-PUSTEK/VI/2021

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 }},{{ $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 :

@php $i = 1; $count_mu = 0; $sum_mu = 0; @endphp @foreach($national as $rows) @php $score = App\Transcript::where('active',1) ->where('lesson_id',$rows->id) ->where('user_id',$student->id) ->first(); @endphp @php $i++; $count_mu++; if($score){ $sum_mu = $sum_mu + $score->un_score; } @endphp @endforeach @php $i = 1; $count_mk = 0; $sum_mk = 0; $score_kwu = 0; $score_qr = 0; @endphp @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) ->where('lesson_id',$rows->id) ->where('user_id',$student->id) ->first(); @endphp @php $i++; $count_mk++; if($score){ $sum_mk = $sum_mk + $score->un_score; } } elseif($rows->name == 'Baca Tulis Al-Quran/Iman dan Taqwa') { $score = App\Transcript::where('active',1) ->where('lesson_id',$rows->id) ->where('user_id',$student->id) ->first(); if($score){ $score_qr = $score->un_score; } } else { $score = App\Transcript::where('active',1) ->where('lesson_id',$rows->id) ->where('user_id',$student->id) ->first(); if($score){ $score_kwu = $score->un_score; } } @endphp @endforeach @if($score_qr) @endif @if(count($interestc1)) @php $i = 1; $count_c1 = 0; $sum_c1 = 0; @endphp @foreach($interestc1 as $rows) @php $score = App\Transcript::where('active',1) ->where('lesson_id',$rows->id) ->where('user_id',$student->id) ->first(); @endphp @php $i++; $count_c1++; if($score){ $sum_c1 = $sum_c1 + $score->un_score; } @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) ->where('lesson_id',$rows->id) ->where('user_id',$student->id) ->first(); $count_c2++; if($score){ $sum_c2 = $sum_c2 + $score->un_score; } } $score_c2 = ceil($sum_c2 / $count_c2); @endphp @endif @if(count($interestc3)) @php // $i = 1; $count_c3 = 0; $sum_c3 = 0; $score_c3 = 0; $score_praktek = 0; foreach($interestc3 as $rows) { if($rows->name != 'Produk Kreatif dan Kewirausahaan') { $score = App\Transcript::where('active',1) ->where('lesson_id',$rows->id) ->where('user_id',$student->id) ->first(); //$count_c3++; if($score) { $count_c3++; $sum_c3 = $sum_c3 + $score->un_score; } } else { $score = App\Transcript::where('active',1) ->where('lesson_id',$rows->id) ->where('user_id',$student->id) ->first(); if($score) { $score_praktek = ($score->un_score + $score_kwu) / 2; $count_c3++; $sum_c3 = $sum_c3 + $score_praktek; } } } $score_c3 = ceil($sum_c3 / $count_c3); @endphp @endif @php /* */ @endphp @php //$scount = ceil(($score_c3 + $score_c2 + $sum_c1 + $sum_mk + $sum_mu + $score_praktek) / (3 + $count_c1 + $count_mk + $count_mu)); $scount = ceil(($score_c3 + $score_c2 + $sum_c1 + $sum_mk + $sum_mu) / (1 + $count_c1 + $count_mk + $count_mu)); @endphp
No Mata Pelajaran Nilai Ujian Sekolah
Muatan Nasional
{{ $i }} {{ $rows->name }} @if($score) {{ $score->un_score }} @endif
Muatan Kewilayahan
{{ $i }} {{ $rows->name }} @if($score) {{ $score->un_score }} @endif
{{ $i }} Muatan Lokal
Baca Tulis Al-Quran/Iman dan Taqwa @if($score_qr) {{ $score_qr }} @endif
Muatan Peminatan Kejuruan
{{ $i }} {{ $rows->name }} @if($score) {{ $score->un_score }} @endif
{{ $i }} Dasar Program Keahlian {{ $score_c2 }}
{{ $i+1 }} Kompetensi Keahlian {{ $score_c3 }}
2 Produk Kreatif dan Kewirausahaan {{ $score_praktek }}
Rata-rata {{ $scount }}

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