<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/kas/anggaran_dasar/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>Keterangan Transaksi</label>
                    <textarea class="form-control" name="ket_nota" id="ket_nota"
                        placeholder="Keterangan Transaksi Anggaran Dasar Koperasi" required></textarea>
                </div>
                <div class="form-group">
                    <label>Total Transaksi</label>
                    <input type="number" class="form-control" id="ttl_bayar" name="ttl_bayar"
                        placeholder="Besaran Biaya Transaksi" required>
                    <input type="number" class="form-control" id="nota_id" name="nota_id"
                        placeholder="Besaran Biaya Transaksi" required readonly hidden>
                    <input type="text" class="form-control" id="invoice_pdf" name="invoice_pdf"
                        placeholder="Besaran Biaya Transaksi" required readonly hidden>
                </div>
                <div class="form-group">
                    <label>Jenis Transaksi</label>
                    <select class="form-control" id="status_kas" name="status_kas" required>
                        <option value="PILIH">Pilih Jenis Transaksi</option>
                        <option value="MASUK">Transaksi Masuk</option>
                        <option value="KELUAR">Transaksi Keluar</option>
                    </select>
                </div>
                <div class="form-group">
                    <label>Bukti Transaksi</label>
                    <input type="file" class="form-control" id="bukti_transaksi" name="bukti_transaksi">
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
                    Close
                </button>
                <button type="submit" id="deleteKasData" name="deleteKasData" class="btn btn-danger">Hapus</button>
                <button type="submit" id="updateKasData" name="updateKasData" 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 ket_nota = $(this).data('ket_nota');
    var ttl_bayar = $(this).data('ttl_bayar');
    var status_kas = $(this).data('status_kas');
    var invoice_pdf = $(this).data('invoice_pdf');
    $(".modal-body#detail_body_nota #nota_id").val(nota_id);
    $(".modal-body#detail_body_nota #ket_nota").val(ket_nota);
    $(".modal-body#detail_body_nota #ttl_bayar").val(ttl_bayar);
    $(".modal-body#detail_body_nota #status_kas").val(status_kas);
    $(".modal-body#detail_body_nota #invoice_pdf").val(invoice_pdf);
})
</script>