<html>

<head>
    <title>Invoice Pembayaran</title>
    <style>
        #tabel {
            font-size: 15px;
            border-collapse: collapse;
        }

        #tabel td {
            padding-left: 5px;
            border: 1px solid black;
        }
    </style>
</head>


<body style='font-family:tahoma; font-size:12pt;'>
    <table cellspacing='0' style='width: 100%; font-size:12pt; font-family:calibri;  border-collapse: collapse;'
        border='0'>
        <tr>
            <td width='50%'><img src="<?= base_url('assets/') ?>img/logo_invoice.png" width="80%" alt="avatar"></td>
            <td></td>
            <td width='50%' style="text-align: right;"><b style="font-size: 25pt;">Kwitansi Pembayaran</b>
            </td>
        </tr>
        <!-- Rincian Data Beli -->
        <tr>
            <td width='50%'>
                Anggota : <?= substr($data_invoice['nm_anggota'], 0, 15) ?></br>
                No Telp : <?= $data_invoice['no_hp'] ?>
            </td>
            <td></td>
            <td width='50%' style='text-align:right'>#<?= $data_invoice['kd_invoice'] ?></br>
                <?= date('d', strtotime($data_invoice['tgl_pembayaran']))  ?>
                <?= $this->mycustom->bulanIndo(date('m', strtotime($data_invoice['tgl_pembayaran'])))  ?>
                <?= date('Y', strtotime($data_invoice['tgl_pembayaran']))  ?>
            </td>
        </tr>
    </table><br>
    <table cellspacing='0' style='width: 100%; font-size:12pt; font-family:calibri;  border-collapse: collapse;'
        border='0'>
        <tr>
            <td width='50%' style='text-align:center'>Keterangan</td>
            <td width='25%' style='text-align:center'>Angsuran</td>
            <td width='25%' style='text-align:center'>Total Harga</td>
        </tr>
        <!-- Rincian Data Beli -->
        <?php foreach ($data_rinci as $Data_rinci) : ?>
            <tr>
                <td>
                    Angsuran ke-<?= $Data_rinci->angs_ke ?>/<?= $Data_rinci->tempo_pinjaman ?><br>
                    Nomor Kontrak <?= $Data_rinci->kontrak_id ?>
                </td>
                <td style='text-align:right'><?= number_format($Data_rinci->bsr_bayar, 0, ',', '.') ?>,-</td>
                <td style='text-align:right'><?= number_format($Data_rinci->bsr_bayar, 0, ',', '.') ?>,-</td>
            </tr>
        <?php endforeach; ?>
        <tr>
            <td></td>
            <td></td>
            <td><br></td>
        </tr>
        <tr>
            <td style="text-align: center;">
            </td>
            <td>
                <div style='text-align:right'>Total : </div>
            </td>
            <td style='text-align:right'><?= number_format($data_invoice['ttl_bayar'], 0, ',', '.') ?>,-</td>
        </tr>
        <tr>
            <td></td>
            <td><br></td>
        </tr>
    </table>
    <table cellspacing='0' style='width: 100%; font-size:12pt; font-family:calibri;  border-collapse: collapse;'
        border='0'>
        <tr>
            <td width='30%' style="text-align: center;">
            </td>
            <td width='35%' align='center'>Diterima Oleh,</br></br><u>( <?= $data_invoice['nm_panggilan'] ?> )</u>
            </td>
            <td width='35%' align='center'>
            </td>
        </tr>
    </table>
    <!-- Hapus -->
</body>

</html>