<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="">( <?= $jml_aktif - $blm_bayar ?> ) Anggota Sudah Bayar</h4>
                <table id="style-4" class="table style-4  table-hover">
                    <thead>
                        <tr>
                            <th class="text-center">Undian</th>
                            <th class="text-center">Identitas</th>
                            <th class="text-center">Alamat</th>
                            <th class="text-center">Status Bayar</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($anggota_bayar as $Sudah_bayar) : ?>
                        <tr>
                            <td class="text-left">
                                Regist Undian : <?= $Sudah_bayar->regist_undian ?><br>
                                Kode Nota : <?= $Sudah_bayar->kd_nota ?><br>
                                <div class="btn-group mr-2 sm">
                                    <button class="btn btn-primary btn-sm dropdown-toggle" type="button"
                                        data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                        Invoice <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
                                            viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
                                            stroke-linecap="round" stroke-linejoin="round"
                                            class="feather feather-chevron-down">
                                            <polyline points="6 9 12 15 18 9"></polyline>
                                        </svg>
                                    </button>
                                    <div class="dropdown-menu">
                                        <a href="<?= base_url('assets/invoice/arisan_motor/' . date('Y', strtotime($Sudah_bayar->tgl_pembayaran)) . '/' . date('m', strtotime($Sudah_bayar->tgl_pembayaran)) . '/' . $Sudah_bayar->invoice_pdf) ?>"
                                            class="dropdown-item" target="_blank">Cetak</a>
                                        <a href="javascript:void(0);" class="dropdown-item" id="detail_kirim"
                                            data-target="#kirim_detail" class="bs-tooltip" data-toggle="modal"
                                            data-nota_id="<?= $Sudah_bayar->nota_id ?>"
                                            data-no_hp="<?= $Sudah_bayar->no_hp ?>">Kirim</a>
                                    </div>
                                </div>
                            </td>
                            <td class="text-left">
                                Regist Arisan : <?= $Sudah_bayar->regist_arisan ?><br>
                                NIK : <?= $Sudah_bayar->nik ?><br>
                                Nama : <?= $Sudah_bayar->nm_anggota ?><br>
                                No HP : <?= $Sudah_bayar->no_hp ?>
                            </td>
                            <td class="text-left">
                                <?= $Sudah_bayar->alamat_lengkap ?><br>
                                RT. <?= $Sudah_bayar->nm_rt ?> RW. <?= $Sudah_bayar->nm_rw ?><br>
                                Dk. <?= $Sudah_bayar->nm_desa ?>, Kec.
                                <?= $Sudah_bayar->nm_kecamatan ?><br>
                                <?= $Sudah_bayar->kot_kab ?> - <?= $Sudah_bayar->prov ?>
                            </td>
                            <td class="text-center">
                                <?php
                                    if ($Sudah_bayar->status_nota == 'PROSES') : ?>
                                <span class="shadow-none badge badge-primary">VERIFIKASI</span>
                                <?php elseif ($Sudah_bayar->status_nota == 'TERIMA') : ?>
                                <span class="shadow-none badge badge-success">LUNAS</span>
                                <?php elseif ($Sudah_bayar->status_nota == 'TOLAK') : ?>
                                <span class="shadow-none badge badge-danger">TOLAK</span>
                                <?php endif;
                                    ?>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>