<?php

$PageSecurity = 11;
//echo $_SERVER['QUERY_STRING'];exit;
include('includes/DefineSuppTransClass.php');
include('includes/DefinePOClass.php');
include('includes/SQL_CommonFunctions.inc');

include('includes/session.inc');
			$q=$_GET['mrnno'];
			$exp = explode(",",$q);
			$sql="Select * from qualityposting Where MRNID='".$exp[0]."' AND `status`='Pending'";
 			$result = DB_query($sql,$db);
 			$numrows = DB_num_rows($result);
?>
<table width="100%" border="2" cellspacing="0" cellpadding="0" id="txtitem">
<?php
if($numrows>0)
{
 	for($i=1; $i<=$numrows; $i++)
	{ 
	     $myrow=DB_Fetch_array($result);
?>
   <tr>
     <td width="11%">
	 
	 <input type="hidden" name="mrnid" id="mrnid" value="<?php echo $q;?>" />
	
	 <input type="text"  readonly=""  name="itemcode[<?php echo $i;?>]"size="15" value="<?php echo $myrow['ItemCode'];?>" /></td>
     <td width="12%">
	 <input type="text" name="desc1[<?php echo $i;?>]"   size="20" value="<?php echo $myrow['desc'];?>"/>	 </td>
     <td width="5%">
	 <input name="MRNUnit1[<?php echo $i;?>]" type="text"  size="10" value="<?php echo $myrow['Unit']; ?>" />	 </td>
     <td width="6%">
	 <input name="MRNchallanQty1[<?php echo $i;?>]" type="text"  size="10" value="<?php echo $myrow['ChallanQty']; ?>" />	 </td>
     <td width="6%">
	 <input name="MRNstorage1[<?php echo $i;?>]" type="text"  size="10" value="<?php echo $myrow['Shortage']; ?>" />	 </td>
     <td width="6%">
	 <input name="MRNusable1[<?php echo $i;?>]" type="text"  size="10"  value="<?php echo $myrow['Usable']; ?>"/>	 </td>
     <td width="8%">
	 <input type="text" name="MRNrejectqty1[<?php echo $i;?>]"  size="13" value="<?php echo $myrow['RejectedQty']; ?>"  />	 </td>
     <td width="8%">
	 <input type="text" name="MRNpassqty1[<?php echo $i;?>]"  size="13" value="<?php echo $myrow['PassedQty']; ?>"  />	 </td>
     <td width="27%">
	 <input type="text" name="MRNremarks1[<?php echo $i;?>]"  size="20"  value="<?php echo $myrow['Remarks']; ?>"  />	 </td>
     <td width="4%"><a href="Qualitypostingedit.php?mrnid=<?php echo $exp[0];?>&id=<?php echo $myrow['id'];?>&mod=edit&status=1">Edit</a>|</td>
     <td width="7%"><a href="Qualityposting.php?mrnid=<?php echo $exp[0];?>&id=<?php echo $myrow['id'];?>&mod=Approve&status=2">approved</a></td>
  </tr>
  
  <?php } } else { ?>
  
   <tr>
     <td colspan="11"><div align="center"><font color="#FF0000"> <b>Sorry ! Record Not Found !</b>	</font></div> 			 	 	 		 	 	 			 		 	 	 		</td>
  </tr>
  <?php }  ?>
  
  <input type="hidden" name="NumofRow" value="<?php echo $i;?>" />
  <input type="hidden" name="update" value="UPDATE" id="update" />
  </table>
