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

<head>

    <link rel="stylesheet" href="../../../../../asset/bootstrap/css/adminlte.min.css">

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

        .fontlamp {
            font-family: arial;
            font-size: 8px;
        }

        .fontJudullamp {
            font-size: 12px;
            font-family: arial;

        }

        .fontInput {
            font-size: 11px;
            font-family: arial;
        }

        .fontJudul {
            font-size: 12px;
            font-family: arial;
            color: dodgerblue;
            background: #000;
        }
    </style>
</head>

<body class="hold-transition sidebar-mini layout-fixed layout-navbar-fixed layout-footer-fixed small">

    <div class="wrapper">
        <?php
        require('../../../../../asset/mod/autoLoad.php');
        $nis = $_GET['nis'];
        $tahun = $_GET['tahun'];
        $time = new time();
        $format = new format();


        $tahun_tabel = substr($tahun, 2, 2) . substr($tahun, 7, 2);

        $tb_siswa = "tb_siswa" . $tahun_tabel;
        $tb_transaksi = "db_transaksi" . $tahun_tabel;
        $tb_detailakun = "detail_akun" . $tahun_tabel;

        $tabungan_siswa = "tabungan_siswa" . $tahun_tabel;
        $tabungan_transaksi = "tabungan_transaksi" . $tahun_tabel;
        $clsCrud = new crudData();

        $count = $clsCrud->countData($tb_siswa, " where nis='$nis'");
        if ($count > 0) {
            $kelas = $clsCrud->getValue($tb_siswa, " where nis='$nis'", 'jenjang') . "-" . $clsCrud->getValue($tb_siswa, " where nis='$nis'", 'paralel');
        } else {
            $kelas = "--";
        };

        $nama = $clsCrud->getValue($tabungan_siswa, " where nis='$nis'", 'nama');
        $kelamin = $clsCrud->getValue($tabungan_siswa, " where nis='$nis'", 'kelamin');
        $status = $clsCrud->getValue($tabungan_siswa, " where nis='$nis'", 'status');
        ?>


        <div class="container col-12 mb-4">
            <div class="row">
                <div class="col-12">
                    <div class="row">
                        <div class="card-body col-12 mx-4">
                            <h5 class="page-header">
                                <?php
                                $view = new lembaga;
                                $clssekolah = new sekolah;
                                echo $view->viewImage('../../../../../asset/dokumen/foto/', 'logo', 'mr-2 position-absolute', '60', '60');
                                echo "<b class='d-block ml-5 pl-3 pt-1'>" . $clssekolah->dataSekolah('sekolah') . "</b>";
                                echo "<i class='footer font ml-5 pl-3 mb-2 pb-3'>" . $clssekolah->dataSekolah('alamat') . "</i>"; ?>
                                <small class="float-right position-relative"><b class="text-danger">BUKU TABUNGAN SISWA<br>TP. <?php echo $tahun; ?></b> </small>
                            </h5>
                        </div>

                        <div class="card-body mx-4">
                            <dl class="row">
                                <dt class="col-sm-3">Nomor Induk Siswa (NIS)</dt>
                                <dd class="col-sm-3">: <?php echo $nis; ?></dd>
                                <dt class="col-sm-3">Nama Siswa</dt>
                                <dd class="col-sm-3">: <?php echo $nama; ?></dd>
                                <dt class="col-sm-3">Kelas</dt>
                                <dd class="col-sm-3">: <?php echo $kelas; ?></dd>
                                <dt class="col-sm-3">Jenis Kelamin</dt>
                                <dd class="col-sm-3">: <?php echo $kelamin; ?></dd>
                                <dt class="col-sm-3">Status</dt>
                                <dd class="col-sm-3">: <?php echo $status; ?></dd>
                                <dt class="col-sm-3">Saldo Tabungan</dt>
                                <dd class="col-sm-3">: <?php $clsTabungan = new tabungan;
                                                        $saldoAkhir = $clsTabungan->saldoAkhir($tabungan_siswa, $tabungan_transaksi, $nis);
                                                        echo $format->ribuan($saldoAkhir); ?></dd>
                            </dl>
                        </div>

                        <div class="card-body mx-4">
                            <label class="col-3">
                                <span><b class="text-primary">TRANSAKSI </b> </span>

                            </label>
                            <div class="col-9 float-right">
                                <i class="footnote float-right">Dicetak Pada : <?php echo $format->dateTimeToIndo($time->getTime());
                                                                                ?> </i>

                            </div>
                            <table class="table table-bordered table-sm">
                                <thead>
                                    <tr>
                                        <th class="bg-secondary text-light" width="30">No</th>
                                        <th class="bg-secondary text-light" width="40">Tanggal</th>
                                        <th class="bg-secondary text-light">Jenis Transaksi</th>
                                        <th class="bg-secondary text-light" width="100">Debet</th>
                                        <th class="bg-secondary text-light" width="100">Kredit</th>
                                        <th class="bg-secondary text-light" width="100">Saldo</th>
                                        <th class="bg-secondary text-light">Teller</th>
                                        <th class="bg-secondary text-light">Keterangan</th>

                                    </tr>
                                </thead>
                                <tbody>
                                    <?php
                                    $class = new tabungan();
                                    $format = new format;
                                    $showList = $class->list_bukuNasabah($tabungan_siswa, $tabungan_transaksi, $nis, $tahun);
                                    ?>

                                </tbody>
                            </table>



                        </div>
                        <!-- /.card-header -->

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



    <script src="../../../../../asset/bootstrap/js/adminlte.min.js"></script>


</body>

</html>