<?php
include('../config.php');
$consignor_name = $_POST['consignor_name'];
$sql1 		= "SELECT * FROM lr_mst WHERE lr_no like '%". $consignor_name ."%' AND branch_id = '".$_SESSION['branch_id']."' AND company_id = '".$_SESSION['company_id']."'";
$res1 		= mysqli_query($conn,$sql1);
$num_rows1 	= mysqli_num_rows($res1);
if (!empty($num_rows1)) {
	if(mysqli_num_rows($res1) > 0){
		$row   = mysqli_fetch_assoc($res1);
		$lr_no = $row['lr_no'];	
	}
	$row['lr_no'] = ($lr_no);
	echo json_encode($row);die();
}else{
	echo json_encode(array());die();
}

?>

