<div id="content" class="main-content">
    <div class="layout-px-spacing">
        <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">Kas Kelompok</h4>
                        <h2 class="card-text"><?= number_format($ttl_kaskelompok['saldo_akhir'], 0, ',', '.') ?>,-</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">Pemenang</h4>
                        <h2 class="card-text"><?= $ttl_pemenang ?> 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">Mundur</h4>
                        <h2 class="card-text"><?= $ttl_mundur ?> 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">Pendapatan</h4>
                        <h2 class="card-text">
                            <?= number_format(($ttl_pendapatan['admin']), 0, ',', '.') ?>,-
                        </h2>
                    </div>
                </div>
            </div>
        </div>
        <div class="row layout-spacing">
            <div class="col-lg-12">
                <blockquote class="blockquote media-object">
                    <div class="media">
                        <div class="media-body align-self-center">
                            <p class="d-inline">
                                Laporan <br>
                                Arisan Heboh Kelompok <?= $data_arisan['nm_kelompok'] ?><br>
                                Registrasi Arisan - <?= $data_arisan['id'] ?>
                            </p>
                        </div>
                    </div>
                    <small class="text-left"><cite title="Source Title"><?= $this->mycustom->hariIndo(date('l', strtotime(date('Y-m-d')))) ?>,
                            <?= date('d', strtotime(date('Y-m-d')))  ?>
                            <?= $this->mycustom->bulanIndo(date('m', strtotime(date('Y-m-d'))))  ?>
                            <?= date('Y', strtotime(date('Y-m-d')))  ?></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">
                        <table id="style-4" class="table style-4  table-hover">
                            <thead>
                                <tr>
                                    <th class="text-center">No</th>
                                    <th class="text-center">No Laporan</th>
                                    <th class="text-center">Registrasi</th>
                                    <th class="text-center">Ringkasan</th>
                                    <th class="text-center">Saldo</th>
                                    <th class="text-center">Aksi</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $no = 1; ?>
                                <?php foreach ($data_pemenang as $Data_pemenang) : ?>
                                    <tr>
                                        <td>
                                            <center><?= $no ?></center>
                                        </td>
                                        <td>
                                            Nomor : <?= $Data_pemenang->kd_laporan ?><br>
                                            Tanggal :
                                            <?= date('d', strtotime($Data_pemenang->tgl_laporan)) . ' ' . $this->mycustom->bulanIndo(date('m', strtotime($Data_pemenang->tgl_laporan))) . ' ' . date('Y', strtotime($Data_pemenang->tgl_laporan)) ?><br>
                                            Status : <?php if ($Data_pemenang->status_laporan == 'MANAGER') : ?>
                                                <span class="badge badge-primary">Verifikasi Manager</span>
                                            <?php elseif ($Data_pemenang->status_laporan == 'OWNER') : ?>
                                                <span class="badge badge-info">Verifikasi Owner</span>
                                            <?php elseif ($Data_pemenang->status_laporan == 'KEUANGAN') : ?>
                                                <span class="badge badge-secondary">Verifikasi Keuangan</span>
                                            <?php elseif ($Data_pemenang->status_laporan == 'VERIFIED') : ?>
                                                <span class="badge badge-success">Verified</span>
                                            <?php endif; ?>
                                        </td>
                                        <td>
                                            No Undian :
                                            <?= $Data_pemenang->regist_undian ?>/<?= $Data_pemenang->no_urut ?><br>
                                            Nama : <?= substr_replace($Data_pemenang->nm_anggota, '', 15); ?><br>
                                            KTP : <?= $Data_pemenang->nik ?><br>
                                            No Regist : <?= $Data_pemenang->regist_arisan ?><br>
                                        </td>
                                        <td>
                                            Tanggal Undian :
                                            <?= date('d', strtotime($Data_pemenang->tgl_undian)) . ' ' . $this->mycustom->bulanIndo(date('m', strtotime($Data_pemenang->tgl_undian))) . ' ' . date('Y', strtotime($Data_pemenang->tgl_undian)) ?>
                                            <br>
                                            Hadiah : Rp <a style="text-align: left;">
                                                <?= number_format($Data_pemenang->saldo_pemenang, 0, ',', '.') ?>,-
                                            </a>
                                            <br>
                                            Fee Admin : Rp <a style="text-align: left;">
                                                <?= number_format($Data_pemenang->administrasi, 0, ',', '.') ?>,-
                                            </a> <br>
                                            Diterima : Rp
                                            <a style="text-align: left;"><?= number_format($Data_pemenang->saldo_pemenang - $Data_pemenang->administrasi, 0, ',', '.') ?>,-

                                            </a>
                                        </td>
                                        <td>
                                            Saldo Bulan Lalu : Rp <a style="text-align: left;"><?= number_format($Data_pemenang->saldo_awal, 0, ',', '.') ?>,-</a><br>
                                            Saldo Masuk : Rp <a style="text-align: left;"><?= number_format($Data_pemenang->saldo_masuk, 0, ',', '.') ?>,-</a><br>
                                            Saldo Keluar : Rp <a style="text-align: left;"><?= number_format($Data_pemenang->saldo_pemenang, 0, ',', '.') ?>,-</a><br>
                                            Saldo AKhir : Rp <a style="text-align: left;"><?= number_format($Data_pemenang->saldo_akhir, 0, ',', '.') ?>,-</a>
                                        </td>
                                        <td class="text-center">
                                            <a href="<?= base_url('arisan/laporan/laporan_heboh/lap_detail/' . $this->encrypt->encode($Data_pemenang->kd_laporan)) ?>" class="btn btn-primary btn-sm">Detail</a>
                                        </td>
                                    </tr>
                                    <?php $no++; ?>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>