<table class="table table-sm table-bordered">
    <thead>
        <th>#</th>
        <th>Doc Number</th>
        <th>Tanggal</th>
        <th>Sku</th>
        <th>Nama Barang</th>
        <th style='text-align: right;'>IT</th>
        <th style='text-align: right;'>Receiving</th>
        <th style='text-align: right;'>Balance</th>
    </thead>
    <tbody>
        <?php
        $i = 1;
        foreach ($data as $d) {
            echo "<tr>";
            echo "<td>" . $i . "</td>";
            echo "<td>" . $d['doc_tf'] . "</td>";
            echo "<td>" . $d['tgl'] . "</td>";
            echo "<td>" . $d['sku'] . "</td>";
            echo "<td>" . $d['barang'] . "</td>";
            echo "<td style='text-align: right;'>" . $d['IT'] . "</td>";
            echo "<td style='text-align: right;'>" . $d['Recv'] . "</td>";
            echo "<td style='text-align: right;'>" . $d['balance'] . "</td>";
            echo "</tr>";
            $i++;
        }
        ?>
    </tbody>
</table>