<style type="text/css">
table {
	border-collapse: collapse;
}

th {
	border: 1px solid #000;
}
.border {
	border: 1px solid #000;
}
</style>

<table>
<tr>
	<td colspan="4">{{ $judul }}</td>
</tr>
<tr>
	<td colspan="2">Priode</td>
	<td colspan="2">: {{ $periode }}</td>
</tr>
</table>
<br>
<table>
	<thead>
		<tr>
			<th>No</th>
			<th>Tanggal</th>
			<th>No. Order</th>
			<th>Nama Penyedia</th>
			<th>Keterangan</th>
			<th>Qty</th>
			<th>Harga Satuan</th>
			<th>Jumlah</th>
		</tr>
	</thead>
	<tbody>
		<?php
		$total = 0;
		$no = 1;
		if(sizeof($data) > 0){
			foreach($data as $d){
				echo "<tr>
						<td class='border'>".$no."</td>
						<td class='border'>".tgl_full($d->tanggal_nota, '')."</td>
						<td class='border'>".$d->no_nota."".$d->sufix_no_nota."</td>
						<td class='border'>".$d->nama."</td>
						<td class='border'>".$d->deskripsi."</td>
						<td class='border'>".$d->jumlah."</td>
						<td class='border'>".$d->harga_satuan."</td>
						<td class='border'>".$d->total."</td>
					</tr>";
				$no++;
				$total += $d->total;
			}
		}
		?>
		<tr>
			<td colspan="7" style="text-align: right;" class="border">Total Order Service</td>
			<td class="text-right border"><?= $total ?></td>
		</tr>
	</tbody>
</table>