									<?php
									

									$sqlxy = "SELECT *, (select product_name from products where id=purchases.product_id)as product_name, (select symbol from units where UnitID=(select Units from products where id=purchases.product_id))as units  from purchases where purchase_id='$iddx'";
									$resultp = mysqli_query($conn, $sqlxy);



?>
									<table class="table table-bordered" width="100%">
						              
						              <tbody  >
						              <?php
						                  // output data of each row
    while($rown = mysqli_fetch_assoc($resultp)) {
?>
                                      <tr>
						                  			                  
						                  <td width="20%"><?php echo $rown['product_name']; ?></td>
						                  <td width="15%"><?php echo $rown['quantity']." ".$rown['units']; ?></td>
						                  <td width="15%"><?php echo $rown['unit_price']; ?></td>
						                  <td width="15%"><?php echo $rown['quantity']*$rown['unit_price']; ?></td>
						                  <td width="15%"><?php echo $rown['batch_no']; ?></td>
						                  <td width="15%"><?php echo $rown['expiry_date'] ?></td>
						                  
						                </tr>
						                <?php
       
    }

?>
						                
						                
						              </tbody>
						            </table>