<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>
<title>Size Set Entry</title>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script type="text/javascript" src="../../javascript/jquery.js"></script>
<script type="text/javascript" src="../../javascript/spacklist_entry_rel.js"></script>
<script type="text/javascript" src="../../javascript/jquery.datepick.min.js"></script>
<script type="text/javascript" src="../../javascript/jNotify.jquery.min.js"></script>
<script type="text/javascript" src="../../javascript/jNotify.jquery.js"></script>

<link rel="stylesheet" href="../../css/jNotify.jquery.css">
<link type="text/css" rel="stylesheet" href="../../css/style.css"  >
</link>
<link rel="stylesheet" href="../../css/redmond.datepick.css">
<script  type="text/javascript" >
$(document).ready(function(e){



});
</script>
</head>

<body>
<div id = "sepsizentry">
    <input type="button" value="SAVE" class="sizeedit filter_table" style="float:right">
    <div id="form_bookdetails">
     
<?php
//Start session
	session_start();
include '../../db_connect.php';


$orderid=$_GET['orderid'];
$prodcode=$_GET['prodcode'];
$entryid=$_GET['entryid'];


$sql="";

$sql = "SELECT * FROM spacklistvar  where `job_id` = '$orderid'  and `prodname` = '$prodcode' order by entryid";


	if($result = mysqli_query($con,$sql)){
		
			
	echo "<div class='sizechartdiv '  ><table  border='1' class='sizetable'   width='100%' cellspacing='0' ><thead> <tr>
   <th>Sr. No.</th>
	<th>Product</th>
    <th>Size</th>
    <th>Quantity</th>
	<th>Fresh</th>
    <th>Seconds</th>
  </tr></thead><tbody>";  
  $tr ='';
			$index=1;
	while($row_det = mysqli_fetch_array($result))
	{

$qnty += $row_det[qnty];
$fresh += $row_det[fresh];
$reprocess += $row_det[reprocess];
				
				echo "<tr><td style='display:none'><textarea style='height: 32px;' name='entryid_pv[]' class='entryid_pv'>$row_det[entryid]</textarea></td><td>".($index++)."</td><td><textarea style='height: 32px;' name='prodcode_pv[]' class='prodcode_pv'>$row_det[prodname]</textarea></td><td><textarea style='height: 32px;' name='size_pv[]' class='size_pv'>$row_det[size]</textarea></td> <td><textarea name='qnty_pv[]' style='height: 32px;' class='qnty_pv'>$row_det[qnty]</textarea></td><td><textarea name='fresh_pv[]' style='height: 32px;' class='fresh_pv'>$row_det[fresh]</textarea></td><td><textarea style='height: 32px;' name='reprocess_pv[]' class='reprocess_pv'>$row_det[reprocess]</textarea></td></tr>";
				
			}//while($prodvar_row = mysqli_fetch_array($prodvar_data)){
			echo "<tr class='foot'><td style='display:none'><textarea style='height: 32px;' name='tentryid_pv[]' class='tentryid_pv'></textarea></td><td>TOTAL</td><td><textarea style='height: 32px;' name='tprodcode_pv[]' class='tprodcode_pv'></textarea></td><td><textarea style='height: 32px;' name='tsize_pv[]' class='tsize_pv'>".($index-1)."</textarea></td> <td><textarea name='tqnty_pv[]' style='height: 32px;' class='tqnty_pv'>".$qnty."</textarea></td><td><textarea name='tfresh_pv[]' style='height: 32px;' class='tfresh_pv'>".$fresh."</textarea></td><td><textarea style='height: 32px;' name='treprocess_pv[]' class='treprocess_pv'>".$reprocess."</textarea></td></tr> </table></div>";
			


	

	



	}
	else 
	echo mysqli_error($con);


mysqli_close($con);
?>
<input type="hidden" value="<?php echo $entryid; ?>" class="entryid filter_table" >
<input type="hidden" value="<?php echo $orderid; ?>" class="orderid filter_table" >
<input type="hidden" value="<?php echo $prodcode; ?>" class="productname filter_table" >
</div>

</div>



</body>
</html>

