

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

<div class="card shadow">

    <div class="card-header">

        <h3>Edit Penggajian</h3>

    </div>

    <div class="card-body">

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

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

            <div class="row">

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

                    <div class="mb-3">

                        <label>Guru</label>

                        <select
                            name="guru_id"
                            class="form-control">

                            <?php $__currentLoopData = $guru; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $g): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                            <option
                                value="<?php echo e($g->id); ?>"
                                <?php echo e($penggajian->guru_id==$g->id?'selected':''); ?>>

                                <?php echo e($g->nama); ?>


                            </option>

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

                        </select>

                    </div>

                </div>

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

                    <div class="mb-3">

                        <label>Periode</label>

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

                    </div>

                </div>

            </div>

            <hr>

            <h5>Data Otomatis</h5>

            <div class="row">

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

                    <label>Total Jam</label>

                    <input
                        class="form-control"
                        value="<?php echo e($penggajian->total_jam); ?>"
                        readonly>

                </div>

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

                    <label>Tarif/Jam</label>

                    <input
                        class="form-control"
                        value="Rp <?php echo e(number_format($penggajian->tarif)); ?>"
                        readonly>

                </div>

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

                    <label>Gaji Mengajar</label>

                    <input
                        class="form-control"
                        value="Rp <?php echo e(number_format($penggajian->total_jam * $penggajian->tarif)); ?>"
                        readonly>

                </div>

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

                    <label>Potongan Alpha</label>

                    <input
                        class="form-control"
                        value="Rp <?php echo e(number_format($penggajian->potongan)); ?>"
                        readonly>

                </div>

            </div>

            <hr>

            <h5>Data Yang Bisa Diubah</h5>

            <div class="row">

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

                    <label>Insentif Mengajar</label>

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

                </div>

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

                    <label>Gaji Staff</label>

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

                </div>

            </div>

            <br>

            <div class="mb-3">

                <label>Potongan Tambahan</label>

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

                <small class="text-muted">

                    Kasbon, denda atau potongan lainnya.

                </small>

            </div>

            <hr>

            <div class="alert alert-success">

                <h4>

                    Total Gaji Bersih

                    <span class="float-end">

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


                    </span>

                </h4>

            </div>

            <button class="btn btn-primary">

                Simpan Perubahan

            </button>

            <a href="/penggajian"
               class="btn btn-secondary">

                Kembali

            </a>

        </form>

    </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/edit.blade.php ENDPATH**/ ?>