<?php
//error_reporting(0);
date_default_timezone_set('Asia/Jakarta');
$tanggal = mktime(date("m"), date("d"), date("Y"));
$tglsekarang = date("d-m-Y", $tanggal);

$classTr = new transaksi();
$format = new format();
$crud = new crudData;
$link = new linkpage;

if (isset($_POST['tanggal1'])) {
    $tgl_1 = $_POST['tanggal1'];
} else {
    $tgl_1 = $tglsekarang;
};
if (isset($_POST['tanggal2'])) {
    $tgl_2 = $_POST['tanggal2'];
} else {
    $tgl_2 = $tglsekarang;
};

if ($level == "admin") {

    if (isset($_POST['penerima']) && $_POST['penerima'] != "Semua") {
        $penerima_lap = $_POST['penerima'];
        // $val_penerima = $classTr->namaPenerimaByID($_POST['penerima']);
        $val_penerima = $crud->getValue('user', " where id_user='$_POST[penerima]' || id='$_POST[penerima]'", 'nama');
    } else {
        $penerima_lap = "Semua";
        $val_penerima = "Semua";
    };
}

if (isset($_POST['jenjang'])) {
    $jenjang_lap = $_POST['jenjang'];
} else {
    $jenjang_lap = "Semua";
};
if (isset($_POST['paralel'])) {
    $paralel_lap = $_POST['paralel'];
} else {
    $paralel_lap = "Semua";
};
if (isset($_POST['metode'])) {
    $metode_lap = $_POST['metode'];
} else {
    $metode_lap = "Semua";
};
if (isset($_POST['kategori']) && $_POST['kategori'] != 'Semua') {
    $kategori_lap = $_POST['kategori'];
} else {
    $kategori_lap = "Semua";
};

//if (isset($_POST['penerima']) && $_POST['penerima'] != 'Semua') {
//    $penerima_filter = "and penerima='$penerima_lap'";
//} else {
//    $penerima_filter = "";
//};
if ($level == "admin") {

    if (isset($_POST['penerima']) && $_POST['penerima'] != "Semua") {
        $penerima_lap = $_POST['penerima'];
        $val_penerima = $crud->getValue('user', " where id_user='$_POST[penerima]' || id='$_POST[penerima]'", 'nama');
        $filterPenerima = " and penerima='$penerima_lap'";
    } else {
        $penerima_lap = "Semua";
        $val_penerima = "Semua";
        $filterPenerima = "";
    };
} else {
    $penerima_lap = $_POST['penerima'];
    $val_penerima = $crud->getValue('user', " where id_user='$_POST[penerima]' || id='$_POST[penerima]'", 'nama');
    $filterPenerima = " and penerima='$penerima_lap'";;
}
if (isset($_POST['jenjang']) && $_POST['jenjang'] != 'Semua') {
    $jenjang_filter = "and jenjang='$jenjang_lap'";
} else {
    $jenjang_filter = "";
};
if (isset($_POST['paralel']) && $_POST['paralel'] != 'Semua') {
    $paralel_filter = "and paralel='$paralel_lap'";
} else {
    $paralel_filter = "";
};
if (isset($_POST['kategori']) && $_POST['kategori'] != 'Semua') {
    $kategori_filter = "and kategori='$kategori_lap'";
} else {
    $kategori_filter = "";
};
if (isset($_POST['metode']) && $_POST['metode'] != 'Semua') {
    $metode_filter = "and metode='$metode_lap'";
} else {
    $metode_filter = "";
};



