<div class="modal fade" id="konten_detail" tabindex="-1" role="dialog" aria-labelledby="konten_detailTitle"
    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="konten_detailTitle">
                    Detail Nota
                </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_nota">
                <?php echo form_open_multipart('owner/database/nota/detail_koperasi/crud'); ?>
                <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>"
                    value="<?= $this->security->get_csrf_hash(); ?>" style="display: none">
                <div class="form-group">
                    <label>Kode Nota</label>
                    <input type="number" class="form-control" id="nota_id" name="nota_id"
                        placeholder="Masukkan Nama Desa" required readonly>
                </div>
                <div class="form-group">
                    <label>Kode Angsuran</label>
                    <input type="number" class="form-control" readonly id="angsuran_id" name="angsuran_id"
                        placeholder="Masukkan Qty Pembayaran" required>
                </div>
                <div class="form-group">
                    <label>Total Bayar</label>
                    <input type="number" class="form-control" id="bayar" name="bayar"
                        placeholder="Masukkan Total Pembayaran" required>
                </div>
                <div class="form-group">
                    <label>Status Bayar</label>
                    <select class="form-control" id="status_bayar" name="status_bayar" required>
                        <option value="LANCAR">LANCAR</option>
                        <option value="TUNGGAKAN">TUNGGAKAN</option>
                        <option value="TITIPAN">TITIPAN</option>
                    </select>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
                    Close
                </button>
                <button type="submit" id="deleteDatabaseTerbaru" name="deleteDatabaseTerbaru"
                    class="btn btn-danger">Hapus</button>
                <button type="submit" id="updateDatabaseTerbaru" name="updateDatabaseTerbaru"
                    class="btn btn-warning">Update</button>
            </div>
            <?php echo form_close(); ?>
        </div>
    </div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).on("click", "#detail_konten", function() {
    var nota_id = $(this).data('nota_id');
    var angsuran_id = $(this).data('angsuran_id');
    var bayar = $(this).data('bayar');
    var status_bayar = $(this).data('status_bayar');
    $(".modal-body#detail_body_nota #nota_id").val(nota_id);
    $(".modal-body#detail_body_nota #angsuran_id").val(angsuran_id);
    $(".modal-body#detail_body_nota #bayar").val(bayar);
    $(".modal-body#detail_body_nota #status_bayar").val(status_bayar);
})
</script>