

<?php  
require_once("config/configDB.php"); 
require "financial_year_calculation.php";
$accountyear    = $financialYearStart."-".$financialYearEnd;

if(!isset($_SESSION))  { session_start(); }
if(isset($_POST["query"]))  
 {  
	if($_POST["query"]!=""){
      $output = '';  
	  $pid=$_POST["query"];
	  
	 
	 
	 $product_list = [];
	 $row_sno = mysqli_query($conn,"SELECT purchase_prate from purchasedetails where productID = '$pid' and status='' ");
	 
	 
	 
	 while($product_data = mysqli_fetch_array($row_sno)){
		
		$product_list[]= (object)['prate'=>$product_data['purchase_prate']];
	 }
		$product_data_output = json_encode($product_list);
		//echo $product_data_output;
		
 $output = $product_data_output.'||';
	}  
 }
echo $output;  
 ?>  

