<style>
.style1 {border-top: solid 1px;border-top-color: #CCCCCC;}
.style21 {border-bottom: solid 1px;border-bottom-color: #CCCCCC;}
.style5 {border-left: solid 1px;border-left-color: #CCCCCC;}
.style3{ border-right: solid 1px;border-right-color: #CCCCCC; }
.style4 {border-bottom: solid 1px;border-bottom-color: #CCCCCC;}
.text{ font-family: Verdana; font-size:13px;}
#tot_amt::-webkit-input-placeholder { color:#666; }
</style>
<?php error_reporting(0);
/***************************** PREVIOUS NEXT CODING ****************************************/
 include("../../include/db.php");
 function get_prod_qty($jobcard_no,$particulars,$width,$height)
 {
	 	$sql_user="select sum(prod_qty) as prod_qty	from  fusing_production_sublist where job_card_no='$jobcard_no' and prod_size='$particulars' and width='$width' and height='$height'";
		$rs_user=mysql_query($sql_user);
			while($rsdata_user=mysql_fetch_object($rs_user))
			{ 
			$prod_qty=$rsdata_user->prod_qty;
			}
return $prod_qty;
 }
 $jobcard_no=$_POST['jobcard_no'];
 $size=$_POST['size'];
 $siz_expl=explode("@#@#",$size);
 $particulars=$siz_expl[0];
 $width=$siz_expl[1];
 $height=$siz_expl[2];
 $prod_qty=get_prod_qty($jobcard_no,$particulars,$width,$height);
	
	
// $sql_user="select * from  jobcard_sublist where jobcard_no='$jobcard_no' and particulars='$particulars' and width='$width' and height='$height' order by particulars asc";
	$sql_user="select sum(inward_qty) as inward_qty from  inward_sub_list where jobcard_no='$jobcard_no' and inward_particular='$particulars' and roll_width='$width'  and kg_height='$height' order by inward_particular asc";
 $rs_user=mysql_query($sql_user);
	 while($rsdata_user=mysql_fetch_object($rs_user))
	 { 
	// $qty=$rsdata_user->qty;
		$qty=$rsdata_user->inward_qty;
	 }
	 $total_qty=$qty-$prod_qty;
	 ?>
	 <!-- <input type="text" class="types_class1" name="total_qty" id="total_qty" tabindex="8" onKeyUp="enterevent(event,'prod_qty','total_qty')" style="width:100%; height:26px; font-size:14px;" value="<?php echo $total_qty;?>"/> -->
		<input type="text" class="types_class1" tabindex="8"  name="total_qty" id="total_qty" onKeyUp="enterevent(event,'prod_qty','total_qty')" style="width:100%;font-size:14px;" value="<?php echo $total_qty;?>"/> 
