<link rel="stylesheet" href="css/new_mxerp.css">
<?php
ob_start();
$_SESSION['modid']=$_REQUEST['modid'];
$_SESSION['frmid']=$_REQUEST['frmid'];
$frmpermission= $px->GetFileAccess($_SESSION['modid'],$_SESSION['frmid'],$_SESSION['ACGRoleId']);
$_SESSION['frmAdd']=$frmpermission[0];
$_SESSION['frmEdit']=$frmpermission[1];
$_SESSION['frmDelete']=$frmpermission[2];
$_SESSION['frmView']=$frmpermission[3];

if($_GET['action'] == 'view' && isset($_GET['id']))
{
	$recView=DB_fetch_array($s->GetRecordById('finished_recieved','id='.$_REQUEST['id']));
	extract($recView);
	
	$recView2=$s->GetRecordById('finished_recieved_details','finished_recieved_id='.$_REQUEST['id']);

}
?><div class="body_contain">
<div class="tab_div">

<h1>Finished Material Recieved</h1>



<table width="100%" border="1" cellpadding="3" cellspacing="0" style="border-collapse:collapse; border:#666666 solid 1px;">
<tr class="row1">
    <td class="tabledata1">Branch</td>
    <td class="tabledata1">
	
	<input type="text" name="site" id="site" value="<?php echo $site; ?>" style="width:98%;" readonly="true">
	</td>
    <td class="tabledata1">Production Slip No.</td>
    <td id="ISSUE" class="tabledata1"><input name="production_slip_no" type="text" id="return_slipno2" value="<?php echo $production_slip_no; ?>" size="15" style="width:98%;" readonly="true"/>    </tr> 
	<tr class="row1">
  	<?php  $store=DB_fetch_array($s->GetRecordById('storetype','id='."'$store'"));?>
    <td class="tabledata1">Godown</td>
    <td class="tabledata1"><input type="text" name="store" id="store" value="<?php echo $store['StoreName']; ?>" style="width:98%;" readonly="true"></td>
    <td class="tabledata1">Work Order No.  </td>
    <td class="tabledata1"><input name="work_order_no" style="width:98%;" type="text" id="work_order_no" value="<?php echo $work_order_no; ?>" size="15" readonly="true"/></td>
  </tr> 
  <tr class="row1">
    <td class="tabledata1">Job Card No.</td>
    <td class="tabledata1"><input name="job_card_no" type="text" id="job_card_no" style="width:98%;" value="<?php echo $job_card_no; ?>" size="15" readonly="true"/></td>
    <td class="tabledata1">Work Order  Date  </td>
    <td class="tabledata1"><input name="work_order_date" type="text" id="work_order_date" value="<?php  echo ConvertSQLDate($work_order_date); ?>" size="15" class="datepicker"  style="width:98%;" readonly="true"/></td>
  </tr> '
  <tr class="row1">
    <td class="tabledata1">Job Card Date</td>
    <td class="tabledata1"><input name="job_card_date" type="text" id="job_card_date" style="width:98%;" value="<?php echo ConvertSQLDate($job_card_date); ?>" size="15" class="datepicker" readonly="true"/></td>
    <td class="tabledata1">Recieved Date</td>
    <td class="tabledata1"><input name="recieved_date" type="text" id="recieved_date" value="<?php echo ConvertSQLDate($recieved_date); ?>" size="15"  style="width:98%; readonly="true""/></td>
  </tr>
  
   <tr class="row1">
    <td class="tabledata1" colspan="4"><strong>Item Details</strong></td>
  </tr>
</table>
<br />
<table width="100%" border="1" cellpadding="3" cellspacing="0" style="border-collapse:collapse; border:#666666 solid 1px;">
 <tr class="row1">
    <td class="tabledata1">Item Code</td>
    <td class="tabledata1">Description</td>
  <!--  <td class="tabledata">Make</td>
    <td class="tabledata">Color</td>
    <td class="tabledata">Grade</td>-->
    <td class="tabledata1">UOM</td>
    <td class="tabledata1">Received Qty </td>
    
  </tr>
 	<?php while($row=DB_fetch_array($recView2))
 	{
	$unit=$s->getField('item_master','id',$row['mst_itemid'],'mst_unitid');
	$unitname=$s->getField('unitsofmeasure','unitid',$unit,'unitname');
 		extract($row);
 	?>
<tr class="row1">
  <td class="tabledata1"><input type="text" value="<?php echo $itemcode; ?>" tabindex=""  id="washing_profile" name="itemcode[]" readonly="true"/> </td>
  <td class="tabledata1"><input type="text" value="<?php echo $itemdesc; ?>" name="desc[]"  id="desc" size="25" readonly/></td>
 <!-- <td class="tabledata1"><input type="text" value="<?php //echo $make; ?>" name="make[]" id="make"  readonly/></td>
  <td class="tabledata1"><input type="text" value="<?php //echo $color; ?>" name="color[]" id="color"  readonly/></td>
  <td class="tabledata1"><input type="text" value="<?php //echo $grade; ?>" name="grade[]" id="grade"  readonly/></td>-->
  <td class="tabledata1"><input type="text" value="<?php echo $unitname; ?>" name="uom[]" id="uom" size="10" readonly/></td>
   <td class="tabledata1"><input type="text" value="<?php echo $reciveqty; ?>" name="reciveqty[]"  id="reciveqty" size="10"  readonly="true"/></td>
  </tr>
  <?php } ?>
  
</table>

<br />
<table width="100%" border="1" cellpadding="3" cellspacing="0" style="border-collapse:collapse; border:#666666 solid 1px;"> 
<tr class="row1">
    <td class="tabledata1">Remarks:</td>
    <td class="tabledata1"><textarea name="remarks" id="remarks" cols="" rows=""
    style="width:100%; height:60px;"><?php echo $remarks; ?></textarea></td>
  </tr>
</table>

</div>
</div>
