<table border="1">
    <tr>
        <th colspan="7" style="text-align:center; font-size:16px;">
            REKAP ABSENSI SISWA
        </th>
    </tr>

    <tr>
        <td colspan="7">
            Periode: {{ $bulan }}/{{ $tahun }}
            @if($jurusan)
                | Jurusan: {{ $jurusan }}
            @endif
        </td>
    </tr>

    <tr>
        <th>No</th>
        <th>Nama</th>
        <th>Kelas</th>
        <th>Jurusan</th>
        <th>Sakit</th>
        <th>Izin</th>
        <th>Alfa</th>
    </tr>

    @foreach ($perSiswa as $i => $r)
    <tr>
        <td>{{ $i + 1 }}</td>
        <td>{{ $r->nama_siswa }}</td>
        <td>{{ $r->nama_kelas }}</td>
        <td>{{ $r->jurusan }}</td>
        <td>{{ $r->sakit }}</td>
        <td>{{ $r->izin }}</td>
        <td>{{ $r->alfa }}</td>
    </tr>
    @endforeach

    <tr>
        <td colspan="4"><b>TOTAL</b></td>
        <td><b>{{ $summary['S'] }}</b></td>
        <td><b>{{ $summary['I'] }}</b></td>
        <td><b>{{ $summary['A'] }}</b></td>
    </tr>
</table>