@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', 'asc') ->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', 'asc') ->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', 'asc') ->get(); //dd($interestc2, $year->id, $class->study_major_id, $class->study_program_id, $class->study_competency_id); $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

TRANSKRIP NILAI

Nama : {{ $student->name }}
Tempat / Tanggal Lahir : @if($student->birthplace) {{ $student->birthplace }},{{ $student->birthdate }} @else - @endif
NISN : {{ $student->code }}
Bidang Studi Keahlian : {{ $class->major->name }}
Program Studi Keahlian : {{ $class->program->name }}
Kompetensi Keahlian : {{ $class->competency->name }}
{{-- @php dd($student->id); @endphp --}} @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(); $ukk = App\ScoreUkk::where('active',1) ->where('user_id',$student->id) ->where('year_id',session('s_year')) ->where('classroom_id',session('s_classroom')) ->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 @php $i++; $count_mu++; if($score){ $sum_mu = $sum_mu + $final; } @endphp @endforeach @php $i = 1; $count_mk = 0; $sum_mk = 0; @endphp @foreach($area as $rows) @php $score = App\Transcript::where('active',1) ->whereRaw("lessonName like '%".$rows->name."%'") ->where('user_id',$student->id) ->first(); $ukk = App\ScoreUkk::where('active',1) ->where('user_id',$student->id) ->where('year_id',session('s_year')) ->where('classroom_id',session('s_classroom')) ->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 @php $i++; $count_mk++; if($score){ $sum_mk = $sum_mk + $final; } @endphp @endforeach @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(); $ukk = App\ScoreUkk::where('active',1) ->where('user_id',$student->id) ->where('year_id',session('s_year')) ->where('classroom_id',session('s_classroom')) ->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 @php $i++; $count_c1++; if($score){ $sum_c1 = $sum_c1 + $final; } @endphp @endforeach @endif @if(count($interestc2)) @php $i = 1; $count_c2 = 0; $sum_c2 = 0; @endphp @foreach($interestc2 as $rows) @php //$score = App\Transcript::where('active',1) // ->whereRaw("lessonName REGEXP ?", ['(^| )' . $rows->name . '($| )']) // ->where('user_id',$student->id) // ->first(); $score = App\Transcript::where('active', 1) ->where('user_id', $student->id) ->whereRaw("lessonName LIKE ?", ['%' . $rows->name . '%']) ->get() ->filter(function ($item) use ($rows) { return trim($item->lessonName) === trim($rows->name); }) ->first(); //dd($rows->name, $score); $ukk = App\ScoreUkk::where('active',1) ->where('user_id',$student->id) ->where('year_id',session('s_year')) ->where('classroom_id',session('s_classroom')) ->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 @php $i++; $count_c2++; if($score){ $sum_c2 = $sum_c2 + $final; } @endphp @endforeach @endif @if(count($interestc3)) @php $i = 1; $count_c3 = 0; $sum_c3 = 0; @endphp @foreach($interestc3 as $rows) @php $score = App\Transcript::where('active',1) ->whereRaw("lessonName like '%".$rows['name']."%'") ->where('user_id',$student->id) ->first(); $ukk = App\ScoreUkk::where('active',1) ->where('user_id',$student->id) ->where('year_id',session('s_year')) ->where('classroom_id',session('s_classroom')) ->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 @php $i++; $count_c3++; if($score) { $sum_c3 = $sum_c3 + $final; } @endphp @endforeach @endif @php $ukk = App\ScoreUkk::where('active',1) ->where('user_id',$student->id) ->where('year_id',session('s_year')) ->where('classroom_id',session('s_classroom')) ->first(); if($ukk) { $score_ukk = $ukk->ukk_score; $score_rpl = $ukk->rpl_score; } else { $score_ukk = null; $score_rpl = null; } @endphp
No Program Pendidikan dan Pelatihan
(Kopetensi)
Nilai Semester Nilai Nilai Akhir
1 2 3 4 5 6 Rata-rata US SKL UKK
A MUATAN NASIONAL
{{ $i }} {{ $rows->name }} @if($score) {{ $score->semester_one }} @endif @if($score) {{ $score->semester_two }} @endif @if($score) {{ $score->semester_three }} @endif @if($score) {{ $score->semester_four }} @endif @if($score) {{ $score->semester_five }} @endif @if($score) {{ $score->semester_six }} @endif @if($score) {{ number_format($avg, 2) }} @endif @if($score) {{ $score->school_score }} @endif @if($score) {{ number_format($final, 2) }} @endif @if($score) {{ number_format($final, 2) }} @endif
B MUATAN KEWILAYAHAN
{{ $i }} {{ $rows->name }} @if($score) {{ $score->semester_one }} @endif @if($score) {{ $score->semester_two }} @endif @if($score) {{ $score->semester_three }} @endif @if($score) {{ $score->semester_four }} @endif @if($score) {{ $score->semester_five }} @endif @if($score) {{ $score->semester_six }} @endif @if($score) {{ number_format($avg, 2) }} @endif @if($score) {{ $score->school_score }} @endif @if($score) {{ number_format($final, 2) }} @endif @if($score) {{ number_format($final, 2) }} @endif
C1 DASAR BIDANG KEAHLIAN
{{ $i }} {{ $rows['name'] }} @if($score) {{ $score->semester_one }} @endif @if($score) {{ $score->semester_two }} @endif @if($score) {{ $score->semester_three }} @endif @if($score) {{ $score->semester_four }} @endif @if($score) {{ $score->semester_five }} @endif @if($score) {{ $score->semester_six }} @endif @if($score) {{ number_format($avg, 2) }} @endif @if($score) {{ $score->school_score }} @endif @if($score) {{ number_format($final, 2) }} @endif @if($score) {{ number_format($final, 2) }} @endif
C2 DASAR PROGRAM KEAHLIAN
{{ $i }} {{ $rows->name }} @if($score) {{ $score->semester_one }} @endif @if($score) {{ $score->semester_two }} @endif @if($score) {{ $score->semester_three }} @endif @if($score) {{ $score->semester_four }} @endif @if($score) {{ $score->semester_five }} @endif @if($score) {{ $score->semester_six }} @endif @if($score) {{ number_format($avg, 2) }} @endif @if($score) {{ $score->school_score }} @endif @if($score) {{ number_format($final, 2) }} @endif @if($score) {{ number_format($final, 2) }} @endif
C3 DASAR KOMPETENSI KEAHLIAN
{{ $i }} {{ $rows['name'] }} @if($score) {{ $score->semester_one }} @endif @if($score) {{ $score->semester_two }} @endif @if($score) {{ $score->semester_three }} @endif @if($score) {{ $score->semester_four }} @endif @if($score) {{ $score->semester_five }} @endif @if($score) {{ $score->semester_six }} @endif @if($score) {{ number_format($avg, 2) }} @endif @if($score) {{ $score->school_score }} @endif @if($score) {{ number_format($final, 2) }}@endif @if($score) {{ number_format($final, 2) }} @endif
{{ $i }} Nilai UKK {{ $score_ukk }} {{ $score_ukk }}
{{ $i+1 }} Nilai Praktik Kerja Industri {{ $score_rpl }}
@php $scount = ($sum_c3 + $sum_c2 + $sum_c1 + $sum_mk + $sum_mu + $score_ukk + $score_rpl) / ($count_c3 + $count_c2 + $count_c1 + $count_mk + $count_mu + 2); @endphp
Rata-rata Nilai Akhir: {{ number_format($scount, 2) }}
Tempat PKL: {{ $student->pkl }}
{{-- @php dd('$sum_c3 : ' . $sum_c3, '$sum_c2 : ' . + $sum_c2 , '$sum_c1 : ' . $sum_c1, '$sum_mk : ' . $sum_mk, '$sum_mu : ' . $sum_mu, '$score_ukk : ' . $score_ukk, '$score_rpl : ' . $score_rpl, '$count_c3 : ' . $count_c3, '$count_c2 : ' . $count_c2, '$count_c1 : ' . $count_c1, '$count_mk : ' . $count_mk, '$count_mu : ' . $count_mu, $sum_c3 + $sum_c2 + $sum_c1 + $sum_mk + $sum_mu + $score_ukk + $score_rpl, $count_c3 + $count_c2 + $count_c1 + $count_mk + $count_mu + 2 ) @endphp --}}
Tangerang Selatan, @if(session('date_mangsa')){{ dateIndo(session('date_mangsa')) }}@else{{ dateIndo(DATE('Y-m-d')) }}@endif
Kepala Sekolah,
{{ $setting->headmaster }}
@endforeach