<link rel="stylesheet" href="css/jquery-ui.css" />
<link rel="stylesheet" href="css/jquery.autocomplete.css" type="text/css" />
<script src="js/jquery/jquery.js" type="text/javascript"></script>
<script src="js/jquery/jquery-1.8.2.js"></script>
<script src="js/jquery/jquery-ui.js"></script>
<script type="text/javascript" src="js/jquery/autocomplete_jquery_plugin.js"></script>
<script src="js/enter_event_ajax.js" type="text/javascript"></script>
<script src="js/return_ajax.js" type="text/javascript"></script>
<script>
function return_edit(edit_id,job_no)
{
window.location.href="main_fram.php?file=consumable_return_form&edit_id="+edit_id+"&job_no="+job_no;
}

function return_form_open()
{
window.location.href="main_fram.php?file=consumable_return_form";
window.location.reaload(true);
}
//////////auto completed/////////////////////////
var sm = jQuery.noConflict();
sm().ready(function() 
{ 
	sm("#return_no").autocomplete("include/autocomplete/return_no_autocomplete.php", {
	width: 250,
	matchContains: true,
	selectFirst: true
	});	
});
////////////////////////////////////////////////////
function return_conform_search(from_date,to_date,return_no)
 {
  jQuery.ajax({
  type: "GET",
  url: "consumable/consumable_return_form/consumable_return.php",
  data: "from_date="+from_date+"&to_date="+to_date+"&return_no="+return_no,
  success: function(msg){jQuery("#return_media_ink").html(msg);
 }
    });
 }
</script>
<?php
error_reporting(0);
date_default_timezone_set('Asia/Kolkata');
$edit_id=$_GET['edit_id'];
include ("include/db.php");
if($_GET['edit_id']!='')
{
$user_table_display_style='style="display:inline;"';
} 
else
{
$user_table_display_styles='style="display:none;"';
}
ob_start();
session_start();
$session_branch=$_SESSION['branch'];
$session_user_type=$_SESSION['user_type'];
?>

<style type="text/css">
.style7{font-family: Tahoma, Arial, Helvetica, sans-serif;font-size: 13px;}
.style9{ text-align:left;font-family:Tahoma, Arial, Helvetica, sans-serif; font-size: 15px; padding:0px; font-weight: 600;color:#333;letter-spacing: 1px;padding:10px; background-color:#f7f7f7;}
.types_class { 
    height: 25px; 
    width: 230px; 
    background-color: transparent;  
    border-style: solid;  
    border-width: 0px 0px 1px 0px;  
    border-color:#CCC; 
    outline:0;
	font-size:14px;
  } 
  
  .types_class1 { 
    height: 25px; 
    width: 230px; 
    background-color: transparent;  
    border-style: solid;  
    border-width: 0px 0px 1px 0px;  
    border-color:#CCC; 
    outline:0;
	font-size:14px;
  } 
.textbox:focus {
    border-color: #C9C9C9;
    -webkit-box-shadow: rgba(0, 0, 0, 0.15) 0 0 8px;
}  
</style>

<div class="container">
<div class="row-fluid">
<div class="span12">
<div class="table-responsive">
<form name="local_delivery_form"  id="local_delivery_form" method="post" action=""  enctype="multipart/form-data">

<table width="100%" border="0" align="center" style="border-top:solid 1px; color:#ddd;">
   <tr align="left"><div class="style9">Consumable Return Form&nbsp;&nbsp;
   <td width="25%" align="left"><img src="img/plus.png" name="add_button" id="add_button" title="ADD" onclick="javascript:return_form_open()" align="top" width="30" height="30" border="0" tabindex="4" style="cursor:pointer; margin-left:20%; margin-top:-38px;" class="button green-button" >
</td></div><tr></table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="2%" height="45" align="right" class="style7">&nbsp;</td>
<td width="9%" align="right" class="style7"><strong>From Date</strong></td> 
<td width="14%" align="center"><input type="date" class="types_class1" name="from_date" id="from_date"  style="height:23px; width:150px" value="<?php  echo date("Y-m-d");?>"  /></td>
<td width="7%" align="right" class="style7"><strong>To Date</strong></td>
<td width="17%" align="center" class="style15"><input type="date" class="types_class1" name="to_date" id="to_date" style="height:23px;width:150px;" value="<?php echo date("Y-m-d");?>" /></td>

<td width="7%" align="right" class="style7"><strong>Return No</strong></td>
<td width="19%" align="center" class="style15"><input type="text" class="types_class1" name="return_no" id="return_no" style="height:23px;width:150px;" value="" /></td>


<td width="18%" align="left" class="style15"><strong></strong><a href="#"  onclick="return_conform_search(from_date.value,to_date.value,return_no.value)"><img src="img/search_icon.png" width="40" height="35" title="Search" value="Search" /></a></td>
<td width="7%" align="center">&nbsp;</td>
</tr>
</table>
<table width="100%" >
<tr>
   <td colspan="3" align="center"><div id="return_media_ink"><?php include("consumable_return.php"); ?></div></td>
</tr>
</table>
</form>

</div>
</div>
</div>
</div>