<?php include "../koneksi.php"; ?>
<div style="width:100%;height500px;overflow:scroll;" >
<table class="table table-bordered">
        <thead>
		<tr>
			<th width="5%">
				Tanggal
			</th>
			<th width="60%">
				Product
			</th>
			<th width="20%">
				No.DN
			</th>
			<th width="10%">
				QtyKirim
			</th>
		</tr>
		</thead>
		<tbody>
			<?php 
				$data = mysqli_query ($koneksi, " select 
															deliverytbl.Del_ID,
															deliverytbl.DateKirim,
															deliverytbl.DetailPO_ID,
															detail_po.PO_ID,
															po_tbl.No_PO,
															po_tbl.CustomerID,
															customer.CustomerName,
															detail_po.ProductID,
															product.ItemDescription,
															product.SLoc,
															product.QtyUnit,
															deliverytbl.DetailEkspedisi_ID,
															detailekspedisi.EkspedisiID,
															ekspedisi.Ekspedisi,
															detailekspedisi.Sopir,
															deliverytbl.NoDN,		
															deliverytbl.QtyKirim		
											from 
											deliverytbl
											INNER JOIN detail_po
											ON deliverytbl.DetailPO_ID=detail_po.DetailPO_ID
											INNER JOIN po_tbl
											ON detail_po.PO_ID=po_tbl.PO_ID
											INNER JOIN customer
											ON po_tbl.CustomerID=customer.CustomerID
											INNER JOIN product
											ON detail_po.ProductID=product.ProductID
											INNER JOIN detailekspedisi
											ON deliverytbl.DetailEkspedisi_ID=detailekspedisi.DetailEkspedisi_ID
											INNER JOIN ekspedisi
											ON detailekspedisi.EkspedisiID=ekspedisi.EkspedisiID
											WHERE detail_po.PO_ID ='$_GET[id]'
											order by Del_ID DESC");
				
				while($row = mysqli_fetch_array ($data)):
			?>
		<tr>
			<td width="5%">
				<?php echo date ("d-m-Y", strtotime($row['DateKirim'])); ?>
			</td>
			<td width="60%">
				<?php echo $row['ItemDescription']; ?>
			</td>
			<td width="20%">
				<?php echo $row['NoDN']; ?>
			</td>
			<td width="15%">
				<?php echo $row['QtyKirim']; ?>
				<?php echo substr($row['SLoc'], 0, 3); ?>
			</td>
		</tr>
			<?php endwhile; ?>
		</tbody>
	</table>
	</div>
		