<div class="noprint">
<div class="row">
<div class="col-md-12">
<h1>Daftar Invoice</h1>
<table class="table table-bordered table-hovered">
<thead>
<tr>
<th>No</th>
<th>No. Invoce</th>
<th>Tanggal</th>
<th>Nama Pelanggan</th>
<th>Alamat Plenggan</th>
<th>Total Pembelian</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
if(isset($ListInvoice)){
$NoUrut=null;
foreach($ListInvoice as $row){
$NoUrut++;
echo '<tr>
<td>'.$NoUrut.'</td>
<td>'.$row['no_kwitansi'].'</td>
<td>'.$row['tgl_kwitansi'].'</td>
<td>'.$row['nama_pelanggan'].'</td>
<td>'.$row['alamat_pelanggan'].'</td>
<td align="right">'.number_format($row['total_bayar'],0,',','.').'</td>
<td>
<a href="#ModalDetail"
id="'.$row['no_kwitansi'].'|'.$row['tgl_kwitansi'].'|'.$row['nama_pelanggan'].'|'.$row['alamat_pelanggan'].'|'.number_format($row['total_bayar'],0,',','.').'|'.preg_replace( "/\n/", "", str_replace(",","",$row['data_invoice'])).'" data-toggle="modal" class="detail-invoice"><i class="fa fa-print"></i></a>
</td>
</tr>';
}
}
?>
</tbody>
</table>
</div>
</div>
</div><!-- end noprint-->
<!-- Modal -->
<div class="modal fade modal-wide" id="ModalDetail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel"><span class="fa fa-money"></span> Invoice</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body" id="IsiModal">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" OnClick="javascript:window.print()"><span class="fa fa-print"></span> Cetak</button>
<button type="button" class="btn btn-primary" data-dismiss="modal"><span class="fa fa-close"></span> Tutup</button>
</div>
</div>
</div>
</div>
<!-- akhir kode modal dialog -->