<?php 
	include("../config.php");
	$lr_no 	 = strtoupper($prifix) . '/' . str_pad(($_POST['lr_no']), 5, '0', STR_PAD_LEFT);
	$select  = "SELECT * FROM `billing` WHERE invoice_no = '".$lr_no."' AND company_id = '".$_SESSION['company_id']."' AND branch_id = '".$_SESSION['branch_id']."' ORDER BY id asc";
	$result  = mysqli_query($conn,$select);
	
	if(mysqli_num_rows($result) != 0) {
		$data = array('status' => 1);
	} else {
		$data = array('status' => 0);
	}

	echo json_encode($data);
	die();
?>