<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");
 $job_card_nos=$_POST['job_card_nos'];
  $particulars=$_POST['particulars'];
 
 $res_partii=mysql_fetch_array(mysql_query("select sum(qty) as qty from media_pur_sublist where particulars_id='$particulars' and `media_pur_no`='$job_card_nos' "));
 
  $sql5="select sum(qty) as qty,mtr_roll from return_media_pur_sublist where  particulars_id='$particulars' and `media_pur_no`='$job_card_nos'";       
	 $rs5=mysql_query($sql5);
        $rscount5=mysql_num_rows($rs5);
		  while($rsdata5=mysql_fetch_array($rs5))
		  {
	     $enq_qty=$rsdata5['qty'];
		 $mtr_roll=$rsdata5['mtr_roll'];
		
		 }
	 $whole_qty=abs($enq_qty-$res_partii['qty']);
	   $total_mtr=abs($whole_qty*$mtr_roll);
	   
	   if($total_mtr==''){
	     // echo  "select * from media_pur_sublist where  particulars_id='$particulars' and `media_pur_no`='$job_card_nos' ";
	    $res_parti=mysql_fetch_array(mysql_query("select sum(qty) as qty,mtr_roll from media_pur_sublist where  particulars_id='$particulars' and `media_pur_no`='$job_card_nos' "));
	    $enq_qty1=$res_parti['qty'];
		 $mtr_roll1=$res_parti['mtr_roll'];
		  $total_mtr=abs($enq_qty1*$mtr_roll1);
	   }
?>	
  
    <input type="text" class="types_class1" name="tot_mtr" id="tot_mtr" style="width:100%;  height:28px;"  onKeyPress="if ((event.keyCode &lt; 46) || (event.keyCode &gt; 57)) event.returnValue = false"  value="<?php  echo $total_mtr;  ?>" />