                <div class="row">
                  <div class="col">
                    <div class="card">
                      <div class="card-body table-responsive" style="max-height: 65vh; overflow-y: auto;">

                        <table id="zero-conf" class="display table" style="width:100%" data-order="[]">
                          <thead>
                            <tr>
                              <th>#</th>
                              <th>Customer Name</th>
                              <th>Brand Name</th>
                              <th>Amount</th>
                              <th>Status</th>
                              <th>Date</th>
                              <th>Action</th>
                            </tr>
                          </thead>
                          <tbody>
                            <?php

                            if (!empty($items)) {
                              $i = 0;
                              foreach ($items as $item) {
                                $item_status        = show_item_status($controller_name, $item['ids'], $item['status'], 'switch', '', 'user');
                                $show_item_buttons  = show_item_button_action($controller_name, $item['ids'], '', '', 'user');
                                $i++;
                            ?>
                                <tr class="tr_<?= $item['ids'] ?>">
                                  <td>
                                    <?= $i ?> 
                                    <span class="badge bg-primary cursor-pointer group-text ms-2" data-value="<?= base_url('invoice/' . $item['ids']) ?>" title="Copy Invoice Link">
                                      <i class="fas fa-copy"></i> Copy Link
                                    </span>
                                  </td>
                                  <td><?= !empty($item['customer_name']) ? $item['customer_name'] : '-' ?></td>
                                  <td><span class="badge bg-label-primary"><?= !empty($item['brand_name']) ? $item['brand_name'] : 'Unknown Brand' ?></span></td>
                                  <td>
                                    <strong><?= currency_format($item['customer_amount']) ?></strong> 
                                    <span class="badge bg-info"><?= $item['pay_status'] == 1 ? 'Pending' : ($item['pay_status'] == 2 ? 'Paid' : 'Unpaid') ?></span>
                                    <?php if (!empty($item['transaction_id'])) { ?> 
                                      <br><small class="text-muted" style="font-size: 11px;">TRX: <?= $item['transaction_id'] ?></small> 
                                    <?php } ?>
                                  </td>
                                  <td><?= $item_status ?></td>
                                  <td><?= show_item_datetime($item['created_at'], 'short'); ?></td>
                                  <td><?= $show_item_buttons ?></td>
                                </tr>

                            <?php
                              }
                            }

                            ?>



                          </tbody>

                        </table>
                      </div>
                    </div>
                  </div>
                </div>
                <?= link_asset("js/dataTables/datatables.min.css") ?>
                <?= script_asset('js/dataTables/datatables.min.js') ?>
                <?= script_asset('js/datatables.js') ?>

                <script type="text/javascript">
                  $(".group-text").click(function() {
                    let v = $(this).data("value");
                    var params = {
                      'type': 'text',
                      'value': v,
                    };
                    copyToClipBoard(params, 'toast')
                  });
                </script>