<div id="content" class="main-content">
    <div class="layout-px-spacing">
        <?= $this->session->flashdata('pesan_berhasil'); ?>
        <?= $this->session->flashdata('pesan_gagal'); ?>
        <div class="row layout-top-spacing">
            <?php $this->load->view('arisan/beranda/dr_arisanheboh'); ?>
            <?php $this->load->view('arisan/beranda/dr_arisanmotor'); ?>
        </div>
        <div class="row layout-spacing">
            <div class="col-lg-12">
                <div class="statbox widget box box-shadow">
                    <div class="widget-content widget-content-area">
                        <h4 class="">( <?= $anggota_nunggak ?> ) Tunggakan Anggota</h4>
                        <table id="style-3" class="table style-3  table-hover">
                            <thead>
                                <tr>
                                    <th class="text-center">Aksi</th>
                                    <th class="text-center">Identitas</th>
                                    <th class="text-center">Kelompok</th>
                                    <th class="text-center">Tagihan</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $no = 1; ?>
                                <?php foreach ($tunggakan as $Tunggakan) : ?>
                                    <tr>
                                        <td class="text-center">
                                            <a class="btn btn-primary btn-sm" href="<?= base_url('arisan/aktifitas/tagihan_nuggak/undian/' . $this->encrypt->encode($Tunggakan->regist_undian . $Tunggakan->jadwal_id)) ?>" style="color: white;">Bayar</a>
                                        </td>
                                        <td class="text-left">
                                            No Undian : <?= $Tunggakan->regist_undian ?><br>
                                            NIK : <?= $Tunggakan->nik ?><br>
                                            Nama Anggota : <?= $Tunggakan->nm_anggota ?><br>
                                            Nomor HP : <?= $Tunggakan->no_hp ?>
                                        </td>
                                        <td class="text-left">
                                            <?php if ($Tunggakan->produk_id == 21) : ?>
                                                Arisan Heboh <br>
                                                Kelompok <?= $Tunggakan->nm_kelompok ?><br>
                                                Undian Ke - <?= $Tunggakan->undian_ke ?><br>
                                                <?= $this->mycustom->bulanIndo(date('m', strtotime($Tunggakan->tgl_tenanan))) . ' ' .  date('Y', strtotime($Tunggakan->tgl_tenanan))  ?><br>
                                            <?php else : ?>
                                                Arisan Motor <?= $Tunggakan->ket_arisan ?> <br>
                                                Kelompok <?= $Tunggakan->nm_kelompok ?><br>
                                                Arisan Ke- <?= $Tunggakan->undian_ke ?> / Lelang Ke - <?= $Tunggakan->lelang_ke ?><br>
                                                <?= $this->mycustom->bulanIndo(date('m', strtotime($Tunggakan->tgl_tenanan))) . ' ' .  date('Y', strtotime($Tunggakan->tgl_tenanan))  ?><br>
                                            <?php endif; ?>
                                        </td>
                                        <td class="text-right">
                                            <?= number_format($Tunggakan->tagihan_iuran, 0, ',', '.') ?>,-
                                        </td>
                                    </tr>
                                    <?php $no++; ?>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $this->load->view('arisan/beranda/daftar_heboh'); ?>
<?php $this->load->view('arisan/beranda/daftar_motor'); ?>
<?php $this->load->view('arisan/beranda/anggota_arisan'); ?>
<?php $this->load->view('arisan/beranda/anggota_motor'); ?>
<?php $this->load->view('arisan/beranda/bayar_heboh'); ?>
<?php $this->load->view('arisan/beranda/bayar_motor'); ?>