<!DOCTYPE html>
<html>
    <head>
        <style>
            html {
                font-family: sans-serif;
                font-size:12px
            }
            p{
                margin-top: 5px;
            }
            table {
                border-collapse: collapse;
            }

            table, th, td {
                border: 1px solid black;
                padding:5px;
            }
        </style>
            <title>Laporan Approval Reimburse</title>
    </head>
    <body>
        <p style="text-align:center"><b>LAPORAN REIMBURSE</b></p>
        <!-- <p style="text-align:center"><b><?= strtoupper(strtolower($title)) ?></b></p> -->
        <p style="text-align:center"><b><?= "PERIODE ".$tanggal_mulai." S/D ".$tanggal_selesai; ?></b></p>

        <table width="100%">
            <thead style="background-color: #1062b1;color: #fff;font-weight: 600;">
                <tr>
                    <th>NO</th>
                    <th>TANGGAL</th>
                    <th>NO PENGAJUAN</th>
                    <th>CABANG<BR>DEPARTEMEN</th>
                    <th>KARYAWAN</th>
                    <th>PLATFON</th>
                    <th>AKUN</th>
                    <th>KETERANGAN</th>
                    <th>PLATFON MAX</th>
                    <th>NOMINAL DIAJUKAN</th>
                    <th>NOMINAL DISETUJUI</th>
                </tr>
            </thead>
            <tbody>
                <?php
                    if(isset($data)) {
                        $no = 0;
                        foreach ($data as $val) {
                            $no++;
                ?>
                            <tr>
                                <td style="text-align:center"><?= $no ?></td>
                                <td style="text-align:center"><?= date('d-m-Y', strtotime($val->tgl_pengajuan));?></td>
                                <td style="text-align:center"><?= $val->no_pengajuan?></td>
                                <td><?= "<b>".$val->kode_cabang."</b> - ".$val->nama_cabang."<br><b>".$val->kode_departemen."</b> - ".$val->nama_departemen ?></td>
                                <td><?= $val->nama_karyawan."<br><b>".$val->nik."</b>" ?></td>
                                <td><?= $val->jenis_plafon  ?></td>
                                <td><?= $val->kode_akun  ?></td>
                                <td><?= $val->keterangan  ?></td>
                                <td style="text-align:right">Rp. <?= number_format($val->max_nominal_plafon,0,",",".") ?></td>
                                <td style="text-align:right">Rp. <?= number_format($val->nominal_diajukan,0,",",".") ?></td>
                                <td style="text-align:right">Rp. <?= number_format($val->nominal_disetujui,0,",",".") ?></td>
                            </tr>
                <?php
                        }}
                ?>
            </tbody>
        </table>
    </body>
</html>