<style>
    .fontInput {
        font-size: 11px;
        font-family: arial;
    }
</style>


<div class="row">
    <div class="col-12 col-sm-12 col-md-12 mt-2">
        <div class="info-box">


            <div class="info-box-content">
                <div class="relative mb-0 pb-4">
                    <input name="judul" value="DAFTAR TRANSAKSI DEBET" style="background-color: gainsboro;" class="form-control-sm col-sm-4 fontInput small bg-default mt-3 text-center" disabled>
                </div>

                <div class="col-sm-12 invoice-col pt-0">

                    <div class="row mt-1">
                        <div class="col-12">

                            <table id="" class="table table-condensed table-striped table-sm mb-4">
                                <thead>
                                    <tr>
                                        <th>No</th>
                                        <th>Nama Nasabah</th>
                                        <th>NIS</th>
                                        <th>Kelas</th>
                                        <th>Jumlah</th>
                                        <th>Teller</th>
                                        <th>Jurnal</th>

                                    </tr>
                                </thead>
                                <tbody>
                                    <?php
                                    $clsCrud = new crudData();
                                    $clsTabungan = new tabungan();
                                    $format = new format;
                                    $time = new time;
                                    $today = $time->getDate();

                                    $db = database::getInstance();
                                    $show = $db->runQuery("SELECT * FROM  $tabungan_transaksi where tanggal='$today' and jenis='D' order by created_at asc");
                                    $row = $show->rowCount();
                                    $no = 0;

                                    if ($row != 0) {
                                        while ($data = $show->fetch(PDO::FETCH_OBJ)) {
                                            if (($clsCrud->getValue($tb_siswa, "where nis='$data->nis'", 'jenjang') != NULL)) {
                                                $kelas = $clsCrud->getValue($tb_siswa, "where nis='$data->nis'", 'jenjang') . '-' . $clsCrud->getValue($tb_siswa, "where nis='$data->nis'", 'paralel');
                                            } else {
                                                $kelas = "-";
                                            };
                                            $teller = $clsCrud->getValue('user', "where id='$data->created_by'", 'nama');
                                            if ($data->jurnal == 1) {
                                                $jurnal = "<span class='bi bi-check2-square text-success'></span>";
                                            } else {
                                                $jurnal = "";
                                            }
                                            $no++;
                                            echo "
                                                <tr height='15'>
                                                    <td align=left width='5px'>$no</td>
                                                    <td align=left>$data->nama </td>
                                                    <td align=left>$data->nis </td>
                                                    <td align=left>$kelas </td>
                                                    <td align=left>" . $format->ribuan($data->jumlah) . "</td>
                                                    <td align=left>$teller </td>
                                                    <td align=left>$jurnal </td>
                                                </tr>";
                                        }
                                    } else {
                                        echo  "<tr height='15'>
                                                    <td align=center colspan='5'>-- N I H I L --</td>
                                               </tr>";
                                    };

                                    ?>
                                </tbody>
                            </table>

                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>