<table>
    
    <tr>
        <th colspan="7" style="font-size:16px; font-weight:bold;">
            LAPORAN REKAP KEHADIRAN SISWA
        </th>
    </tr>

    
    <tr>
        <td colspan="7">
            Mata Pelajaran :
            <?php echo e(request('jadwal_id') ? $jadwals->firstWhere('jadwal_id', request('jadwal_id'))->mapel->nama_mapel ?? '-' : '-'); ?>

        </td>
    </tr>

    
    <tr>
        <td colspan="7">
            Kelas :
            <?php echo e(request('jadwal_id') ? $jadwals->firstWhere('jadwal_id', request('jadwal_id'))->kelas->nama_kelas ?? '-' : '-'); ?>

        </td>
    </tr>

    
    <tr>
        <td colspan="7">
            Jurusan :
            <?php echo e(request('jadwal_id') ? optional($jadwals->firstWhere('jadwal_id', request('jadwal_id'))->kelas->jurusan)->nama_jurusan ?? '-' : '-'); ?>

        </td>
    </tr>

    
    <tr>
        <td colspan="7">
            Guru :
            <?php echo e($user->guru->nama_guru ?? '-'); ?>

        </td>
    </tr>

    
    <tr>
        <td colspan="7">
            Tanggal :
            <?php echo e(\Carbon\Carbon::parse($tanggal)->translatedFormat('d F Y')); ?>

        </td>
    </tr>

    <tr></tr>

    
    <tr>
        <th>No</th>
        <th>NIS</th>
        <th>Nama Siswa</th>
        <th>Hadir</th>
        <th>Sakit</th>
        <th>Izin</th>
        <th>Alfa</th>
    </tr>

    <?php
        $grandH = 0;
        $grandS = 0;
        $grandI = 0;
        $grandA = 0;
    ?>

    <?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

        <?php
            $grandH += $item->total_hadir;
            $grandS += $item->total_sakit;
            $grandI += $item->total_izin;
            $grandA += $item->total_alfa;
        ?>

        <tr>
            <td><?php echo e($index + 1); ?></td>
            <td>'<?php echo e($item->nis); ?></td>
            <td><?php echo e($item->nama_siswa); ?></td>
            <td><?php echo e($item->total_hadir); ?></td>
            <td><?php echo e($item->total_sakit); ?></td>
            <td><?php echo e($item->total_izin); ?></td>
            <td><?php echo e($item->total_alfa); ?></td>
        </tr>

    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

    
    <tr>
        <td colspan="3"><strong>TOTAL</strong></td>
        <td><strong><?php echo e($grandH); ?></strong></td>
        <td><strong><?php echo e($grandS); ?></strong></td>
        <td><strong><?php echo e($grandI); ?></strong></td>
        <td><strong><?php echo e($grandA); ?></strong></td>
    </tr>
</table><?php /**PATH C:\laragon\www\sistem-absensi-smkn-2-rupat\resources\views/guru/rekap-kehadiran/excel.blade.php ENDPATH**/ ?>