

<?php $__env->startSection('content'); ?>

<h3>Penggajian Periode: <?php echo e($periode); ?></h3>

<form method="GET" class="row mb-3">

    <div class="col-md-3">

        <input
            type="month"
            name="periode"
            value="<?php echo e($periode); ?>"
            class="form-control">

    </div>

    <div class="col-md-2">

        <button class="btn btn-primary">
            Filter
        </button>

    </div>

</form>

<div class="d-flex gap-2 mb-3">
    <a href="/penggajian/generate"
       class="btn btn-success">
        Generate Gaji
    </a>

    <a href="/penggajian/create"
       class="btn btn-primary">
        Tambah Gaji
    </a>

    <a href="/penggajian/export"
       class="btn btn-dark">
        Export Excel
    </a>
</div>

<div class="card shadow">

    <div class="card-header">

        <h4>Data Penggajian</h4>

    </div>

    <div class="card-body">
        <div class="row mb-3">

    <div class="col-md-6">

        <div class="card border-primary">

            <div class="card-body">

                <h6>Total Guru</h6>

                <h3>
                    <?php echo e($totalGuru); ?>

                </h3>

            </div>

        </div>

    </div>

    <div class="col-md-6">

        <div class="card border-success">

            <div class="card-body">

                <h6>Total Penggajian</h6>

                <h3>

                    Rp <?php echo e(number_format($totalGaji)); ?>


                </h3>

            </div>

        </div>

    </div>

</div>

        <table
            class="table table-striped table-hover">

            <thead>

            <tr>

                <th>Guru</th>
                <th>Jam</th>
                <th>Tarif</th>
                <th>Insentif</th>
                <th>Gaji Staff</th>
                <th>Potongan</th>
                <th>Gaji Bersih</th>
                <th width="250">Aksi</th>

            </tr>

            </thead>

            <tbody>

            <?php $__empty_1 = true; $__currentLoopData = $penggajian; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>

            <tr>

                <td>

                    <b>
                        <?php echo e($p->guru->nama); ?>

                    </b>

                </td>

                <td>

                    <?php echo e($p->total_jam); ?> Jam

                </td>

                <td>

                    Rp <?php echo e(number_format($p->tarif)); ?>


                </td>

                <td>

                    <span
                        class="badge bg-success">
                        Rp <?php echo e(number_format($p->tunjangan)); ?>


                    </span>

                </td>

                <td>
                    <span
                        class="badge bg-info">
                        Rp <?php echo e(number_format($p->gaji_staff)); ?>

                    </span>
                </td>

                <td>

                    <span
                        class="badge bg-danger">

                        Rp <?php echo e(number_format($p->potongan)); ?>


                    </span>

                </td>

                <td>

                    <b class="text-primary">

                        Rp <?php echo e(number_format($p->gaji_bersih)); ?>


                    </b>

                </td>

                <td>

                    <a
                        href="/penggajian/<?php echo e($p->id); ?>"
                        class="btn btn-info btn-sm">

                        Detail

                    </a>

                    <a
                        href="/penggajian/<?php echo e($p->id); ?>/edit"
                        class="btn btn-warning btn-sm">

                        Edit

                    </a>

                    <a
                        href="/penggajian/slip/<?php echo e($p->id); ?>"
                        target="_blank"
                        class="btn btn-success btn-sm">

                        Slip

                    </a>

                    <form
                        action="/penggajian/<?php echo e($p->id); ?>"
                        method="POST"
                        style="display:inline">

                        <?php echo csrf_field(); ?>
                        <?php echo method_field('DELETE'); ?>

                        <button
                            class="btn btn-danger btn-sm"
                            onclick="return confirm('Hapus data?')">

                            Hapus

                        </button>

                    </form>

                </td>

            </tr>

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

            <tr>

                <td
                    colspan="7"
                    class="text-center">

                    Belum ada data penggajian

                </td>

            </tr>

            <?php endif; ?>

            </tbody>

        </table>

    </div>

</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\sistem-gaji-sekolah\resources\views/penggajian/index.blade.php ENDPATH**/ ?>