$penerimaID = $crud->getValue('user', "where id='$user_id' || id_user='$user_id'", 'user_id');
$tgl1 = $format->dateToEng($tgl_1);
$tgl2 = $format->dateToEng($tgl_2);
?>
<div class="content-wrapper">

    <?php require('./layout/headerpage.php'); ?>

    <div class="container col-12 mb-4 pb-5">
        <div class="row">
            <div class="col-12">
                <div class="col-12">
                    <div class="card  mx-3">
                        <div class="timeline-header bg-primary  py-2 pl-2">
                            <b class="text-light judul"><span class="bi bi-calculator"></span> Laporan Transaksi</b>
                        </div>
                        <div class="card-body mb-0">
                            <div class="row mx-3 mt-2" style="background-color:white;">
                                <div class="col-md-6">
                                    <div class="card-body mt-4 px-1 mx-2">
                                        <form action="" method="post">
                                            <div class="row">
                                                <label class="col-sm-3 col-form-label">Periode</label>
                                                <div class="col-md-4 d-inline">
                                                    <input type="text" class="form-control form-control-sm fontInput" placeholder="" id="tanggal1" pattern="\d{1,2}-\d{1,2}-\d{4}" value="<?php echo $tgl_1;
                                                                                                                                                                                            ?>" name="tanggal1" style="text-align:center" required>
                                                </div>
                                                <div class="col-md-1">
                                                    <label class="col-form-label ml-3">s.d</label>
                                                </div>
                                                <div class="col-md-4">
                                                    <input type="text" class="form-control form-control-sm fontInput" placeholder="" id="tanggal2" pattern="\d{1,2}-\d{1,2}-\d{4}" value="<?php echo $tgl_2;
                                                                                                                                                                                            ?>" name="tanggal2" style="text-align:center" required>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <label class="col-sm-3 col-form-label">Kelas [Jenjang-Paralel]</label>
                                                <div class="col-md-2">
                                                    <select name="jenjang" class="form-control form-control-sm fontInput small">
                                                        <option><?php echo $jenjang_lap; ?></option>
                                                        <?php
                                                        $sekolah = new sekolah;

                                                        $jenjang = strtolower($sekolah->dataSekolah('jenjang'));

                                                        $opt = new form();
                                                        $opval = $opt->optSelect('tb_tingkat', "where {$jenjang}<>'' order by tingkat asc");
                                                        while ($dataopt = $opval->fetch(PDO::FETCH_OBJ)) {
                                                            $optJenjang = $dataopt->{$jenjang};
                                                            echo "<option>" . $optJenjang . " </option>";
                                                        };
                                                        ?>
                                                    </select>
                                                </div>
                                                <div class="col-md-7">
                                                    <select name="paralel" class="form-control form-control-sm fontInput small" required>
                                                        <option><?php echo $paralel_lap; ?></option>
                                                        <?php
                                                        $opval = $opt->optSelect('tb_paralel', ' order by paralel asc');
                                                        while ($datapar = $opval->fetch(PDO::FETCH_OBJ)) {
                                                            echo "<option>$datapar->paralel</option>";
                                                        };
                                                        ?>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <label class="col-sm-3 col-form-label">Kategori Siswa</label>
                                                <div class="col-md-9">
                                                    <select name="kategori" class="form-control form-control-sm fontInput small" required>
                                                        <option><?php echo $kategori_lap; ?></option>
                                                        <option>Semua</option>
                                                        <?php
                                                        $opval = $opt->optSelect('tb_siswa_kategori', ' order by kategori asc');
                                                        while ($datapar = $opval->fetch(PDO::FETCH_OBJ)) {
                                                            echo "<option>$datapar->kategori</option>";
                                                        };
                                                        ?>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <label class="col-sm-3 col-form-label">Penerima</label>
                                                <div class="col-md-9">
                                                    <select name="penerima" class="form-control form-control-sm fontInput small" required>

                                                        <?php
                                                        $classLaporan = new laporan();
                                                        $crud = new crudData();
                                                        if ($level == "admin") {
                                                            $opval = $crud->showTable("user where status='Aktif' && (level='admin' || level='teller') order by nama asc");
                                                            echo "<option value='$penerima_lap'>$val_penerima</option>";
                                                            echo "<option value='Semua'>Semua</option>";
                                                        } elseif ($level = "teller") {
                                                            $opval = $crud->showTable("user where id='$user_id' || id_user='$penerimaID' order by nama asc");
                                                            echo "<option value='$user_id'>$val_penerima</option>";
                                                        } else {
                                                            $opval = $crud->showTable($tb_transaksi . " where penerima='$user_id' || penerima='$penerimaID'  group by penerima order by penerima asc");
                                                            echo "<option value=''>--#Ref--</option>";
                                                        };

                                                        while ($datapnr = $opval->fetch(PDO::FETCH_OBJ)) {

                                                            $countUser = $crud->countData('user', " where (id='$datapnr->id' || id_user='$datapnr->id_user') && status='Aktif' && (level='admin' || level='teller')");
                                                            if ($countUser > 0) {
                                                                $namaP = $crud->getValue('user', " where (id='$datapnr->id' || id_user='$datapnr->id_user') && status='Aktif' && (level='admin' || level='teller')", 'nama');
                                                            } else {
                                                                $namaP = "#REF";
                                                            };

                                                            echo "<option value='$datapnr->id'>$namaP</option>";
                                                        };
                                                        ?>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <label class="col-sm-3 col-form-label">Metode Bayar</label>
                                                <div class="col-md-9">
                                                    <select name="metode" class="form-control form-control-sm fontInput small" required>
                                                        <option><?php echo $metode_lap; ?></option>
                                                        <option value="Semua">Semua</option>
                                                        <option value="Tunai">Tunai</option>
                                                        <option value="Bank">Bank/Transfer</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="row mt-3">
                                                <label class="col-sm-3 col-form-label"></label>
                                                <div class="col-md-9">
                                                    <button type="submit" class="btn btn-primary btn-xs float-right px-2 mx-1" name="save"><i class="bi-funnel"></i> <b>FILTER</b></button>
                                        </form>
                                        <?php //echo $link->exportTXTLapTransaksi2('laporan/transaksi/print_excel_rinci', $tahun, $tgl_1, $tgl_2, $metode_lap, $jenjang_lap, $paralel_lap, $penerima_lap); 
                                        ?>

                                        <?php //echo $link->exportXlsxLapTransaksi2('laporan/transaksi/print_txt', $tahun, $tgl_1, $tgl_2, $metode_lap, $jenjang_lap, $paralel_lap, $penerima_lap); 
                                        ?>

                                        <?php //echo $link->exportXlsxLapTransaksi1('laporan/transaksi/print_excel_rekap', $tahun, $tgl_1, $tgl_2, $metode_lap, $jenjang_lap, $paralel_lap, $penerima_lap); 
                                        ?>

                                        <form name="cetak" action="<?php echo $link->pageAction('laporan/transaksi/print_preview'); ?>" method="post">
                                            <input name="tanggal1" value="<?php echo $tgl1; ?>" hidden>
                                            <input name="tanggal2" value="<?php echo $tgl2; ?>" hidden>
                                            <input name="tahun" value="<?php echo $tahun; ?>" hidden>
                                            <input name="metode_lap" value="<?php echo $metode_lap; ?>" hidden>
                                            <input name="jenjang_lap" value="<?php echo $jenjang_lap; ?>" hidden>
                                            <input name="paralel_lap" value="<?php echo $paralel_lap; ?>" hidden>
                                            <input name="penerima_lap" value="<?php echo $penerima_lap; ?>" hidden>
                                            <input name="kategori" value="<?php echo $kategori_lap; ?>" hidden>
                                            <button type="submit" class="btn btn-primary btn-xs float-right px-2 mx-1 d-inline"><i class="bi bi-printer"></i><b> CETAK</b></button>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="card-body mt-4 px-1 mx-2">
                                <div class="row">
                                    <div class="col-12 col-sm-6 col-md-12">
                                        <div class="info-box mb-3">
                                            <span class="info-box-icon bg-primary elevation-1"><i class="bi bi-calculator"></i></span>
                                            <div class="info-box-content">
                                                <div class="col-sm-12 invoice-col">
                                                    <dl class="row">
                                                        <dt class="col-sm-3 pt-3">PERIODE</dt>
                                                        <dd class="col-sm-9  pt-3"><b>: <?php echo $tgl_1 . " s.d " . $tgl_2; ?></b></dd>
                                                        <dt class="col-sm-3">JUMLAH</dt>
                                                        <dd class="col-sm-9"><b>: <?php $classLaporan = new laporan();
                                                                                    echo $format->ribuan($classLaporan->TransaksiTotal($tb_transaksi, $tgl1, $tgl2, $penerima_lap, $metode_lap, $kategori_lap));

                                                                                    ?></b></dd>
                                                        <dt class="col-sm-3">RECORD</dt>
                                                        <dd class="col-sm-9"><b>: <?php echo $classLaporan->CountRecordAll($tb_transaksi, $tgl1, $tgl2, $penerima_lap, $metode_lap, $kategori_lap);

                                                                                    ?> Data</b></dd>
                                                        <dt class="col-sm-3">PENERIMA</dt>
                                                        <dd class="col-sm-9"><b>: <?php echo $val_penerima; ?></b>
                                                        </dd>
                                                    </dl>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>

                <div class="card-body mx-4">
                    <div class="row">
                        <div class="col-6 mr-5">
                            <?php echo $link->exportXlsxLapTransaksi1('laporan/transaksi/print_excel_rekap', $tahun, $tgl_1, $tgl_2, $metode_lap, $jenjang_lap, $paralel_lap, $kategori_lap, $penerima_lap); ?>

                            <label>
                                <h6><b class="text-success">REKAPITULASI PER JENJANG</b></h6>

                            </label>
                            <table id="" class="table table-condensed table-sm">
                                <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>Kode : Jenis Pembayaran</th>
                                        <th>Jenjang</th>
                                        <th>Bulanan</th>
                                        <th>Record</th>
                                        <th>Jumlah</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php
                                    $classForm = new form();
                                    $format = new format();
                                    $tingkat = $classForm->optSelect('tb_tingkat', "where {$jenjang}<>'' order by no asc");
                                    while ($datatingkat = $tingkat->fetch(PDO::FETCH_OBJ)) {
                                        $jenjang_opt = $datatingkat->{$jenjang};
                                        echo "
                                        <tr>
                                            <td width='5px'>#</td>
                                            <td align=left colspan='4'><b>Jenjang Kelas $jenjang_opt</b></td>
                                        </tr>";
                                        $classLaporan = new laporan();
                                        $jenisBayar = $classLaporan->ShowjenisBayar($tahun, $jenjang_opt);
                                        while ($datajenis = $jenisBayar->fetch(PDO::FETCH_OBJ)) {
                                            $jenis = $datajenis->kode;
                                            echo "
                                            <tr>
                                                <td width='5px'></td>
                                                <td align=left>$datajenis->kode : $datajenis->nama</td>
                                                <td align=left>$datajenis->kelas</td>
                                                <td align=left>$datajenis->bulanan</td>
                                                <td align=right>" . $classLaporan->CountRecordJenis($tb_transaksi, $jenis, $tgl_1, $tgl_2, $penerima_lap, $metode_lap, $jenjang_opt, $paralel_lap, $kategori_lap) . " Data</td>
                                                <td align=right>" . $format->ribuan($classLaporan->TransaksisubTotalJenis($tb_transaksi, $jenis, $tgl_1, $tgl_2, $penerima_lap, $metode_lap, $jenjang_opt, $kategori_lap)) . "</td>
                                            </tr>";
                                        };
                                        echo "
                                        <tr background='grey'>
                                        <td width='5px'></td>
                                        <td align=left colspan='3'><i>Jumlah Kelas $jenjang_opt </i></td>
                                        <td align=right>" . $classLaporan->CountRecordJenjang($tb_transaksi, $tgl_1, $tgl_2, $penerima_lap, $metode_lap, $jenjang_opt, $kategori_lap) . " Data</td>
                                        <td align=right><i>" .  $format->ribuan($classLaporan->TransaksisubTotalJenjang($tb_transaksi, $tgl_1, $tgl_2, $penerima_lap, $metode_lap, $jenjang_opt, $kategori_lap)) . "</i></td>
                                         </tr>";
                                    };
                                    echo "
                                        <tr>
                                            <td width='5px'></td>
                                            <td align=left colspan='3'><b>TOTAL </b></td>
                                            <td align=right><b>" . $classLaporan->CountRecordAll($tb_transaksi, $tgl1, $tgl2, $penerima_lap, $metode_lap,  $kategori_lap) . " Data</b></td>
                                            <td align=right><b>" . $format->ribuan($classLaporan->TransaksiTotal($tb_transaksi, $tgl1, $tgl2, $penerima_lap, $metode_lap, $kategori_lap)) . "</b></td>
                                        </tr>";
                                    ?>

                                </tbody>
                            </table>
                        </div>
                        <div class="col-5 ml-5">
                            <label>
                                <h6><b class="text-success">REKAPITULASI PER JENIS</b></h6>
                            </label>
                            <?php echo $link->exportXlsxLapTransaksi1('laporan/transaksi/print_excel_jenis', $tahun, $tgl_1, $tgl_2, $metode_lap, $jenjang_lap, $paralel_lap, $kategori_lap, $penerima_lap); ?>

                            <table id="" class="table table-condensed table-sm">
                                <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>Kode : Jenis Pembayaran</th>
                                        <th>Record</th>
                                        <th>Jumlah</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php
                                    $classForm = new form();
                                    $format = new format();
                                    $crud = new crudData();
                                    $jenis = $classForm->optSelect('tb_nama_bayar', " group by kode order by kode asc");
                                    while ($datajenis = $jenis->fetch(PDO::FETCH_OBJ)) {
                                        $kodejenis = $datajenis->kode;
                                        echo "
                                        <tr>
                                            <td width='5px'>#</td>
                                            <td align=left><b>Kode $kodejenis </b></td>
                                            <td align=right><b>" .  $format->ribuan($crud->countData($tb_transaksi, "where tanggal>='$tgl1' and tanggal<='$tgl2'  and jenis='$kodejenis' $penerima_filter $metode_filter $kategori_filter")) . " Data</b></td>
                                            <td align=right><b>" .  $format->ribuan($crud->sum($tb_transaksi, 'jumlah', "where tanggal>='$tgl1' and tanggal<='$tgl2'  and jenis='$kodejenis' $penerima_filter $metode_filter $kategori_filter")) . "</b></td>
                                        </tr>";
                                        $classLaporan = new laporan();
                                        $tingkat = $classForm->optSelect('tb_nama_bayar', " where tp='$tahun' and kode='$kodejenis'  group by kelas order by kelas asc");

                                        while ($datatingkat = $tingkat->fetch(PDO::FETCH_OBJ)) {

                                            $namaBayar = $datatingkat->nama;

                                            echo "
                                                <tr>
                                                    <td width='5px'></td>
                                                    <td align=left>Kelas $datatingkat->kelas : $kodejenis : $namaBayar</td>
                                                    <td align=right><i>" .  $format->ribuan($crud->countData($tb_transaksi, "where tanggal>='$tgl1' and tanggal<='$tgl2' and jenjang='$datatingkat->kelas' and jenis='$kodejenis' $penerima_filter $metode_filter $kategori_filter")) . " Data</i></td>
                                                    <td align=right><i>" .  $format->ribuan($crud->sum($tb_transaksi, 'jumlah', "where tanggal>='$tgl1' and tanggal<='$tgl2' and jenjang='$datatingkat->kelas' and jenis='$kodejenis' $penerima_filter $metode_filter $kategori_filter")) . "</i></td>
                                                </tr>";
                                        };
                                    };
                                    echo "
                            <tr>
                                <td width='5px'></td>
                                <td align=left ><b>TOTAL </b></td>
                                <td align=right><b>" . $classLaporan->CountRecordAll($tb_transaksi, $tgl1, $tgl2, $penerima_lap, $metode_lap,  $kategori_lap) . " Data</b></td>
                                <td align=right><b>" . $format->ribuan($classLaporan->TransaksiTotal($tb_transaksi, $tgl1, $tgl2, $penerima_lap, $metode_lap,  $kategori_lap)) . "</b></td>
                            </tr>";

                                    ?>

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="card-body mx-4">
                    <label>
                        <h6><b class="text-primary">RINCIAN TRANSAKSI</b></h6>

                    </label>
                    <?php echo $link->exportTXTLapTransaksi2('laporan/transaksi/print_excel_rinci', $tahun, $tgl_1, $tgl_2, $metode_lap, $jenjang_lap, $paralel_lap, $kategori_lap, $penerima_lap); ?>
                    <?php echo $link->exportXlsxLapTransaksi2('laporan/transaksi/print_txt', $tahun, $tgl_1, $tgl_2, $metode_lap, $jenjang_lap, $paralel_lap, $kategori_lap, $penerima_lap); ?>

                    <table id="example3" class="table table-bordered table-striped table-hover table-sm mb-4">
                        <thead>
                            <tr>
                                <th><input type="checkbox" class="small check_all"></th>
                                <th>Tanggal </th>
                                <th>Nama</th>
                                <th>NIS</th>
                                <th>Kelas</th>
                                <th>Kode : Jenis Pembayaran</th>
                                <th>Periode</th>
                                <th>Jumlah</th>
                                <th>Setor</th>
                                <th>Metode</th>
                                <th>Penerima</th>
                                <th>Catatan</th>


                            </tr>
                        </thead>
                        <tbody>

                            <?php
                            $format = new format;
                            // $class = new crudData();
                            // $showList = $classLaporan->TransaksiDetail($tb_transaksi, $tgl_1, $tgl_2, $penerima_lap, $metode_lap, $jenjang_lap, $paralel_lap);

                            $crud = new crudData();
                            //$showList = $crud->showTable($tb_transaksi . " WHERE tanggal>='$tgl1' and tanggal<='$tgl2' $penerima_filter $metode_filter $jenjang_filter $paralel_filter");
                            $showList = $crud->showTable($tb_transaksi . " WHERE tanggal>='$tgl1' and tanggal<='$tgl2' $filterPenerima  $jenjang_filter $paralel_filter $metode_filter $kategori_filter");

                            $no = 1;
                            while ($data = $showList->fetch(PDO::FETCH_OBJ)) {

                                if ($data->jumlah == "" || $data->jumlah == 0) {
                                    //$jumlah = number_format(0, 0, ",", ".");
                                    $jumlah = 0;
                                } else {
                                    $jumlah = $format->ribuan($data->jumlah);
                                };
                                if ($data->setor == "Ya") {
                                    $setor = "Disetor";
                                } else {
                                    $setor = "--";
                                };
                                $nis = $data->nis;
                                $tahap = $data->tahap;
                                //nama Bayar
                                $classNB = new namaBayar();
                                $ceknamaBayar = $classNB->ceknamaBayar($tahun, $data->jenis, $data->jenjang);

                                //startAt
                                $classTr = new transaksi();
                                $startAt = $classTr->startAt($tb_siswa, $nis);
                                $cekbulan = $classTr->cekPeriode($startAt, $tahap, $tahun1, $tahun2);

                                //nama Bayar
                                $classNB = new namaBayar();
                                $ceknamaBayar = $classNB->ceknamaBayar($tahun, $data->jenis, $data->jenjang);

                                $showJenis = $classNB->shownamaBayar($tahun, $data->jenis, $data->jenjang);
                                $datajenis = $showJenis->fetch(PDO::FETCH_OBJ);
                                $field_tang = 'tang_' . $datajenis->kode;
                                $setbulanan = $datajenis->bulanan; //Cek Apakah Bulanan

                                if ($setbulanan == "Tidak") {
                                    $periode = "Tahap " . $tahap;
                                } else {
                                    $periode = $cekbulan;
                                };

                                $penerima = $classTr->namaPenerimaByID($data->penerima);
                                $link = new linkpage;
                                echo "
                                    <tr>
                                        <td width='5px'>$no</td>
                                        <td align=left>" . $format->dateToIndo($data->tanggal) . "</td>
                                        <td align=left>$data->nama</td>
                                        <td align=left>$nis</td>
                                        <td align=left>$data->jenjang - $data->paralel</td>
                                        <td align=left>$data->jenis : $ceknamaBayar</td>
                                        <td align=left>$periode</td>
                                        <td align=right>" . $jumlah . "</td>
                                        <td align=left>$setor</td>
                                        <td align=left>$data->metode</td>
                                        <td align=left>$penerima</td>
                                        <td align=left><i style='font-size:8px'>$data->catatan</i></td>
                                       
                                    </tr>";
                                $no++;
                            }
                            ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>