<div class="modal fade" id="tambahDetailGaji" tabindex="-1" role="dialog" aria-labelledby="tambahDetailGajiTitle"
    aria-hidden="true">
    <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="tambahDetailGajiTitle">
                    Tambah Keterangan Gaji
                </h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body" id="detail_body">
                <?php echo form_open_multipart('keuangan/identitas/crud_gaji'); ?>
                <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>"
                    value="<?= $this->security->get_csrf_hash(); ?>" style="display: none">
                <div class="form-group">
                    <label>Keterangan Gaji</label>
                    <input type="text" class="form-control" id="ket_gaji" name="ket_gaji"
                        placeholder="Masukkan keterangan gaji" required>
                    <input type="text" class="form-control" value="<?= $gaji['id'] ?>" id="gaji_id" name="gaji_id"
                        placeholder="Masukkan keterangan gaji" required readonly hidden>
                </div>
                <div class="form-group">
                    <label>Jenis Gaji</label>
                    <select class="form-control" id="jenis_gaji" name="jenis_gaji" onchange="showDiv(this)" required>
                        <option value="TAMBAH">Bonus / Reward</option>
                        <option value="POTONG">Hukuman / Potongan</option>
                        <option value="NETRAL">Beban Perusahaan</option>
                    </select>
                </div>
                <div class="form-group">
                    <label>Nominal</label>
                    <input type="number" class="form-control" id="nominal_transaksi" name="nominal_transaksi"
                        placeholder="Besaran Nominal Detail Gaji" required>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
                    Close
                </button>
                <button type="submit" id="simpanKetGaji" name="simpanKetGaji" class="btn btn-primary">Simpan</button>
            </div>
            <?php echo form_close(); ?>
        </div>
    </div>
</div>
<script>
function showDiv(select) {
    if (select.value == 'PILIH') {
        $("#select_penggunaan_dana").hide();
    }
    if (select.value == 'KELUAR') {
        $("#select_penggunaan_dana").show();
    }
    if (select.value == 'MASUK') {
        $("#select_penggunaan_dana").hide();
    }
}
</script>