<?php

require_once("../config/configDB.php"); 
//productID='".$_GET['pid']."' and

$cid= $_GET['cid'];
$pid= $_GET['pid'];
$result = mysqli_query($conn,"SELECT purchase_rate,gst  FROM product_master WHERE isdelete='1' and id='".$pid."'   ");

// echo "SELECT purchase_rate,gst  FROM product_master WHERE isdelete='1' and id='".$pid."'   ";

$res = array(); 
		
while($row = mysqli_fetch_array($result)){

$gst="0";
	
	
		$salerate= number_format(($row['purchase_rate']),2,'.','');
		//$salerate= number_format(($row['purchase_rate']*100/$gst),2,'.','');
	

	array_push($res, array(
		
		"sale_rate"=>number_format(($salerate),2,'.',''),
		"gst"=>$gst
        	) 
 		);
 	}
 	echo json_encode($res);

//echo "tesing".$_GET['key'];




?>