<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>
<select name="batch_no" id="batch_no"  tabindex="4"  onChange="media_sub_clear_validation(this.value),get_total_steps_used(req_by.value,roll_name.value,width1.value,height1.value)" style=" height:30px; width:100%;"  >
<option value="">Select</option><?php error_reporting(0);
/***************************** PREVIOUS NEXT CODING ****************************************/
 include("../../include/db.php");
 $particular=$_POST['roll_name'];
 $jobcard_no=$_POST['jobcard_no'];
 
	$sql_user="select *,SUM(tot_mtr) as tot_qty from media_pur_batch_tot_value where particulars='$particular' and batch_no!='' and tot_mtr !='0' and tot_mtr!=total_meter group by batch_no order by batch_no asc";
	//   echo "select *,SUM(tot_mtr) as tot_qty from media_pur_batch_tot_value where particulars='$particular' and batch_no!='' and tot_mtr!=total_meter group by batch_no order by batch_no asc";
	//   exit();
		$rs_user=mysql_query($sql_user);
			while($rsdata_user=mysql_fetch_object($rs_user))
			{ 
			$batch_no=$rsdata_user->batch_no;
			

			$particulars=$rsdata_user->particulars;
			$pruc_qty=$rsdata_user->tot_qty;
			
            $media_part=mysql_fetch_array(mysql_query("select *,SUM(tot_req_by) as tot_req from media_sub_list where roll_name='$particulars' and `batch_no`='$batch_no' group by batch_no"));
			//  echo "select *,SUM(tot_req_by) as tot_req from media_sub_list where roll_name='$particulars' and `batch_no`='$batch_no' group by batch_no";
			//  exit();
            $media_qty=$media_part['tot_req'];
            $tot_qty=$pruc_qty-$media_qty;

			
			?>
			
 <option value="<?php  echo $batch_no; ?>"><?php echo $batch_no.'('.number_format($tot_qty, 2, '.', ',').')'; ?>
 <?php } ?>
</select>