<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">No</th>
                            <th class="text-center">Tanggal</th>
                            <th class="text-center">Debit</th>
                            <th class="text-center">Kredit</th>
                            <th class="text-center">Keterangan</th>
                            <th class="text-center">Bukti Transaksi</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $a = 1; ?>
                        <?php foreach ($history_transaksi as $Arus_kas) : ?>
                            <tr>
                                <td class="text-center">
                                    <?= $a; ?>
                                </td>
                                <td class="text-left">
                                    <?= date('d', strtotime($Arus_kas->tgl_pembayaran)) . ' ' . $this->mycustom->bulanIndo(date('m', strtotime($Arus_kas->tgl_pembayaran))) . ' ' .  date('Y', strtotime($Arus_kas->tgl_pembayaran))  ?>
                                </td>
                                <td class="text-right">
                                    <?php if ($Arus_kas->status_kas == 'MASUK') : ?>
                                        <?= number_format($Arus_kas->ttl_bayar, 0, ',', '.') ?>,-<br>
                                    <?php endif; ?>
                                </td>
                                <td class="text-right">
                                    <?php if ($Arus_kas->status_kas == 'KELUAR') : ?>
                                        <?= number_format($Arus_kas->ttl_bayar, 0, ',', '.') ?>,-<br>
                                    <?php endif; ?>
                                </td>
                                <td class="text-left">
                                    <?= $Arus_kas->ket_nota ?>
                                </td>
                                <td class="text-center">
                                    <?php if ($Arus_kas->anggota_id > 0) : ?>
                                        <?php if ($Arus_kas->produk_id == 21) : ?>
                                            <a class="btn btn-primary btn-sm" target="_blank" href="<?= base_url('assets/invoice/arisan_heboh/' . date('Y', strtotime($Arus_kas->tgl_pembayaran)) . '/' . date('m', strtotime($Arus_kas->tgl_pembayaran)) . '/' . $Arus_kas->invoice_pdf) ?>" style="color: white;">Download</a>
                                        <?php else : ?>
                                            <a class="btn btn-primary btn-sm" target="_blank" href="<?= base_url('assets/invoice/arisan_motor/' . date('Y', strtotime($Arus_kas->tgl_pembayaran)) . '/' . date('m', strtotime($Arus_kas->tgl_pembayaran)) . '/' . $Arus_kas->invoice_pdf) ?>" style="color: white;">Download</a>
                                        <?php endif; ?>
                                    <?php else : ?>
                                        <a class="btn btn-primary btn-sm" target="_blank" href="<?= base_url('assets/invoice/kas_umum/' . date('Y', strtotime($Arus_kas->tgl_pembayaran)) . '/' . date('m', strtotime($Arus_kas->tgl_pembayaran)) . '/' . $Arus_kas->invoice_pdf) ?>" style="color: white;">Download</a>
                                    <?php endif; ?>
                                </td>
                            </tr>
                            <?php $a++; ?>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>