<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">Verifikasi Laporan
                            <br><?= $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'))) ?>
                        </h4>
                        <h2 class="card-text"><?= number_format($jml_verifikasi) ?> Laporan</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">Kas Masuk <br>
                            <?= $this->mycustom->bulanIndo(date('m', strtotime(date('Y-m-d')))) ?>
                            <?= date('Y', strtotime(date('Y-m-d'))) ?></h4>
                        <h2 class="card-text">
                            <?= number_format($kas_bulanan['Kas_bulanan'], 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">Total Kas <br> Keseluruhan</h4>
                        <h2 class="card-text">
                            <?= number_format($kas_seluruh['Kas_seluruh'], 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">Total Pendapatan <br> Arisan Heboh</h4>
                        <h2 class="card-text">
                            <?= number_format($pendapatan_arisan['pendapatan_arisan'], 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">
                            <p class="d-inline">
                                Laporan Arisan <br>
                                Motor <?= $identitas['ket_arisan'] ?> Ke- <?= $identitas['nm_kelompok'] ?><br>
                                No Registrasi - <?= $identitas['id'] ?>
                            </p>
                        </div>
                    </div>
                    <small class="text-right">Tanggal : <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>
        <!-- Data Laporan -->
        <div class="row layout-spacing">
            <div class="col-lg-12">
                <div class="statbox widget box box-shadow">
                    <div class="widget-content widget-content-area">
                        <?= $this->session->flashdata('pesan_berhasil'); ?>
                        <?= $this->session->flashdata('pesan_gagal'); ?>
                        <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">Pendapatan</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>
                                            Administrasi :
                                            <?= number_format($Data_pemenang->administrasi, 0, ',', '.') ?>,-
                                            <br>
                                            Dana Kehilangan : Rp <a style="text-align: left;">
                                                <?= number_format($Data_pemenang->dn_kehilangan, 0, ',', '.') ?>,-
                                            </a>
                                            <br>
                                            Fee Dealer : Rp <a style="text-align: left;">
                                                <?= number_format($Data_pemenang->fee_dealer, 0, ',', '.') ?>,-
                                            </a> <br>
                                            Total Pendapatan : Rp
                                            <a style="text-align: left;"><?= number_format(($Data_pemenang->administrasi + $Data_pemenang->dn_kehilangan + $Data_pemenang->fee_dealer), 0, ',', '.') ?>,-

                                            </a>
                                        </td>
                                        <td>
                                            Tanggal Undian/Lelang :
                                            <?= 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>
                                            Saldo Pemenang : Rp <a style="text-align: left;">
                                                <?= number_format($identitas['hg_standar'], 0, ',', '.') ?>,-
                                            </a><br>
                                            Lelang Tertinggi : Rp <a style="text-align: left;">
                                                <?= number_format(($identitas['hg_standar'] - $Data_pemenang->saldo_pemenang), 0, ',', '.') ?>,-
                                            </a>
                                            <br>
                                            Diterima Pemenang : Rp
                                            <a style="text-align: left;"><?= number_format($Data_pemenang->saldo_pemenang, 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('manager/laporan_arisan/kelompok_motor/detail_laporan/' . $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>
        <!-- Data Anggota Arisan -->
        <div class="row">
            <div class="col-lg-12">
                <blockquote class="blockquote media-object">
                    <div class="media">
                        <div class="media-body align-self-center">
                            <p class="d-inline">
                                Anggota Arisan <br>
                                Motor <?= $identitas['ket_arisan'] ?> Ke- <?= $identitas['nm_kelompok'] ?><br>
                                No Registrasi - <?= $identitas['id'] ?>
                            </p>
                        </div>
                    </div>
                    <small class="text-right">Tanggal : <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-3" class="table style-3  table-hover">
                            <thead>
                                <tr>
                                    <th class="text-center">Registrasi</th>
                                    <th class="text-center">Alamat</th>
                                    <th class="text-center">Status</th>
                                    <th class="text-center">Aksi</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach ($anggota_arisan as $Anggota_arisan) : ?>
                                    <tr>
                                        <td>
                                            Regist Anggota : <?= $Anggota_arisan->regist_undian ?><br>
                                            Regist Arisan : <?= $Anggota_arisan->regist_arisan ?><br>
                                            KTP : <?= $Anggota_arisan->nik ?><br>
                                            Nama : <?= $Anggota_arisan->nm_anggota ?> </td>
                                        <td class="text-left">
                                            <?= $Anggota_arisan->alamat_lengkap ?><br>
                                            RT. <?= $Anggota_arisan->nm_rt ?> RW. <?= $Anggota_arisan->nm_rw ?><br>
                                            Dk. <?= $Anggota_arisan->nm_desa ?>, Kec.
                                            <?= $Anggota_arisan->nm_kecamatan ?><br>
                                            <?= $Anggota_arisan->kot_kab ?> - <?= $Anggota_arisan->prov ?>
                                        </td>
                                        <td class="text-center">
                                            <?php
                                            if ($Anggota_arisan->status == 'AKTIF') : ?>
                                                <span
                                                    class="shadow-none badge badge-primary"><?= $Anggota_arisan->status ?></span>
                                            <?php elseif ($Anggota_arisan->status == 'MUNDUR') : ?>
                                                <span
                                                    class="shadow-none badge badge-danger"><?= $Anggota_arisan->status ?></span>
                                            <?php else : ?>
                                                <span
                                                    class="shadow-none badge badge-success"><?= $Anggota_arisan->status ?></span>
                                            <?php endif; ?><br>
                                            HP : <?= $Anggota_arisan->no_hp ?>
                                        </td>
                                        <td class="text-center">
                                            <a class="btn btn-primary btn-sm"
                                                href="<?= base_url('manager/identitas/anggota/' . $this->encrypt->encode($Anggota_arisan->anggota_id)) ?>"
                                                style="color: white;">Detail</a>
                                        </td>
                                    </tr>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>