<div class="container-fluid">
    <h4>Invoice Pemesanan Produk</h4>


<?php if($invoice != null):?>
    <table class="table table-bordered table-hover table-striped">
        <tr>
            <th><center>Tanggal Pemesanan</center></th>
            <th><center>Nama Pemesanan</center></th>
            <th><center>Alamat Pengiriman</center></th>
            <th><center>Batas Pembayaran</center></th>
            <th><center>Keterangan</center></th>
            <th><center>Nomor Tlp.</center></th>
            <th><center>Pengiriman</center></th>
            <th><center>Rekening</center></th>
            <!-- <th align="center" colspan="2"><center>Aksi</center></th> -->
        </tr>

        <?php foreach ($invoice as $inv):  ?>
        <tr>
            <td><?php echo $inv->tgl_pesan ?></td>
            <td><?php echo $inv->nama ?></td>
            <td><?php echo $inv->alamat ?></td>
            <td><?php echo $inv->batas_bayar ?></td>
            <td>
            <?php if($inv->ket == 1):?>
            <a class="badge badge-success">LUNAS</a></td>
            <?php elseif($inv->ket == 0):?>
            <a class="badge badge-danger">BELUM LUNAS</a></td>
            <?php else:?>
            <a class="badge badge-warning">PERLU DI CEK</a></td>
            <?php endif;?>
            <td><?=$inv->nomor?></td>
            <td><?=$inv->pengiriman?></td>
            <td><?=$inv->rekening?></td>
            <!-- <td> <?php echo anchor('admin/invoice/detail/' .$inv->id, '<div class="btn btn-sm btn-primary">Detail</div>') ?></td> -->
        </tr>
    <?php endforeach; ?>
    </table>
    <?php else:?>
        <h1>Hasil Tidak Ditemukan</h1>
    <?php endif;?>
</div>