        <!-- ============================================================== -->
        <!-- wrapper  -->
        <!-- ============================================================== -->
        <div class="dashboard-wrapper">
            <div class="container-fluid  dashboard-content">
                <!-- ============================================================== -->
                <!-- pageheader -->
                <!-- ============================================================== -->
                <div class="row">
                    <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="page-header">
                            <h2 class="pageheader-title">Laporan LPBJ</h2>
                            <div class="page-breadcrumb">
                                <nav aria-label="breadcrumb">
                                    <ol class="breadcrumb">
                                        <li class="breadcrumb-item"><a href="index.php" class="breadcrumb-link"><?php echo namahari_ID(date('Y-m-d')) . ", " . date('d-m-Y'); ?>, Dashboard</a></li>
                                        <li class="breadcrumb-item">Pembelian</a></li>
                                        <li class="breadcrumb-item active" aria-current="page"><a href="?menu=daftar-terima-barang" class="breadcrumb-link">List Laporan LPBJ</a></li>
                                    </ol>
                                </nav>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- ============================================================== -->
                <!-- end pageheader -->
                <!-- ============================================================== -->
                <div class="row">
                    <!-- ============================================================== -->
                    <!-- basic form -->
                    <!-- ============================================================== -->
                    <div class="col-xl-6 col-lg-6 col-md-12 col-sm-12 col-12">
                        <div class="card">
                            <h5 class="card-header">Laporan LPBJ</h5>
                            <div class="card-body">
                                <form id="basicform" data-parsley-validate="" action="index.php?menu=laporan-lpbj" method="post" enctype="multipart/form-data" onsubmit="changeValue()">
                                    <div class="form-group">
                                        <?php
                                        if (isset($_POST['dtAwal']))
                                            $dtAwal = $_POST['dtAwal'];
                                        else
                                            $dtAwal = date('Y-m-d');

                                        if (isset($_POST['dtAkhir']))
                                            $dtAkhir = $_POST['dtAkhir'];
                                        else
                                            $dtAkhir = date('Y-m-d');
                                        ?>
                                        <label for="inputdtAwal">Tanggal Awal</label>&nbsp;&nbsp;&nbsp;<input id="inputdtAwal" type="date" name="dtAwal" value="<?php echo $dtAwal; ?>" required>
                                        &nbsp;&nbsp;&nbsp;<label for="inputdtAkhir">Tanggal Akhir</label>&nbsp;&nbsp;&nbsp;<input id="inputdtAkhir" type="date" name="dtAkhir" value="<?php echo $dtAkhir; ?>" required>
                                    </div>
                                    <div class="form-group">
                                        <label for="list_item">Barang :</label>
                                        <input id="list_item" type="text" name="item_ID" data-parsley-trigger="change" autocomplete="off" class="form-control" list="list_deskripsi">
                                        <datalist id="list_deskripsi">
                                            <?php
                                            $MySQLi = new MySQLi($strDBHostName, $strDBUsername, $strDBPassword, $strDBName);

                                            $query = "SELECT ID, 
                                                            strDeskripsi 
                                                    FROM item 
                                                    ";
                                            $result = $MySQLi->query($query);
                                            while ($row = $result->fetch_array())
                                                echo "<option value='" . $row['strDeskripsi'] . "'  data-realvalue='" . $row['ID'] . "'>";
                                            ?>
                                        </datalist>
                                    </div>
                                    <div class="form-group">
                                        <label for="inputStatus">Status</label>
                                        <select name="status" class="form-control" id="inputStatus">
                                            <option value="all" <?php if (isset($_POST['status']) && $_POST['status'] == "all") echo "selected"; ?>>Semua</option>
                                            <option value="done" <?php if (isset($_POST['status']) && $_POST['status'] == "done") echo "selected"; ?>>Done</option>
                                            <option value="pending" <?php if (isset($_POST['status']) && $_POST['status'] == "pending") echo "selected"; ?>>Pending</option>
                                        </select>
                                    </div>
                                    <div class="form-group">
                                        <label for="inputVersion">Version</label>
                                        <select name="version" class="form-control" id="inputVersion">
                                            <option value="v1" <?php if (isset($_POST['version']) && $_POST['version'] == "v1") echo "selected"; ?>>Version 1</option>
                                            <option value="v2" <?php if (isset($_POST['version']) && $_POST['version'] == "v2") echo "selected"; ?>>Version 2</option>
                                        </select>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-6 pl-0">
                                            <p class="text-right">
                                                <button type="submit" name="lihat" class="btn btn-space btn-primary">Lihat</button>
                                                <a href="?menu=daftar-terima-barang.php" class="btn btn-space btn-secondary">Cancel</a>
                                            </p>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                    <!--
                    <div class="col-xl-6 col-lg-6 col-md-12 col-sm-12 col-12">
                        <div class="card">
                            <h5 class="card-header">Entry Penerimaan Barang</h5>
                            <div class="card-body">
                                <a href="?menu=tambah-terima-barang" class="btn btn-rounded btn-primary"><i class="m-r-10 mdi mdi-account-multiple-plus"> Tambah Penerimaan Barang</i></a>
                            </div>
                        </div>
                    </div>
