<?php 
session_start();
include('../includes/dbcon.php');

$str=" ";

$data = array();

$edate=date("Y-m-d");
$userid=$_SESSION['rm_id'];

if (isset($_POST['grnd_no'])) {
 	$grnd_no = trim($_POST['grnd_no']);
 	//$grnd_no = 101;
 	//echo $grnd_no;
	        	$sqlsp=mysqli_query($con,"SELECT  * from view_grn_temp_detail where grnd_no=$grnd_no order by se  ")or die(mysqli_error($con));
	        	$count=mysqli_num_rows($sqlsp);	
	        	if ($count>0) {
	        		while($rowsp=mysqli_fetch_array($sqlsp)){			
					 $data[]=$rowsp;				
				   }	

				    echo json_encode($data);
	        	}//	if ($count>0) {
exit();
	        	 //echo 'hello';
	  


} ///// if (isset($_POST['category'])) {

?>