<table class="table table-hover" id="tabelkeranjang" style="width: 100%;">
<thead>
<tr>
    <th scope="col">Kode Barang</th>
    <th scope="col">Barcode</th>
    <th scope="col">Nama Barang</th>
    <th scope="col">Jumlah</th>
    <th scope="col">Total Harga</th>
    <th scope="col">Nama Pegawai</th>
    <th scope="col" width="2%"></th>
</tr>
</thead>
<tbody>
<?php
foreach ($databarang as $hasil) {
    ?>
    <tr>
        <td><?php echo $hasil->kode_barang ?></td>
        <td><?php echo $hasil->barcode ?></td>
        <td><?php echo $hasil->barang ?></td>
        <td><?php echo $hasil->jumlah ?></td>
        <td><?php echo number_format($hasil->jum_harga,0,',','.') ?></td>
        <td><button type="button" title="Pilih" onclick="konfirhapus(this.value)" class="btn btn-danger btn-sm" value="<?php echo $hasil->token ?>"><i class="bi bi-trash"></i></button></td>
    </tr>
    <?php
}
?>
</tbody>
</table>