-->
                    <!-- ============================================================== -->
                    <!-- end basic form -->
                    <!-- ============================================================== -->
                    <?php
                    $having = "";
                    $where = "";
                    if (isset($_POST['lihat'])) {
                        if ($_SESSION['strDivision'] == "HQ")
                            $where = "";
                        elseif ($_SESSION['strJobPosition'] == "Purchasing" || $_SESSION['strJobPosition'] == "Accurate") {
                            // $where=$where." AND strKdLPBJ like '".$_SESSION['strKdLokasi']."%' ";
                            $where = $where . " ";
                            $having = $having . "HAVING countDetails >= 1 AND
                                            NOT (sumACCSPV = 0) AND
                                            NOT (sumACCMGR = 0) AND
                                            NOT (sumACCDIR = 0) 
                                            ";
                        } else {
                            switch ($_SESSION['strJenisAkses']) {
                                case "DIR":
                                    $where = "";
                                    break;
                                case "MGR":
                                    $where = $where . " AND (employee_Email='" . $_SESSION['strEmail'] . "' OR strMailSPV='" . $_SESSION['strEmail'] . "' OR strMailMGR='" . $_SESSION['strEmail'] . "')";
                                    break;
                                case "SPV":
                                    $where = $where . " AND (employee_Email='" . $_SESSION['strEmail'] . "' OR strMailSPV='" . $_SESSION['strEmail'] . "')";
                                    break;
                                case "STAFF":
                                    $where = $where . " AND employee_Email='" . $_SESSION['strEmail'] . "'";
                                    break;
                            }
                        }
                        if (isset($_POST['version']))
                            if ($_POST['version'] == "v1") {
                    ?>
                            <!-- ============================================================== -->
                            <!-- data table  -->
                            <!-- ============================================================== -->
                            <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                                <div class="card">
                                    <div class="card-header">
                                        <h5 class="mb-0">Data List LPBJ</h5>
                                    </div>
                                    <div class="card-body">
                                        <div class="table-responsive">
                                            <table id="example" class="table table-striped table-bordered second" style="width:100%">
                                                <thead>
                                                    <tr>
                                                        <th>No</th>
                                                        <th>Kode LPBJ</th>
                                                        <th>Requestor</th>
                                                        <th>SPV</th>
                                                        <th>MGR</th>
                                                        <th>DIR</th>
                                                        <th>Option</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <?php
                                                    $MySQLi = new MySQLi($strDBHostName, $strDBUsername, $strDBPassword, $strDBName);
                                                    switch ($_POST['status']) {
                                                        case "done":
                                                            $where = $where . " AND dtSubmitSPV > '1000-01-01' AND dtSubmitMGR > '1000-01-01' AND dtSubmitDIR > '1000-01-01' ";
                                                            break;
                                                        case "pending":
                                                            $where = $where . " AND (dtSubmitSPV = '1000-01-01' OR dtSubmitMGR = '1000-01-01' OR dtSubmitDIR = '1000-01-01')";
                                                            break;
                                                        case "all":
                                                            $where = $where . "";
                                                            break;
                                                    }
                                                    if ($_POST['item_ID'] <> "") {
                                                        $query = "SELECT  HEAD.ID, 
                                                                            HEAD.strKdLPBJ, 
                                                                            HEAD.strFullNameREQ, 
                                                                            HEAD.strFullNameSPV, 
                                                                            HEAD.strFullNameMGR, 
                                                                            HEAD.strFullNameDIR, 
                                                                            HEAD.dtCreate, 
                                                                            HEAD.dtSubmitSPV, 
                                                                            HEAD.dtSubmitMGR, 
                                                                            HEAD.dtSubmitDIR, 
                                                                            HEAD.dtSubmitAccurate, 
                                                                            HEAD.stsDone 
                                                                    FROM tpc_h_lpbj AS HEAD 
                                                                    LEFT JOIN tpc_d_lpbj AS DET 
                                                                        ON HEAD.ID=DET.h_lpbj_ID 
                                                                    LEFT JOIN item AS list_item 
                                                                        ON DET.item_ID=list_item.ID 
                                                                    WHERE DET.item_ID='" . $_POST['item_ID'] . "' AND 
                                                                        DET.stsAktif=1 AND
                                                                        HEAD.stsAktif=1 AND 
                                                                        list_item.stsAktif=1 AND 
                                                                        (HEAD.dtCreate BETWEEN '" . $_POST['dtAwal'] . " 00:00:00' AND '" . $_POST['dtAkhir'] . " 23:59:59') 
                                                                    " . $where;
                                                    } else {
                                                        $query = "SELECT  HEAD.ID, 
                                                                            HEAD.strKdLPBJ, 
                                                                            HEAD.strFullNameREQ, 
                                                                            HEAD.strFullNameSPV, 
                                                                            HEAD.strFullNameMGR, 
                                                                            HEAD.strFullNameDIR, 
                                                                            HEAD.dtCreate, 
                                                                            HEAD.dtSubmitSPV, 
                                                                            HEAD.dtSubmitMGR, 
                                                                            HEAD.dtSubmitDIR, 
                                                                            HEAD.dtSubmitAccurate, 
                                                                            HEAD.stsDone,
                                                                            SUM(DET.stsACC_Accurate) AS sumACC_Accurate,
                                                                            SUM(DET.stsACCDIR) AS sumACCDIR,
                                                                            SUM(DET.stsACCMGR) AS sumACCMGR,
                                                                            SUM(DET.stsACCSPV) AS sumACCSPV,
                                                                            COUNT(DET.h_lpbj_ID) AS countDetails
                                                                    FROM tpc_h_lpbj AS HEAD 
                                                                    LEFT JOIN tpc_d_lpbj AS DET 
                                                                        ON HEAD.ID=DET.h_lpbj_ID 
                                                                    WHERE HEAD.stsAktif=1 AND 
                                                                          DET.stsAktif=1 AND 
                                                                        (HEAD.dtCreate BETWEEN '" . $_POST['dtAwal'] . " 00:00:00' AND '" . $_POST['dtAkhir'] . " 23:59:59')   
                                                                    " . $where . " 
                                                                    GROUP BY HEAD.ID,
                                                                            HEAD.strKdLPBJ,
                                                                            HEAD.strFullNameREQ,
                                                                            HEAD.strFullNameSPV,
                                                                            HEAD.strFullNameMGR,
                                                                            HEAD.strFullNameDIR,
                                                                            HEAD.dtCreate,
                                                                            HEAD.dtSubmitSPV,
                                                                            HEAD.dtSubmitMGR,
                                                                            HEAD.dtSubmitDIR,
                                                                            HEAD.dtSubmitAccurate,
                                                                            HEAD.stsDone 
                                                                    " . $having . "
                                                                    ";
                                                    }
                                                    $i = 1;
                                                    //echo $query;
                                                    //die($query);
                                                    $result = $MySQLi->query($query);
                                                    while ($row = $result->fetch_array()) {
                                                        $tombolEdit = "";
                                                        if ($row['dtSubmitSPV'] == "1000-01-01")
                                                            $dtSubmitSPV = "Pending";
                                                        else
                                                            $dtSubmitSPV = $row['dtSubmitSPV'];

                                                        if ($row['dtSubmitMGR'] == "1000-01-01")
                                                            $dtSubmitMGR = "Pending";
                                                        else
                                                            $dtSubmitMGR = $row['dtSubmitMGR'];

                                                        if ($row['dtSubmitDIR'] == "1000-01-01")
                                                            $dtSubmitDIR = "Pending";
                                                        else {
                                                            $dtSubmitDIR = $row['dtSubmitDIR'];
                                                            /*
                                                                if($_SESSION['usrLevel']>1 && $row['stsDoneByAccurate'] <> 1)
                                                                { 
                                                                    if($_SESSION['strJobPosition'] <> "Accurate")
                                                                        $tombolEdit="<a href='index.php?menu=edit-lpbj&lpbj=".$row['strKdLPBJ']."' class='btn btn-space btn-primary'>Edit</a>"; 
                                                                    else $tombolEdit="<a href='transaksi/persediaan/pemesanan/simpan.edit.pesan.barang.php?opt=done&id=".$row['ID']."' class='btn btn-space btn-primary' target='_blank'>Done</a>";
                                                                }
                                                                */ //echo $row['sumACCDIR']; 
                                                            if ($row['dtSubmitAccurate'] == "1000-01-01" && $row['dtSubmitDIR'] <> "1000-01-01" && strtoupper($_SESSION['strJobPosition']) == "ACCURATE" && $row['sumACCDIR'] > 0)
                                                                $tombolEdit = "<a href='index.php?menu=persetujuan-lpbj&edit=1&lpbj=" . $row['strKdLPBJ'] . "' class='btn btn-space btn-primary'>Edit</a>";
                                                            else {
                                                                if (strtoupper($_SESSION['strJobPosition']) == "PURCHASING" && $row['stsDone'] <> 1 && $row['dtSubmitAccurate'] <> "1000-01-01" && $row['sumACC_Accurate'] > 0)
                                                                    $tombolEdit = "<a href='index.php?menu=edit-lpbj&lpbj=" . $row['strKdLPBJ'] . "' class='btn btn-space btn-primary'>Edit</a><a href='transaksi/persediaan/pemesanan/simpan.edit.pesan.barang.php?opt=done&id=" . $row['ID'] . "' class='btn btn-space btn-primary'>Done</a>";
                                                            }
                                                        }

                                                        echo "<tr>
                                                                    <td>" . $i . "</td>
                                                                    <td>" . $row['strKdLPBJ'] . "</td>
                                                                    <td>" . $row['strFullNameREQ'] . " / " . $row['dtCreate'] . "</td>
                                                                    <td>" . $row['strFullNameSPV'] . " / " . $dtSubmitSPV . "</td>
                                                                    <td>" . $row['strFullNameMGR'] . " / " . $dtSubmitMGR . "</td>
                                                                    <td>" . $row['strFullNameDIR'] . " / " . $dtSubmitDIR . "</td>
                                                                    <td>" . $tombolEdit . "<a href='transaksi/persediaan/pemesanan/print.pesan.barang.php?ID=" . $row['ID'] . "' class='btn btn-space btn-primary' target='_blank'>Print Preview</a></td>
                                                                </tr>";
                                                        $i++;
                                                    }
                                                    ?>
                                                </tbody>
                                                <tfoot>
                                                    <tr>
                                                        <th>No</th>
                                                        <th>Kode LPBJ</th>
                                                        <th>Requestor</th>
                                                        <th>SPV</th>
                                                        <th>MGR</th>
                                                        <th>DIR</th>
                                                        <th>Option</th>
                                                    </tr>
                                                </tfoot>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!-- ============================================================== -->
                            <!-- end data table  -->
                            <!-- ============================================================== -->
                        <?php
                            } elseif ($_POST['version'] == "v2") {
                        ?>
                            <!-- ============================================================== -->
                            <!-- data table  -->
                            <!-- ============================================================== -->
                            <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                                <div class="card">
                                    <div class="card-header">
                                        <h5 class="mb-0">Data List LPBJ</h5>
                                    </div>
                                    <div class="card-body">
                                        <div class="table-responsive">
                                            <table id="example" class="table table-striped table-bordered second" style="width:100%">
                                                <thead>
                                                    <tr>
                                                        <th>No</th>
                                                        <th>Kode LPBJ</th>
                                                        <th>Divisi</th>
                                                        <th>Requestor</th>
                                                        <th>SPV</th>
                                                        <th>MGR</th>
                                                        <th>DIR</th>
                                                        <th>Kode Barang</th>
                                                        <th>Deskripsi</th>
                                                        <th>Departement</th>
                                                        <th>Jumlah</th>
                                                        <th>Satuan</th>
                                                        <th>Jumlah Stok</th>
                                                        <th>Keterangan</th>
                                                        <th>Persetujuan</th>
                                                        <th>Status</th>
                                                        <th>Prioritas</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <?php
                                                    $MySQLi = new MySQLi($strDBHostName, $strDBUsername, $strDBPassword, $strDBName);
                                                    switch ($_POST['status']) {
                                                        case "done":
                                                            $where = $where . " AND dtSubmitSPV > '1000-01-01' AND dtSubmitMGR > '1000-01-01' AND dtSubmitDIR > '1000-01-01' ";
                                                            break;
                                                        case "pending":
                                                            $where = $where . " AND (dtSubmitSPV = '1000-01-01' OR dtSubmitMGR = '1000-01-01' OR dtSubmitDIR = '1000-01-01')";
                                                            break;
                                                        case "all":
                                                            $where = $where . "";
                                                            break;
                                                    }
                                                    if ($_POST['item_ID'] <> "")
                                                        $where = $where . " AND DET.item_ID='" . $_POST['item_ID'] . "' ";
                                                    $query = "SELECT  HEAD.ID, 
                                                                        HEAD.strKdLPBJ, 
                                                                        HEAD.strNmDivisiRequestor, 
                                                                        HEAD.strFullNameREQ, 
                                                                        HEAD.strFullNameSPV, 
                                                                        HEAD.strFullNameMGR, 
                                                                        HEAD.strFullNameDIR, 
                                                                        HEAD.dtCreate, 
                                                                        HEAD.dtSubmitSPV, 
                                                                        HEAD.dtSubmitMGR, 
                                                                        HEAD.dtSubmitDIR, 
                                                                        HEAD.stsDone, 
                                                                        list_item.strKdItem, 
                                                                        list_item.strDeskripsi, 
                                                                        DET.iJumlah, 
                                                                        DET.item_strUnit AS strUnit, 
                                                                        DET.iJumlahStok, 
                                                                        DET.strKeteranganREQ, 
                                                                        DET.strKeteranganSPV, 
                                                                        DET.strKeteranganMGR, 
                                                                        DET.strKeteranganDIR, 
                                                                        DET.dtDibutuhkan, 
                                                                        DET.stsACCSPV, 
                                                                        DET.stsACCMGR, 
                                                                        DET.stsACCDIR, 
                                                                        DEPT.strNmDept 
                                                                FROM tpc_h_lpbj AS HEAD 
                                                                LEFT JOIN tpc_d_lpbj AS DET ON HEAD.ID=DET.h_lpbj_ID 
                                                                LEFT JOIN item AS list_item ON DET.item_ID=list_item.ID 
                                                                LEFT JOIN tpc_dept AS DEPT ON DET.dept_ID=DEPT.ID 
                                                                WHERE   DET.stsAktif=1 AND 
                                                                        HEAD.stsAktif=1 AND 
                                                                        list_item.stsAktif=1 AND 
                                                                        (HEAD.dtCreate BETWEEN '" . $_POST['dtAwal'] . " 00:00:00' AND '" . $_POST['dtAkhir'] . " 23:59:59') 
                                                                " . $where;
                                                    $i = 1;
                                                    //echo $query;
                                                    $result = $MySQLi->query($query);
                                                    while ($row = $result->fetch_array()) {
                                                        if ($row['dtSubmitSPV'] == "1000-01-01")
                                                            $dtSubmitSPV = "Pending";
                                                        else $dtSubmitSPV = $row['dtSubmitSPV'];

                                                        if ($row['dtSubmitMGR'] == "1000-01-01")
                                                            $dtSubmitMGR = "Pending";
                                                        else $dtSubmitMGR = $row['dtSubmitMGR'];

                                                        if ($row['dtSubmitDIR'] == "1000-01-01")
                                                            $dtSubmitDIR = "Pending";
                                                        else $dtSubmitDIR = $row['dtSubmitDIR'];

                                                        switch ($row['stsACCSPV']) {
                                                            case 0:
                                                                $stsACCSPV = "REJECT";
                                                                break;
                                                            case 1:
                                                                $stsACCSPV = "OK";
                                                                break;
                                                            case 2:
                                                                $stsACCSPV = "not yet reviewed";
                                                                break;
                                                        }

                                                        switch ($row['stsACCMGR']) {
                                                            case 0:
                                                                $stsACCMGR = "REJECT";
                                                                break;
                                                            case 1:
                                                                $stsACCMGR = "OK";
                                                                break;
                                                            case 2:
                                                                $stsACCMGR = "not yet reviewed";
                                                                break;
                                                        }

                                                        switch ($row['stsACCDIR']) {
                                                            case 0:
                                                                $stsACCDIR = "REJECT";
                                                                break;
                                                            case 1:
                                                                $stsACCDIR = "OK";
                                                                break;
                                                            case 2:
                                                                $stsACCDIR = "not yet reviewed";
                                                                break;
                                                        }

                                                        $strKeterangan = $row['strKeteranganREQ'] . "<br>" . $row['strKeteranganSPV'] . "<br>" . $row['strKeteranganMGR'] . "<br>" . $row['strKeteranganDIR'];
                                                        $stsACC = "SPV: " . $stsACCSPV . "<br>MGR: " . $stsACCMGR . "<br>DIR: " . $stsACCDIR;
                                                        $stsItem = "";
                                                        if ($row['stsACCSPV'] > 0 && $row['stsACCMGR'] > 0 && $row['stsACCDIR'] > 0)
                                                            if ($row['stsACCSPV'] == 2 || $row['stsACCMGR'] == 2 || $row['stsACCDIR'] == 2)
                                                                $stsItem = "Pending Approval";
                                                            else $stsItem = "Disetujui";
                                                        else $stsItem = "Ditolak";

                                                        echo "<tr> 
                                                                    <td>" . $i . "</td> 
                                                                    <td>" . $row['strKdLPBJ'] . "</td> 
                                                                    <td>" . $row['strNmDivisiRequestor'] . "</td> 
                                                                    <td>" . $row['strFullNameREQ'] . " / " . $row['dtCreate'] . "</td> 
                                                                    <td>" . $row['strFullNameSPV'] . " / " . $dtSubmitSPV . "</td> 
                                                                    <td>" . $row['strFullNameMGR'] . " / " . $dtSubmitMGR . "</td> 
                                                                    <td>" . $row['strFullNameDIR'] . " / " . $dtSubmitDIR . "</td> 
                                                                    <td>" . $row['strKdItem'] . "</td> 
                                                                    <td>" . $row['strDeskripsi'] . "</td> 
                                                                    <td>" . $row['strNmDept'] . "</td> 
                                                                    <td>" . $row['iJumlah'] . "</td> 
                                                                    <td>" . $row['strUnit'] . "</td> 
                                                                    <td>" . $row['iJumlahStok'] . "</td> 
                                                                    <td>" . $strKeterangan . "</td> 
                                                                    <td>" . $stsACC . "</td> 
                                                                    <td>" . $stsItem . "</td> 
                                                                    <td>" . $row['dtDibutuhkan'] . "</td> 
                                                                </tr>";
                                                        $i++;
                                                    }
                                                    ?>
                                                </tbody>
                                                <tfoot>
                                                    <tr>
                                                        <th>No</th>
                                                        <th>Kode LPBJ</th>
                                                        <th>Divisi</th>
                                                        <th>Requestor</th>
                                                        <th>SPV</th>
                                                        <th>MGR</th>
                                                        <th>DIR</th>
                                                        <th>Kode Barang</th>
                                                        <th>Deskripsi</th>
                                                        <th>Departement</th>
                                                        <th>Jumlah</th>
                                                        <th>Satuan</th>
                                                        <th>Jumlah Stok</th>
                                                        <th>Keterangan</th>
                                                        <th>Persetujuan</th>
                                                        <th>Status</th>
                                                        <th>Prioritas</th>
                                                    </tr>
                                                </tfoot>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!-- ============================================================== -->
                            <!-- end data table  -->
                            <!-- ============================================================== -->

                    <?php
                            }
                    }
                    ?>
                </div>
            </div>
            <!-- ============================================================== -->
            <!-- footer -->
            <!-- ============================================================== -->
            <div class="footer">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12">
                            Copyright © 2024 TPC-PACK, Developed By <a href="mailto: jockie@netportal.my.id">JC Comp</a>.
                        </div>
                        <!--<div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12">
                            <div class="text-md-right footer-links d-none d-sm-block">
                                <a href="javascript: void(0);">About</a>
                                <a href="javascript: void(0);">Support</a>
                                <a href="javascript: void(0);">Contact Us</a>
                            </div>
                        </div>-->
                    </div>
                </div>
            </div>
            <!-- ============================================================== -->
            <!-- end footer -->
            <!-- ============================================================== -->
        </div>
        <script>
            function changeValue() {
                var input = document.getElementById("list_item");
                var selectedValue = input.value;
                var realValue = document.querySelector('option[value="' + selectedValue + '"]').getAttribute("data-realvalue");
                input.value = realValue;
            }
        </script>