<?php 
include "../config.php";
if(isset($_POST['search'])){
    $search = $_POST['search'];
    $query = "SELECT * FROM lr_mst WHERE lr_no like '%$search%' AND lhc_status = 'N' AND `company_id` = '".$_SESSION['company_id']."' AND `branch_id` = '".$_SESSION['branch_id']."'";
    $result = mysqli_query($conn,$query);
    while($row = mysqli_fetch_assoc($result) ){
        $response[] = $row;
    }
	echo json_encode($response);
}
exit;