<!-- Tambah Anggota Lelang -->
<div class="modal fade" id="data_pinjaman" tabindex="-1" role="dialog" aria-labelledby="data_pinjamanTitle" aria-hidden="true">
    <div class="modal-dialog modal-dialog-scrollable modal-lg modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="data_pinjamanTitle">
                    Data Pinjaman Aktif!
                </h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <?php echo form_open_multipart('kasir/arisan/kelompok_heboh/crud'); ?>
                <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" value="<?= $this->security->get_csrf_hash(); ?>" style="display: none">
                <table id="style-11" class="table style-11  table-hover">
                    <thead>
                        <tr>
                            <th class="text-center">Aksi</th>
                            <th class="text-center">Identitas</th>
                            <th class="text-center">Kontrak</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($pinjaman_aktif as $Data_aktif) : ?>
                            <tr>
                                <td class="text-center">
                                    <a class="btn btn-primary btn-sm"
                                        href="<?= base_url('kasir/koperasi/kontrak_pinjaman/' . $this->encrypt->encode($Data_aktif->kontrak_id)) ?>"
                                        style="color: white;">Detail</a>
                                </td>
                                <td class="text-left">
                                    NIK : <?= $Data_aktif->nik ?><br>
                                    Nama : <?= $Data_aktif->nm_anggota ?><br>
                                    TTL : <?= $Data_aktif->tempat_lahir ?>,
                                    <?= date('d', strtotime($Data_aktif->tgl_lahir)) . ' ' . $this->mycustom->bulanIndo(date('m', strtotime($Data_aktif->tgl_lahir))) . ' ' .  date('Y', strtotime($Data_aktif->tgl_lahir))  ?><br>
                                    No HP : <?= $Data_aktif->nomor_hp_asli ?>
                                </td>
                                <td class="text-left">
                                    Kontrak : <?= $Data_aktif->kontrak_id ?><br>
                                    Pinjaman : Rp <?= number_format($Data_aktif->pokok_pinjaman, 0, ',', '.') ?>,- <br>
                                    Tempo :
                                    <?php if ($Data_aktif->aturan_id == 1) :
                                        echo '12X - Mingguan';
                                    elseif ($Data_aktif->aturan_id == 2) :
                                        echo '8X - Dua Mingguan';
                                    elseif ($Data_aktif->aturan_id == 3) :
                                        echo 'Bulanan Calon Anggota';
                                    elseif ($Data_aktif->aturan_id == 4) :
                                        echo 'Musiman Calon Anggota';
                                    elseif ($Data_aktif->aturan_id == 5) :
                                        echo 'Bulanan Anggota';
                                    else :
                                        echo 'Bulanan Karyawan';
                                    endif ?>
                                    <br>
                                    Angsuran : Rp <?= number_format($Data_aktif->bsr_angsuran, 0, ',', '.') ?>,- <br>
                                </td>
                            </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
                    Close
                </button>
            </div>
            <?php echo form_close(); ?>
        </div>
    </div>
</div>