<div class="row layout-spacing">
    <div class="col-lg-12">
        <div class="statbox widget box box-shadow">
            <div class="widget-content widget-content-area">
                <table id="style-3" class="table style-3  table-hover">
                    <thead>
                        <tr>
                            <th class="text-center">Aksi</th>
                            <th class="text-center">Kontrak ID</th>
                            <th class="text-center">anggota_id</th>
                            <th class="text-center">aturan_id</th>
                            <th class="text-center">pokok_pinjaman</th>
                            <th class="text-center">bsr_admin</th>
                            <th class="text-center">bsr_rk</th>
                            <th class="text-center">bsr_pokok</th>
                            <th class="text-center">bsr_simpanan</th>
                            <th class="text-center">bsr_jasa</th>
                            <th class="text-center">bsr_angsuran</th>
                            <th class="text-center">tempo_pinjaman</th>
                            <th class="text-center">ttl_bayar</th>
                            <th class="text-center">jaminan</th>
                            <th class="text-center">status_kontrak</th>
                            <th class="text-center">login_id</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($data_table as $Data_table) : ?>
                        <tr>
                            <td class="text-center">
                                <a href="javascript:void(0);" class="btn btn-primary btn-sm" id="detail_konten"
                                    data-target="#konten_detail" class="bs-tooltip" data-toggle="modal"
                                    data-kontrak_id="<?= $Data_table->id ?>"
                                    data-anggota_id="<?= $Data_table->anggota_id ?>"
                                    data-aturan_id="<?= $Data_table->aturan_id ?>"
                                    data-pokok_pinjaman="<?= $Data_table->pokok_pinjaman ?>"
                                    data-bsr_admin="<?= $Data_table->bsr_admin ?>"
                                    data-bsr_rk="<?= $Data_table->bsr_rk ?>"
                                    data-bsr_pokok="<?= $Data_table->bsr_pokok ?>"
                                    data-bsr_simpanan="<?= $Data_table->bsr_simpanan ?>"
                                    data-bsr_jasa="<?= $Data_table->bsr_jasa ?>"
                                    data-bsr_angsuran="<?= $Data_table->bsr_angsuran ?>"
                                    data-tempo_pinjaman="<?= $Data_table->tempo_pinjaman ?>"
                                    data-ttl_bayar="<?= $Data_table->ttl_bayar ?>"
                                    data-jaminan="<?= $Data_table->jaminan ?>"
                                    data-status_kontrak="<?= $Data_table->status_kontrak ?>"
                                    data-login_id="<?= $Data_table->login_id ?>">Detail</a>
                            </td>
                            <td class="text-left">
                                <?= $Data_table->id; ?>
                            </td>
                            <td class="text-center">
                                <?= $Data_table->anggota_id; ?>
                            </td>
                            <td class="text-left"><?php foreach ($data_aturan as $Data_aturan) : if ($Data_aturan->id == $Data_table->aturan_id) : foreach ($data_produk as $Data_produk) : if ($Data_aturan->produk_id == $Data_produk->id) : echo $Data_produk->nm_produk;
                                                                    endif;
                                                                endforeach;
                                                            endif;
                                                        endforeach; ?>
                            </td>
                            <td class="text-center">
                                <?= $Data_table->pokok_pinjaman; ?>
                            </td>
                            <td class="text-left">
                                <?= $Data_table->bsr_admin; ?>
                            </td>
                            <td class="text-center">
                                <?= $Data_table->bsr_rk; ?>
                            </td>
                            <td class="text-right">
                                <?= $Data_table->bsr_pokok; ?>
                            </td>
                            <td class="text-center">
                                <?= $Data_table->bsr_simpanan; ?>
                            </td>
                            <td class="text-left">
                                <?= $Data_table->bsr_jasa; ?>
                            </td>
                            <td class="text-center">
                                <?= $Data_table->bsr_angsuran; ?>
                            </td>
                            <td class="text-right">
                                <?= $Data_table->tempo_pinjaman; ?>
                            </td>
                            <td class="text-center">
                                <?= $Data_table->ttl_bayar; ?>
                            </td>
                            <td class="text-left">
                                <?= $Data_table->jaminan; ?>
                            </td>
                            <td class="text-center">
                                <?= $Data_table->status_kontrak; ?>
                            </td>
                            <td class="text-right">
                                <?php foreach ($data_petugas as $Data_petugas) : if ($Data_table->login_id == $Data_petugas->id) : echo $Data_petugas->nm_panggilan;
                                        endif;
                                    endforeach; ?>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>