<div class="col-lg-12">
    <div class="row">
        <?php
        foreach ($data as $d) {
        ?>
            <div class="col-xxl-4 col-md-4" style="cursor:pointer;" <?php echo "onclick='f_scan(" . $d['id_retur'] . ",1)'" ?>>
                <div class="card info-card sales-card">
                    <div class="card-body">
                        <h5 class="card-title"><i class='bi bi-truck'></i>&nbsp;<?= $d['no_pol'] ?> <span>| <?= $d['id_customer'] ?></span>
                        </h5>
                        <!--
                        <button type="button" class="btn btn-success" style="float:left"><i class="bi bi-hand-thumbs-up"></i>&nbsp;BAGUS</button>
                        <button type="button" class="btn btn-danger" style="float:right"><i class="bi bi-hand-thumbs-down"></i>&nbsp;RUSAK</button><br>                        
                        <br>-->
                        <div class="d-flex align-items-center">
                            <div class="ps-0">
                                <h6><?= $d['no_sj_retur'] ?></h6>
                            </div>
                        </div>
                        <?php
                        $data_dtl = $this->M_qc->hitung_scan_terima($d['id_retur']);
                        echo "<table class='table table-sm table-striped'>";
                        $i = 1;
                        foreach ($data_dtl as $dtl) {
                            echo "<tr>";
                            echo "<td>" . $dtl['barang']  . "</td>";
                            echo "<td style='text-align: right;'><span class='badge bg-danger rounded-pill'>" . $dtl['hitung'] . "</span></td>";
                            echo "</tr>";
                            $i++;
                        }
                        echo "</table>";
                        ?>
                    </div>
                </div>
            </div>
        <?php
        } ?>
    </div>
</div>