<div id="content" class="main-content">
    <div class="layout-px-spacing">
        <br>
        <?= $this->session->flashdata('pesan_berhasil'); ?>
        <?= $this->session->flashdata('pesan_gagal'); ?>
        <div class="row layout-top-spacing">
            <div class="col-xl-3 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
                <div class="card component-card_7" style="width: auto;">
                    <div class="card-body">
                        <h4 class="card-text">Target Tagihan</h4>
                        <h2 class="card-text"><?= $jml_aktif ?> Anggota</h2>
                    </div>
                </div>
            </div>
            <div class="col-xl-3 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
                <div class="card component-card_7" style="width: auto;">
                    <div class="card-body">
                        <h4 class="card-text">Sudah Bayar</h4>
                        <h2 class="card-text"><?= $jml_aktif - $blm_bayar ?> Anggota</h2>
                    </div>
                </div>
            </div>
            <div class="col-xl-3 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
                <div class="card component-card_7" style="width: auto;">
                    <div class="card-body">
                        <h4 class="card-text">Belum Bayar</h4>
                        <h2 class="card-text"><?= $blm_bayar ?> Anggota</h2>
                    </div>
                </div>
            </div>
            <div class="col-xl-3 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
                <div class="card component-card_7" style="width: auto;">
                    <div class="card-body">
                        <h4 class="card-text">Dana Masuk</h4>
                        <h2 class="card-text">
                            <?= number_format((($jml_aktif - $blm_bayar) * $data_arisan['tagihan_iuran']), 0, ',', '.') ?>,-
                        </h2>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <blockquote class="blockquote media-object">
                    <div class="media">
                        <div class="media-body align-self-center">
                            <a style="float: right;" class="btn btn-primary btn-sm" href="javascript:void(0);"
                                data-toggle="modal" data-target="#laporan_detail" style="color: white;">Laporan</a>
                            <p class="d-inline">
                                <?php if ($data_arisan['produk_id'] == 21) : ?>
                                Kelompok Arisan Heboh Ke-<?= $data_arisan['nm_kelompok'] ?><br>
                                Undian Ke <?= $jadwal_arisan['undian_ke'] ?> -
                                <?php else : ?>
                                Kelompok Arisan <?= $data_arisan['ket_arisan'] ?> ke-<?= $data_arisan['nm_kelompok'] ?>
                                Undian Ke <?= $jadwal_arisan['undian_ke'] ?> - <?= $jadwal_arisan['status_undian'] ?> -
                                <?php endif; ?>
                                <span class="badge badge-primary"> Proses Undian </span><br>
                                Sudah Bayar : ( <?= $jml_aktif - $blm_bayar ?> ) Anggota <br>
                                Belum Bayar : ( <?= $blm_bayar ?> ) Anggota
                            </p>
                        </div>
                    </div>
                    <small class="text-right">Undian : <cite
                            title="Source Title"><?= $this->mycustom->hariIndo(date('l', strtotime($jadwal_arisan['tgl_undian']))) ?>,
                            <?= $this->mycustom->bulanIndo(date('m', strtotime($jadwal_arisan['tgl_undian'])))  ?>
                            <?= date('Y', strtotime($jadwal_arisan['tgl_undian']))  ?></cite></small>
                </blockquote>
            </div>
        </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 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">No HP</th>
                                    <th class="text-center">Alamat</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach ($anggota_bayar as $Sudah_bayar) : ?>
                                <tr>
                                    <td class="text-center">
                                        <?= $Sudah_bayar->no_urut ?>
                                    </td>
                                    <td class="text-left">
                                        No Regist : <?= $Sudah_bayar->regist_undian ?><br>
                                        NIK : <?= $Sudah_bayar->nik ?><br>
                                        Nama : <?= $Sudah_bayar->nm_anggota ?>
                                    </td>
                                    <td class="text-center">
                                        <?= $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>
                                </tr>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $this->load->view('arisan/aktifitas/undian/modal'); ?>