<?php $PageSecurity = 2;
include('includes/DefineSuppTransClass.php');
include('includes/DefinePOClass.php');
include('includes/SQL_CommonFunctions.inc');
include('includes/session.inc');
//echo $_GET['issueno'];
 //echo $_GET['q'];
 if($_GET['issueno']=='1')
 {
 	?>
 	<br>
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="thborder">
  <tr>
  	<th width="5%">Return</th>
    <th width="10%">Asset Code</th>
    <th>Asset Name</th>
    <th width="6%">UOM</th>
    <th width="6%">Quantity</th>
    <th width="15%">Remarks</th>
    <th width="8%">Return Date</th>
    <th width="15%">Remarks</th>
    <th width="10%">Working Status</th>
  </tr>
<?php
 	$i=0;
	$sql_query=DB_query("SELECT * FROM asset_issue_details where issue_id='".$_GET['q']."' and returning_status='0' ", $db);
	while($row=DB_fetch_array($sql_query))
	{
	$itemcode=DB_query("select * from machine_center where id='".$row['mst_itemid']."'",$db);	
	$itemcode1=DB_fetch_array($itemcode); 
	
	$unitdata=DB_query("select * from unitsofmeasure where unitid='".$itemcode1['unit']."'",$db);	
	$unitelement=DB_fetch_array($unitdata);
	
	$issuid=$row['issue_id'];
	$i++;
	
	?>
		<tr>
			<td ><input type="checkbox" value="<?php echo $row['id']; ?>" class="check_validate" name="issue_detail_id[]"></td>
			<td ><?php echo $itemcode1['code']; ?>			
			<input type="hidden" name="itemid[<?php echo $row['id'] ?>]" id="itemid" value="<?php echo $row['mst_itemid']; ?>" /></td>
			<td ><?php echo $itemcode1['name']; ?></td>
			<td ><?php echo $unitelement['unitname'];  ?></td>
			<td>1</td>
			<td ><?php echo $row['remarks'];  ?></td>
			<td ><?php echo ConvertSQLDate($row['return_date']);  ?></td>
			<td><input type="text" name="return_rem[<?php echo $row['id'] ?>]" placeholder="Comment"></td>
			<td><select name="working_status[<?php echo $row['id'] ?>]">
				<option value="Y">Yes</option>
				<option value="N">No</option>
			</select></td>			
		</tr>
<?php	} ?>
</table>
	


<?php  } ?>


