<!-- Table with stripped rows -->
<table class="table table-hover" id="tabelkeranjang">
<thead>
<tr>
    <th scope="col">Tanggal</th>
    <th scope="col">Kode Member</th>
    <th scope="col">Nama Member</th>
    <th scope="col">Jenis Transaksi</th>
    <th scope="col">Jumlah Poin</th>
</tr>
</thead>
<tbody>
<?php
$total=0;
foreach ($datapoin as $hasil) {
    ?>
    <tr>
        <td><?php echo date('d-m-Y H:i:s',strtotime($hasil->tanggal)) ?></td>
        <td><?php echo $hasil->kode_member ?></td>
        <td><?php echo $hasil->member ?></td>
        <td><?php echo $hasil->transaksi ?></td>
        <td><?php echo number_format($hasil->jumlah_poin,0,',','.') ?></td>
    </tr>
    <?php
    $total=$total+$hasil->jumlah_poin;
}
?>
</tbody>
<tfoot>
<tr>
    <th colspan="4">Jumlah Total</th>
    <th><?php echo number_format($total,0,',','.') ?></th>
</tr>
</tfoot>
</table>
<!-- End Table with stripped rows -->