<link rel="stylesheet" href="css/new_mxerp.css">

<?php 
$rowdata=DB_query("select * from material_slip_against_job_card where id='".$_REQUEST['Id']."'",$db);
$row=DB_fetch_array($rowdata);

?>

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

<h1>View Material Requirement Slip Against Job Card </h1>


<table width="100%" border="1" cellpadding="3" cellspacing="0" style="border-collapse:collapse; border:#666666 solid 1px;">
            	<td class="tabledata1">Job Ticket No</td>
                    <td >                    	
                    	<?php
                    	
                    	$sql=DB_query("select * from job_card where id='".$row['job_card_id']."'",$db);
						while($row1=DB_fetch_array($sql))
						{ 
                    	?>
                    	<?php echo $row1['job_card_no']; ?>
                    	<?php } ?>
                      			</td>
                      			            			
                      			
                      			<td class="tabledata1" >  Job  Date</td>
                    <td >  <?php echo $row['job_card_data']; ?>
                    	
                    	     	
                    	</td>
                <tr>
                 <td class="tabledata1" align="left">W/O No</td>
                    <td><?php echo $s->getField('prd_wo','id',$row['sop_no'],'wo_no');; ?></td>
                    <td class="tabledata1" align="left">Item Name</td>
                    <?php
                    $itemdata1=$s->getField('item_master','StockID',$row['item_name'],'item_name');
                    
                    
                     ?>
                    
                     <td><?php echo $row['item_name']; ?>
                     </td>
                  </tr>
				           <tr>
                  	<td class="tabledata1" width="24%" align="left">Order Qty</td>
                    <td width="27%"> <?php echo $row['order_qty']; ?></td>
					<td class="tabledata1">Mat-Slip No</th>
                     <td><?php echo $row['mat_slip_no']; ?>
                     </td>                                       
                    </tr>                
                  
                 </table>
        
    <p align="left"><strong>Raw  Material Details For Job Card No:- </strong></p>
    
     
<table width="100%" border="1" cellpadding="3" cellspacing="0" style="border-collapse:collapse; border:#666666 solid 1px;">
              <tr>
                <td class="tabledata">S.No</td>
               	<td class="tabledata" >Item Code </td>
                <td class="tabledata">Item Name </td>
		<td class="tabledata">Unit</td>
		
                <td class="tabledata">Size</td>
                <td class="tabledata">Total Req Qty</td>
                </tr>
                 <tbody id="dataTable">
			  <?php 
			  $i=1;
			  
			  $itemdata=DB_query("select * from material_job_item where material_slip_id='".$_REQUEST['Id']."'",$db);
			  while($data=DB_fetch_array($itemdata))
			  {
			  			  	?>
			  
<tr bgcolor="#c1c1c1">
  	<td><?php echo $i; ?></td>
  	
  	<td><input type="text" name="itemcode[]" id="itemcode" style="width:100%"readonly value="<?php echo $data['item_code']; ?>"></td>
       <td><input type="text" name="item_name[]" id="item_name" style="width:100%" value="<?php echo $data['item_name']; ?>">
    	 	
    </td>
    <td><input type="text" name="uom[]" id="uom" style="width:100%" readonly value="<?php echo $data['unit']; ?>"></td>
       <td><input type="text" name="size" id="size" style="width:100%" value="<?php echo $data['size']; ?>"/></td>
    
    <td><input type="text" name="amount[]" id="amount" style="width:100%"  value="<?php echo $data['total_req_qty']; ?>"></td>
  </tr>
  <?php $i++; } ?>
   </tbody></table>               
      
<table width="100%" border="1" cellpadding="3" cellspacing="0" style="border-collapse:collapse; border:#666666 solid 1px;">
                  <tr>
                     <th class="tabledata">Created By</th>
                     <td><input type="text" name="created_by" style="width:100%" value="">
                     </td>
                     <th class="tabledata">Approved By Store Head</th>
                    <td><select name="approved"  style="width:100%">
	<option value="Yes"<?php if($row['created_by']=='Yes') { ?> selected="selected" <?php } ?>>Yes</option>
	<option value="No" <?php if($row['created_by']=='No') { ?> selected="selected" <?php } ?>>No</option>
	<option value="Pending" <?php if($row['created_by']=='Pending') { ?> selected="selected" <?php } ?>>Pending</option>
	
</select></td>
<tr><th>Remarks</th><td colspan="3" ><textarea name="remarks"  style="width:100%" ><?php echo $row['remarks']; ?></textarea></td> 
                  </tr></table>
        
  
</div></div>
          
