<?php 
include "../koneksi.php";
$data = mysqli_query ($koneksi, " SELECT 
                                        detail_po.DetailPO_ID,
                                        product.ProductID,
                                        product.SLoc,
                                        product.QtyUnit,
                                        stpj.PlanID,
                                        stpj.Del_ID,
                                        sum(stpj.Qty) as jml
                                FROM detail_po
                                INNER JOIN product
                                ON detail_po.ProductID=product.ProductID
                                INNER JOIN plan
                                ON detail_po.ProductID=plan.ProductID
                                INNER JOIN stpj
                                ON plan.PlanID=stpj.PlanID
                                WHERE stpj.Del_ID IS NULL AND detail_po.DetailPO_ID='$_GET[product]'");
$row = mysqli_fetch_array ($data);
?>

<span>Stok: <?php echo $row['jml']; ?><?php echo substr($row['SLoc'], 0, 3); ?>@<?php echo $row['QtyUnit']; ?>pcs</span>
<input type="hidden" class="form-control" id="product" name="product" value="<?php echo  $row['ProductID']; ?>">