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



?>

