<?php
	include("connect.php");

	//error_reporting(0);
	/* echo $eve="SELECT * FROM res_quotation_master where qstatus in('In Review','Converted To Sales') and partymid=".$_POST['skills'];
		echo '<option value="'.$eve.'">'.$eve.'</option>';
		return; */
		
	if(isset($_POST["skills"]) && !empty($_POST["skills"])){
	    //Get all state data
			 /*  $eve="SELECT * FROM res_quotation_master where qstatus in('In Review','Converted To Sales') and custid=".$_GET['skills']; */
		
		$eve="SELECT * FROM res_quotation_master where qstatus in('In Review','Converted To Sales') and partymid=".$_POST['skills'];
		/* echo '<option value="'.$eve.'">'.$eve.'</option>';
		return; */
		$re = mysqli_query($conn, $eve);
		
		//Count total number of rows
		if(mysqli_num_rows($re) > 0)
		{
			echo '<option value="0">Select Quotation</option>';
			while($rt = mysqli_fetch_assoc($re))
			{
				$qdate=implode('-', array_reverse(explode('-', $rt['qdate'])));
				
	            echo '<option value="'.$rt['qmid'].'">'.$rt['qnofordisplay'].'('.$qdate.')</option>';
			}
		}
		else
		{
			echo '<option>Select Quotation</option>';
		}
	}
?>
