@php use Carbon\Carbon; @endphp
{{ $sekolah->alamat ?? '' }}
| Kelas | : | {{ $kelas->name }} |
| Wali Kelas | : | {{ $kelas->guru->name }} |
| Tahun Pelajaran | : | {{ $kelas->tapel->tahun_pelajaran }} Semester {{ $kelas->tapel->semester }} |
| Bulan | : | {{ $monthIndo }} |
| # | NIS | Nama Siswa | L/P | Jumlah | |||
|---|---|---|---|---|---|---|---|
| H | S | I | A | ||||
| {{ $loop->iteration }} | {{ $item->nis }} | {{ $item->name }} | {{ $item->jk }} | @php $H = $absen->where('siswa_id', $item->id) ->whereIn('keterangan', ['H']) ->where('tanggal', '>=', $months[0]) ->where('tanggal', '<=', end($months)) ->whereNotIn('tanggal', $libur->pluck('tgl')) ->count(); $S = $absen->where('siswa_id', $item->id) ->whereIn('keterangan', ['S']) ->where('tanggal', '>=', $months[0]) ->where('tanggal', '<=', end($months)) ->whereNotIn('tanggal', $libur->pluck('tgl')) ->count(); $I = $absen->where('siswa_id', $item->id) ->whereIn('keterangan', ['I']) ->where('tanggal', '>=', $months[0]) ->where('tanggal', '<=', end($months)) ->whereNotIn('tanggal', $libur->pluck('tgl')) ->count(); $A = $absen->where('siswa_id', $item->id) ->whereIn('keterangan', ['A']) ->where('tanggal', '>=', $months[0]) ->where('tanggal', '<=', end($months)) ->whereNotIn('tanggal', $libur->pluck('tgl')) ->count(); @endphp{{ $H > 0 ? $H : '' }} | {{ $S > 0 ? $S : '' }} | {{ $I > 0 ? $I : '' }} | {{ $A > 0 ? $A : '' }} |