<?php $PageSecurity = 11;
include('includes/session.inc');
include('includes/function_lib.php');
include('includes/SQL_CommonFunctions.inc');
global $db;

$myval=$_REQUEST['myval'];
$myval1=explode(":",$myval);
$store=$_REQUEST['store'];
$site=$_REQUEST['site'];

$data10='';
$j=0;
$mc=count($myval1);
for($m=0;$m<($mc-1);$m++){
	$n=explode(",",$myval1[$m]);
	if($n[0]=='')
	{
		$n[0]=$n[1];
		$n[1]=$n[2];
	}
	$sqlQtybox = "SELECT * From log_addmrnbox Where grn_id='".$n[0]."' AND store='".$store."' AND itemid='".$n[1]."' AND dis_id IN (".$_REQUEST['str1'].")";
	$Qty_resultbox = DB_query($sqlQtybox, $db);
	while($row2box=DB_fetch_array($Qty_resultbox))
	{
	$k=$j+1;
	$data10.='<tr>';
	$data10.='<td class="tabledata">'.$k.'<input type="hidden" name="box_id['.$j.']" id="box_id_'.$j.'" value="'.$row2box['id'].'"/></td>';
	$data10.='<td class="tabledata"><input type="text" name="package_no['.$j.']" id="package_no_'.$j.'" value="'.$row2box['package_no'].'" readonly="true"/></td>';
	$data10.='<td class="tabledata"><input type="text" name="no_of_package['.$j.']" id="no_of_package_'.$j.'" value="'.$row2box['no_of_package'].'" readonly="true"/></td>';
	$data10.='<td class="tabledata"><input type="text" name="content['.$j.']" id="content_'.$j.'" value="'.$row2box['content'].'" readonly="true" ></td>';
	$data10.='<td class="tabledata">';
	$data10.='<select name="layout['.$j.']" id="layout_'.$j.'" disabled="disabled">';
	$data10.='<option value="0">Select</option>';
	$sql1=DB_query("select * from log_floor where CompanyId='".$_SESSION['ACGCompanyId']."'",$db);
	while($sql_floor=DB_fetch_array($sql1))
	{
		if($sql_floor['id']==$row2box['layout']){
		$data10.='<option value="'.$sql_floor['id'].'" selected="selected">'.$sql_floor['floor_name'].'</option>';
		}else{
		$data10.='<option value="'.$sql_floor['id'].'">'.$sql_floor['floor_name'].'</option>';
		}
	}
	$data10.='</select>';
	$data10.='</td>';
	$data10.='<td class="tabledata">';
	$data10.='<select name="itemid['.$j.']" id="itemid_'.$j.'" disabled="disabled">';
	$data10.='<option value="0">Select</option>';
	$sql2=DB_query("select * from item_master where CompanyId='".$_SESSION['ACGCompanyId']."' AND orig_local='".$store."'",$db);
	while($sql_floor2=DB_fetch_array($sql2))
	{
		if($sql_floor2['id']==$row2box['itemid']){
		$data10.='<option value="'.$sql_floor2['id'].'" selected="selected">'.$sql_floor2['item_name'].'</option>';
		}else{
		$data10.='<option value="'.$sql_floor2['id'].'">'.$sql_floor2['item_name'].'</option>';
		}
	}
	$data10.='</select>';
	$data10.='<input type="text" name="" readonly="" value="'.$s->GetFieldValue('item_master','id="'.$row2box['itemid'].'"','StockID').'">';
	$data10.='</td></tr>';
	$j++;}
}
$data10.='<input type="hidden" name="countrow" id="countrow" value="'.$j.'" />';

echo $data10;

?>