<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Laporan Arus Kas Produk Arisan <?= $bulan . '/' . $tahun ?></title>
    <style>
    hr {
        display: block;
        margin-top: 0.1em;
        margin-bottom: 0.5em;
        margin-left: auto;
        margin-right: auto;
        border-style: double;
        border-width: 2px;
    }

    table,
    th,
    td {
        padding: 8px 10px;
    }
    </style>
    <style>
    .sidebar.toggled .nav-item .collapse {
        position: relative;
        padding-left: 1rem;
        left: 0;
        z-index: 1;
        top: 0;
    }

    .sidebar.toggled {
        width: 60vw !important;
        transition: all .3s ease-in-out;
        -webkit-transition: all .3s ease-in-out;
    }
    </style>
    <style>
    .responsive img {
        max-width: 50%;
        align-content: center;
        /*width:100%;*/
        height: auto;
    }
    </style>
</head>

<body>
    <div class="row">
        <div class="col-lg-12 grid-margin stretch-card">
            <div class="card">
                <div class="row">
                    <div class="col-lg-10 offset-lg-1">
                        <div class="card-body">
                            <div class="row">
                                <table>
                                    <tr>
                                        <th><img src="<?= base_url('assets/') ?>img/arisan3.png" width="50%"
                                                alt="avatar">
                                        </th>
                                        <th>
                                            <a style="font-size: 12px;">LAPORAN ARUS KAS PRODUK ARISAN</a><br>
                                            <a style="font-size: 24px;">KSP BINA ARTHA PRIMA</a><br>
                                            <a style="font-size: 12px;">Jl. Raya Pati - Kudus No.39, Area Sawah, Ds.
                                                Klaling, Kec. Jekulo, Kab. Kudus - Jawa Tengah</a><br>
                                            <a style="font-size: 12px;">Kode Pos : 59382 || Telepon : 0895411547434 ||
                                                email : binaarthaprima@gmail.com || website : kspbinaartha.com
                                            </a><br>
                                        </th>
                                    </tr>
                                </table>
                            </div>
                            <hr class="mb-4">
                            <table>
                                <tr>
                                    <th style="font-weight: normal; text-align: left;">
                                        <a>Laporan</a><br>
                                        <a>Tanggal</a><br>
                                        <a>Saldo Iuran</a><br>
                                        <a>Saldo Operasional</a><br>
                                        <a>Saldo Omset</a>
                                    </th>
                                    <th style="font-weight: normal; text-align: center;">
                                        <a>:</a><br>
                                        <a>:</a><br>
                                        <a>:</a><br>
                                        <a>:</a><br>
                                        <a>:</a>
                                    </th>
                                    <th style="font-weight: normal; text-align: left;">
                                        <a><?= $bulan . '/' . $tahun ?></a><br>
                                        <a><?= $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')))  ?></a><br>
                                        <a>
                                            <?php if ($masuk_bulanan['masuk_bulanan'] > 0) : ?>
                                            <?= number_format(($masuk_bulanan['masuk_bulanan']), 0, ',', '.') ?>,-
                                            <?php else : ?>
                                            <?= number_format((0), 0, ',', '.') ?>,-
                                            <?php endif; ?>
                                        </a><br>
                                        <a>
                                            <?php if ($keluar_bulanan['keluar_bulanan'] > 0) : ?>
                                            <?= number_format(($keluar_bulanan['keluar_bulanan']), 0, ',', '.') ?>,-
                                            <?php else : ?>
                                            <?= number_format((0), 0, ',', '.') ?>,-
                                            <?php endif; ?>
                                        </a><br>
                                        <a>
                                            <?php if ($omset_bulanan['omset_bulanan'] > 0) : ?>
                                            <?= number_format(($omset_bulanan['omset_bulanan']), 0, ',', '.') ?>,-
                                            <?php else : ?>
                                            <?= number_format((0), 0, ',', '.') ?>,-
                                            <?php endif; ?>
                                        </a>
                                    </th>
                                </tr>
                            </table>
                            <hr class="mb-4">
                            <center>
                                <a style="font-size: 20px; font-weight: bold;">LAPORAN ARUS KAS PRODUK ARISAN</a><br>
                                <a style="font-size: 20px; font-weight: bold;"><?= $bulan . '/' . $tahun ?></a>
                            </center>
                            <center>
                                <table style="width: -webkit-fill-available;">
                                    <tr>
                                        <th class="text-center">Tanggal</th>
                                        <th class="text-center">Debit</th>
                                        <th class="text-center">Kredit</th>
                                        <th class="text-center">Keterangan</th>
                                    </tr>
                                    <?php foreach ($history_transaksi as $Arus_kas) : ?>
                                    <tr>
                                        <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; ?>
                                            <?php if ($Arus_kas->status_kas == 'OMSET') : ?>
                                            <?= 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; ?>
                                            <?php if ($Arus_kas->status_kas == 'OPERASIONAL') : ?>
                                            <?= number_format($Arus_kas->ttl_bayar, 0, ',', '.') ?>,-<br>
                                            <?php endif; ?>
                                        </td>
                                        <td class="text-left">
                                            <?= $Arus_kas->ket_nota ?>
                                        </td>
                                    </tr>
                                    <?php endforeach; ?>
                                </table><br>
                            </center>
                            <center>
                                <table>
                                    <tr>
                                        <th style="font-weight: normal; text-align: left;">
                                            <a></a><br>
                                            <a>Kudus, <?= date('d', strtotime(date('Y-m-d')))  ?>
                                                <?= $this->mycustom->bulanIndo(date('m', strtotime(date('Y-m-d'))))  ?>
                                                <?= date('Y', strtotime(date('Y-m-d')))  ?></a><br>
                                            <a></a><br>
                                            <a></a>
                                        </th>
                                    </tr>
                                    <tr>
                                        <td style="text-align: center;">Petugas Arisan,</td>
                                        <td></td>
                                        <td style="text-align: center;">Bagian Keuangan,</td>
                                        <td></td>
                                        <td style="text-align: center;">Manager,</td>
                                        <td></td>
                                        <td style="text-align: center;">Owner</td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: center;">( Arif Wibowo )</td>
                                        <td></td>
                                        <td style="text-align: center;">( David Dwi Saputra )</td>
                                        <td></td>
                                        <td style="text-align: center;">( Arief Rahman )</td>
                                        <td></td>
                                        <td style="text-align: center;">( Owner dan Founder )</td>
                                    </tr>
                                </table>
                            </center>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script language=javascript>
function printWindow() {
    bV = parseInt(navigator.appVersion);
    if (bV >= 4) window.print();
}
printWindow();
</script>

</html>