<?php if (!empty($detail)): ?>
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead class="table-light">
    <tr>
        <th>No</th>
        <th>Kode</th>
        <th>Nama Barang</th>
        <th>Barcode</th>
        <th>Gudang</th>
        <th>Qty</th>
        <th>Tanggal</th>
        <th>Keterangan</th>
        <th>Created By</th>
    </tr>
</thead>
<tbody>
    <?php $no = 1; foreach ($detail as $row): ?>
        <tr>
            <td><?= $no++ ?></td>
            <td><?= esc($row['kode']) ?></td>
            <td><?= esc($row['nama_item']) ?></td>
            <td><?= esc($row['barcode']) ?></td>
            <td><?= esc($row['nama_gudang']) ?></td>
            <td><?= esc($row['qty']) ?></td>
            <td><?= esc($row['tanggal_keluar']) ?></td>
            <td><?= esc($row['keterangan']) ?></td>
            <td><?= esc($row['created_by']) ?></td>
        </tr>
    <?php endforeach ?>
</tbody>

        </table>
    </div>
<?php else: ?>
    <p class="text-muted">Data tidak ditemukan.</p>
<?php endif ?>
