<!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 Operasional Koperasi <?= $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;
        }

        * {
            box-sizing: border-box;
        }

        .column {
            float: left;
            width: 50%;
            padding: 10px;
        }

        .row::after {
            content: "";
            clear: both;
            display: table;
        }

        @media print {
            .pagebreak {
                clear: both;
                page-break-after: always;
            }
        }
    </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">
                            <!-- Identitas Koperasi -->
                            <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 REALISASI & STORTING</a><br>
                                            <a style="font-size: 24px;">KSP BINA ARTHA PRIMA</a><br>
                                            <a style="font-size: 12px;"><?= $option['alamat_koperasi'] ?></a><br>
                                            <a style="font-size: 12px;">Kode Pos : <?= $option['kd_pos'] ?> || Telepon :
                                                <?= $option['cs_koperasi'] ?> ||
                                                email : <?= $option['email_koperasi'] ?> || website :
                                                <?= $option['web_koperasi'] ?>
                                            </a><br>
                                        </th>
                                    </tr>
                                </table>
                            </div>
                            <hr class="mb-4">
                            <!-- Identitas Marketing dan Waktu -->
                            <div class="row">
                                <div class="column">
                                    <table>
                                        <tr>
                                            <th colspan="3" style="font-size: 14px; font-weight: bold;">STORTING
                                                PINJAMAN MARKETING
                                            </th>
                                        </tr>
                                        <tr>
                                            <td>Nama</td>
                                            <td> : </td>
                                            <td><?= $data_marketing['nm_panggilan'] ?></td>
                                        </tr>
                                        <tr>
                                            <td>Tanggal</td>
                                            <td> : </td>
                                            <td><?= date('d', strtotime($tanggal))  ?>
                                                <?= $this->mycustom->bulanIndo(date('m', strtotime($tanggal)))  ?>
                                                <?= date('Y', strtotime($tanggal))  ?></td>
                                        </tr>
                                        <tr>
                                            <td>Hari</td>
                                            <td> : </td>
                                            <td><?= $this->mycustom->hariIndo(date('l', strtotime($tanggal)))  ?></td>
                                        </tr>
                                    </table>
                                </div>
                                <div class="column">
                                    <table>
                                        <tr>
                                            <th colspan="3" style="font-size: 14px; font-weight: bold;">REALISASI
                                                PINJAMAN MARKETING
                                            </th>
                                        </tr>
                                        <tr>
                                            <td>Nama</td>
                                            <td> : </td>
                                            <td><?= $data_marketing['nm_panggilan'] ?></td>
                                        </tr>
                                        <tr>
                                            <td>Tanggal</td>
                                            <td> : </td>
                                            <td><?= date('d', strtotime($tanggal))  ?>
                                                <?= $this->mycustom->bulanIndo(date('m', strtotime($tanggal)))  ?>
                                                <?= date('Y', strtotime($tanggal))  ?></td>
                                        </tr>
                                        <tr>
                                            <td>Hari</td>
                                            <td> : </td>
                                            <td><?= $this->mycustom->hariIndo(date('l', strtotime($tanggal)))  ?></td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <!-- Data Storting & Realisasi -->
                            <div class="row">
                                <!-- Data Storting -->
                                <div class="column">
                                    <table style="border: 1px solid black; border-collapse: collapse; width: 100%">
                                        <thead>
                                            <tr style="border: 1px solid black; border-collapse: collapse;">
                                                <th rowspan="2"
                                                    style="border: 1px solid black; border-collapse: collapse;">
                                                    <center>No </center>
                                                </th>
                                                <th rowspan="2"
                                                    style="border: 1px solid black; border-collapse: collapse;">
                                                    <center>Identitas </center>
                                                </th>
                                                <th rowspan="2"
                                                    style="border: 1px solid black; border-collapse: collapse;">
                                                    <center>Metode</center>
                                                </th>
                                                <td colspan="2"
                                                    style="border: 1px solid black; border-collapse: collapse;">
                                                    <center>Storting Via</center>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="border: 1px solid black; border-collapse: collapse;">
                                                    <center>Kantor</center>
                                                </td>
                                                <td style="border: 1px solid black; border-collapse: collapse;">
                                                    <center>Marketing</center>
                                                </td>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php if ($storting != null) : ?>
                                                <?php $no = 1; ?>
                                                <?php foreach ($storting as $Storting) : ?>
                                                    <tr style="border: 1px solid black; border-collapse: collapse;">
                                                        <td
                                                            style="border: 1px solid black; border-collapse: collapse; font-size: 11px; text-align: center;">
                                                            <center><?= $no ?></center>
                                                        </td>
                                                        <td
                                                            style="border: 1px solid black; border-collapse: collapse; font-size: 11px; text-align: left;">
                                                            <?= $Storting->nm_anggota ?><br>
                                                            <?= $Storting->kontrak_id ?> / Ke-
                                                            <?= $Storting->angs_ke ?>
                                                        </td>
                                                        <td
                                                            style="border: 1px solid black; border-collapse: collapse; font-size: 11px; text-align: center;">
                                                            <?php if ($Storting->metode_bayar == 'TUNAI') : ?>
                                                                <center>TUNAI</center>
                                                            <?php else : ?>
                                                                <center>TRANSFER</center>
                                                            <?php endif; ?>
                                                        </td>
                                                        <td
                                                            style="border: 1px solid black; border-collapse: collapse; text-align: right; font-size: 11px;">
                                                            <?php if ($Storting->petugas != $Storting->kasir) : ?>
                                                                <?= number_format($Storting->bsr_bayar, 0, ',', '.') ?>,-<br>
                                                            <?php endif; ?>
                                                        </td>
                                                        <td
                                                            style="border: 1px solid black; border-collapse: collapse; text-align: right; font-size: 11px;">
                                                            <?php if ($Storting->petugas == $Storting->kasir) : ?>
                                                                <?= number_format($Storting->bsr_bayar, 0, ',', '.') ?>,-<br>
                                                            <?php endif; ?>
                                                        </td>
                                                    </tr>
                                                    <?php $no++; ?>
                                                <?php endforeach; ?>
                                            <?php else : ?>
                                                <tr
                                                    style="border: 1px solid black; border-collapse: collapse; font-size: 11px;">
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                </tr>
                                                <tr
                                                    style="border: 1px solid black; border-collapse: collapse; font-size: 11px;">
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                </tr>
                                                <tr
                                                    style="border: 1px solid black; border-collapse: collapse; font-size: 11px;">
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                </tr>
                                                <tr
                                                    style="border: 1px solid black; border-collapse: collapse; font-size: 11px;">
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                </tr>
                                            <?php endif; ?>
                                        </tbody>
                                        <tfoot>
                                            <tr style="border: 1px solid black; border-collapse: collapse;">
                                                <td colspan="3"
                                                    style="border: 1px solid black; border-collapse: collapse; font-size: 12px;">
                                                    <center>Jumlah</center>
                                                </td>
                                                <td colspan="2"
                                                    style="border: 1px solid black; border-collapse: collapse; text-align: right; font-size: 12px;">
                                                    <?php if ($jml_storting['jml_storting'] > 0) : ?>
                                                        <?= number_format($jml_storting['jml_storting'], 0, ',', '.') ?>,-<br>
                                                    <?php else :
                                                        echo '0,-'; ?>
                                                    <?php endif; ?>
                                                </td>
                                            </tr>
                                        </tfoot>
                                    </table>
                                </div>
                                <!-- Data Realisasi -->
                                <div class="column">
                                    <table style="border: 1px solid black; border-collapse: collapse; width: 100%">
                                        <thead>
                                            <tr style="border: 1px solid black; border-collapse: collapse;">
                                                <th rowspan="2"
                                                    style="border: 1px solid black; border-collapse: collapse;">
                                                    <center>No </center>
                                                </th>
                                                <th rowspan="2"
                                                    style="border: 1px solid black; border-collapse: collapse;">
                                                    <center>Identitas </center>
                                                </th>
                                                <th rowspan="2"
                                                    style="border: 1px solid black; border-collapse: collapse;">
                                                    <center>Alamat</center>
                                                </th>
                                                <td colspan="2"
                                                    style="border: 1px solid black; border-collapse: collapse;">
                                                    <center>Pinjaman</center>
                                                </td>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php if ($realisasi != null) : ?>
                                                <?php $no = 1; ?>
                                                <?php foreach ($realisasi as $Realisasi) : ?>
                                                    <tr style="border: 1px solid black; border-collapse: collapse;">
                                                        <td
                                                            style="border: 1px solid black; border-collapse: collapse; font-size: 11px; text-align: center;">
                                                            <center><?= $no ?></center>
                                                        </td>
                                                        <td
                                                            style="border: 1px solid black; border-collapse: collapse; font-size: 11px; text-align: left;">
                                                            Nama : <?= $Realisasi->nm_anggota ?><br>
                                                            NIK : <?= $Realisasi->nik ?><br>
                                                            Kontrak : <?= $Realisasi->kontrak_id ?><br>
                                                        </td>
                                                        <td
                                                            style="border: 1px solid black; border-collapse: collapse; font-size: 11px; text-align: left;">
                                                            <?= $Realisasi->alamat_lengkap ?>,<br>
                                                            RT. <?= $Realisasi->nm_rt ?> / RW. <?= $Realisasi->nm_rw ?>, DESA
                                                            <?= $Realisasi->nm_desa ?>,<br>
                                                            KECAMATAN <?= $Realisasi->nm_kecamatan ?>,
                                                            <?= $Realisasi->kot_kab ?> - <?= $Realisasi->prov ?>
                                                        </td>
                                                        <td
                                                            style="border: 1px solid black; border-collapse: collapse; text-align: right; font-size: 11px;">
                                                            <?= number_format($Realisasi->pokok_pinjaman, 0, ',', '.') ?>,-<br>
                                                        </td>
                                                    </tr>
                                                    <?php $no++; ?>
                                                <?php endforeach; ?>
                                            <?php else : ?>
                                                <tr style="border: 1px solid black; border-collapse: collapse;">
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                </tr>
                                                <tr style="border: 1px solid black; border-collapse: collapse;">
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                </tr>
                                                <tr style="border: 1px solid black; border-collapse: collapse;">
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                </tr>
                                                <tr style="border: 1px solid black; border-collapse: collapse;">
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                    <td
                                                        style="border: 1px solid black; border-collapse: collapse; text-align: center; font-size: 11px;">
                                                        -</td>
                                                </tr>
                                            <?php endif; ?>
                                        </tbody>
                                        <tfoot>
                                            <tr style="border: 1px solid black; border-collapse: collapse;">
                                                <td colspan="2"
                                                    style="border: 1px solid black; border-collapse: collapse;">
                                                    <center>Jumlah</center>
                                                </td>
                                                <td colspan="2"
                                                    style="border: 1px solid black; border-collapse: collapse; text-align: right;">
                                                    <?php if ($jml_realisasi['jml_realisasi'] > 0) : ?>
                                                        <?= number_format($jml_realisasi['jml_realisasi'], 0, ',', '.') ?>,-<br>
                                                    <?php else :
                                                        echo '0,-'; ?>
                                                    <?php endif; ?>
                                                </td>
                                            </tr>
                                        </tfoot>
                                    </table>
                                </div>
                            </div>
                            <!-- Kesimpulan -->
                            <div class="row">
                                <div class="column">
                                    <table>
                                        <tr>
                                            <td>Total Storting</td>
                                            <td> : </td>
                                            <td> Rp </td>
                                            <td style="text-align: right;">
                                                <?php if ($jml_storting['jml_storting'] > 0) : ?>
                                                    <?= number_format($jml_storting['jml_storting'], 0, ',', '.') ?>,-<br>
                                                <?php else :
                                                    echo '0,-'; ?>
                                                <?php endif; ?></td>
                                        </tr>
                                        <tr>
                                            <td>Total Pokok</td>
                                            <td> : </td>
                                            <td> Rp </td>
                                            <td style="text-align: right;">
                                                <?php if ($jml_pokok['jml_pokok'] > 0) : ?>
                                                    <?= number_format($jml_pokok['jml_pokok'], 0, ',', '.') ?>,-<br>
                                                <?php else :
                                                    echo '0,-'; ?>
                                                <?php endif; ?></td>
                                        </tr>
                                        <tr>
                                            <td>Total Jasa</td>
                                            <td> : </td>
                                            <td> Rp </td>
                                            <td style="text-align: right;">
                                                <?php if ($jml_jasa['jml_jasa'] > 0) : ?>
                                                    <?= number_format($jml_jasa['jml_jasa'], 0, ',', '.') ?>,-<br>
                                                <?php else :
                                                    echo '0,-'; ?>
                                                <?php endif; ?></td>
                                        </tr>
                                        <tr>
                                            <td>Total Simpanan</td>
                                            <td> : </td>
                                            <td> Rp </td>
                                            <td style="text-align: right;">
                                                <?php if ($jml_simpanan['jml_simpanan'] > 0) : ?>
                                                    <?= number_format($jml_simpanan['jml_simpanan'], 0, ',', '.') ?>,-<br>
                                                <?php else :
                                                    echo '0,-'; ?>
                                                <?php endif; ?></td>
                                        </tr>
                                    </table>
                                </div>
                                <div class="column">
                                    <table>
                                        <tr>
                                            <td>Total Realisasi</td>
                                            <td> : </td>
                                            <td> Rp </td>
                                            <td style="text-align: right;">
                                                <?php if ($jml_realisasi['jml_realisasi'] > 0) : ?>
                                                    <?= number_format($jml_realisasi['jml_realisasi'], 0, ',', '.') ?>,-<br>
                                                <?php else :
                                                    echo '0,-'; ?>
                                                <?php endif; ?></td>
                                        </tr>
                                        <tr>
                                            <td>Administrasi ( 3% )</td>
                                            <td> : </td>
                                            <td> Rp </td>
                                            <td style="text-align: right;"><?php if ($jml_admin['jml_admin'] > 0) : ?>
                                                    <?= number_format($jml_admin['jml_admin'], 0, ',', '.') ?>,-<br>
                                                <?php else :
                                                                                echo '0,-'; ?>
                                                <?php endif; ?></td>
                                        </tr>
                                        <tr>
                                            <td>Risiko Kredit ( 2% )</td>
                                            <td> : </td>
                                            <td> Rp </td>
                                            <td style="text-align: right;"><?php if ($jml_rk['jml_rk'] > 0) : ?>
                                                    <?= number_format($jml_rk['jml_rk'], 0, ',', '.') ?>,-<br>
                                                <?php else :
                                                                                echo '0,-'; ?>
                                                <?php endif; ?></td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <div class="pagebreak"> </div>
                            <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 REALISASI & STORTING</a><br>
                                            <a style="font-size: 24px;">KSP BINA ARTHA PRIMA</a><br>
                                            <a style="font-size: 12px;"><?= $option['alamat_koperasi'] ?></a><br>
                                            <a style="font-size: 12px;">Kode Pos : <?= $option['kd_pos'] ?> || Telepon :
                                                <?= $option['cs_koperasi'] ?> ||
                                                email : <?= $option['email_koperasi'] ?> || website :
                                                <?= $option['web_koperasi'] ?>
                                            </a><br>
                                        </th>
                                    </tr>
                                </table>
                            </div>
                            <hr class="mb-4">
                            <center>
                                <a style="font-size: 20px; font-weight: bold;">DAFTAR KERJA TAGIHAN MARKETING</a><br>
                                <a style="font-size: 20px; font-weight: bold;"><?= $this->mycustom->hariIndo(date('l', strtotime($tanggal)))  ?>,
                                    <?= date('d', strtotime($tanggal))  ?>
                                    <?= $this->mycustom->bulanIndo(date('m', strtotime($tanggal)))  ?>
                                    <?= date('Y', strtotime($tanggal))  ?></a>
                            </center>
                            <table style="border: 1px solid black; border-collapse: collapse; width: 100%">
                                <thead>
                                    <tr style="border: 1px solid black; border-collapse: collapse;">
                                        <th rowspan="2" style="border: 1px solid black; border-collapse: collapse;">
                                            <center>No </center>
                                        </th>
                                        <th rowspan="2" style="border: 1px solid black; border-collapse: collapse;">
                                            <center>Identitas </center>
                                        </th>
                                        <th rowspan="2" style="border: 1px solid black; border-collapse: collapse;">
                                            <center>Metode</center>
                                        </th>
                                        <td colspan="2" style="border: 1px solid black; border-collapse: collapse;">
                                            <center>Storting Via</center>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="border: 1px solid black; border-collapse: collapse;">
                                            <center>Kantor</center>
                                        </td>
                                        <td style="border: 1px solid black; border-collapse: collapse;">
                                            <center>Marketing</center>
                                        </td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php if ($target_storting != null) : ?>
                                        <?php $no = 1; ?>
                                        <?php foreach ($target_storting as $Target_storting) : ?>
                                            <tr style="border: 1px solid black; border-collapse: collapse;">
                                                <td style="border: 1px solid black; border-collapse: collapse;">
                                                    <center><?= $no ?></center>
                                                </td>
                                                <td style="border: 1px solid black; border-collapse: collapse;"
                                                    class="text-left">
                                                    Nama : <?= $Target_storting->nm_anggota ?><br>
                                                    Kontrak : <?= $Target_storting->kontrak_id ?> / Ke-
                                                    <?= $Target_storting->angs_ke ?>
                                                </td>
                                                <td
                                                    style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                    <center>TUNAI / TRANSFER</center>
                                                </td>
                                                <td style="border: 1px solid black; border-collapse: collapse; text-align: right;"
                                                    class="text-right">

                                                </td>
                                                <td style="border: 1px solid black; border-collapse: collapse; text-align: right;"
                                                    class="text-right">

                                                </td>
                                            </tr>
                                            <?php $no++; ?>
                                        <?php endforeach; ?>
                                    <?php else : ?>
                                        <tr style="border: 1px solid black; border-collapse: collapse;">
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                        </tr>
                                        <tr style="border: 1px solid black; border-collapse: collapse;">
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                        </tr>
                                        <tr style="border: 1px solid black; border-collapse: collapse;">
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                            <td
                                                style="border: 1px solid black; border-collapse: collapse; text-align: center;">
                                                -</td>
                                        </tr>
                                    <?php endif; ?>
                                </tbody>
                                <tfoot>
                                    <tr style="border: 1px solid black; border-collapse: collapse;">
                                        <td colspan="3" style="border: 1px solid black; border-collapse: collapse;">
                                            <center>Jumlah</center>
                                        </td>
                                        <td colspan="2"
                                            style="border: 1px solid black; border-collapse: collapse; text-align: right;">
                                            <?php if ($jml_storting['jml_storting'] > 0) : ?>
                                                <?= number_format($jml_storting['jml_storting'], 0, ',', '.') ?>,-<br>
                                            <?php else :
                                                echo '0,-'; ?>
                                            <?php endif; ?>
                                        </td>
                                    </tr>
                                </tfoot>
                            </table><br>
                            <table>
                                <tr>
                                    <td>Target <?= date('d', strtotime($tanggal))  ?>
                                        <?= $this->mycustom->bulanIndo(date('m', strtotime($tanggal)))  ?>
                                        <?= date('Y', strtotime($tanggal))  ?></td>
                                    <td> : </td>
                                    <td> Rp </td>
                                    <td style="text-align: right;">
                                        <?php if ($jml_target > 0) : ?>
                                            <?= number_format($jml_target, 0, ',', '.') ?>,-<br>
                                        <?php else :
                                            echo '0,-'; ?>
                                        <?php endif; ?></td>
                                    <td> / </td>
                                    <td> <?= $jml_target_org ?> </td>
                                    <td> Anggota </td>
                                </tr>
                                <tr>
                                    <td>Kinerja <?= date('d', strtotime($tanggal))  ?>
                                        <?= $this->mycustom->bulanIndo(date('m', strtotime($tanggal)))  ?>
                                        <?= date('Y', strtotime($tanggal))  ?></td>
                                    <td> : </td>
                                    <td></td>
                                    <td style="text-align: right;">
                                        <?php if ($jml_target_org > 0) :
                                            if ($storting_org > 0) :
                                                $nilai = ($storting_org / $jml_target_org) * 100;
                                                if ($nilai >= 100) :
                                                    echo '100%';
                                                else :
                                                    echo $nilai . '%';
                                                endif;
                                            else :
                                                echo '0%';
                                            endif;
                                        else :
                                            echo 'Tidak Ada Nilai';
                                        endif; ?>
                                    </td>
                                </tr>
                            </table>
                            <center>
                                <table>
                                    <tr>
                                        <th style="font-weight: normal; text-align: left;">
                                            <a></a><br>
                                            <a>Kudus, <?= date('d', strtotime($tanggal))  ?>
                                                <?= $this->mycustom->bulanIndo(date('m', strtotime($tanggal)))  ?>
                                                <?= date('Y', strtotime($tanggal))  ?></a><br>
                                            <a></a><br>
                                            <a></a>
                                        </th>
                                    </tr>
                                    <tr>
                                        <td style="text-align: center;">Petugas Marketing,</td>
                                        <td></td>
                                        <td style="text-align: center;">Bagian Kasir,</td>
                                        <td></td>
                                        <td style="text-align: center;">Manager,</td>
                                        <td></td>
                                        <td style="text-align: center;">Bagian Keuangan</td>
                                    </tr>
                                    <tr>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: center;">( <?= $data_marketing['nm_panggilan'] ?> )</td>
                                        <td></td>
                                        <td style="text-align: center;">( Kasir Bina Artha )</td>
                                        <td></td>
                                        <td style="text-align: center;">( Arief Rahman )</td>
                                        <td></td>
                                        <td style="text-align: center;">( David Candra Kurniawan )</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>