<?php $no=1; $total=(float)($total_komisi_page??0); ?>
<div class="d-flex justify-content-between mb-3"><span class="text-muted">Ringkasan komisi penjualan untuk halaman ini.</span><strong>Total Komisi Page: <?=rp($total);?></strong></div>
<div class="table-responsive"><table class="table table-striped table-hover"><thead><tr><th>No</th><th>Tanggal</th><th>No. Order</th><th>Pelanggan</th><th>Kasir</th><th>Karyawan Penjualan</th><th class="text-right">Total Order</th><th class="text-right">Komisi</th></tr></thead><tbody>
<?php if($posts): foreach($posts as $row): ?><tr><td><?=$no++;?></td><td><?=htmlspecialchars(tgl_indo($row['tgl_trx']),ENT_QUOTES,'UTF-8');?></td><td><?=htmlspecialchars($row['id_transaksi'],ENT_QUOTES,'UTF-8');?></td><td><?=htmlspecialchars($row['nama_pelanggan'],ENT_QUOTES,'UTF-8');?></td><td><?=htmlspecialchars($row['nama_kasir'],ENT_QUOTES,'UTF-8');?></td><td><?=htmlspecialchars($row['nama_sales'],ENT_QUOTES,'UTF-8');?></td><td class="text-right"><?=rp($row['total_bayar']);?></td><td class="text-right"><strong><?=rp($row['komisi_penjualan_nominal']);?></strong></td></tr><?php endforeach; else: ?><tr><td colspan="8" class="text-center">Belum ada data komisi penjualan.</td></tr><?php endif; ?>
</tbody><tfoot><tr><th colspan="7" class="text-right">Total Komisi</th><th class="text-right"><?=rp($total);?></th></tr></tfoot></table></div><div class="mt-3"><?=$this->ajax_pagination->create_links();?></div>
