<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>View Daily Production Entry</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.main-heading{
		font:18px Verdana, Geneva, sans-serif;
		color:#000;
}
.text{
		font:12px Verdana, Geneva, sans-serif;
		color:#000;
}

-->
</style></head>
<?php
$sql=DB_query("select * from daily_production_process where daily_id='".$_REQUEST['Id']."'",$db);
$datarow=DB_fetch_array($sql);
?>
<body>
	<table width="990" border="0" align="center" cellpadding="0" cellspacing="0">
	  <tr>
    <td colspan="2" align="center" valign="top" class="main-heading">Daily Production Entry</td>
  </tr>
  <tr>
    <td width="476" align="left" valign="top">&nbsp;</td>
    <td width="514" align="right" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top"><fieldset style="margin:0px; padding:0px;">
    <legend align="center" class="text"><strong>Process Production</strong></legend>
<table width="485" border="0" align="left" cellpadding="2" cellspacing="2">
      <tr>
        <td width="223" align="left" class="text">Process Name :</td>
        <td width="248" align="left" valign="top"><select style="width:200px;" name="processname" id="processname">
          <?php 
        $process=DB_query("select * from production_process_master where id='".$datarow['process_name']."'",$db);
		while($row_process=DB_fetch_array($process))
		{        
        ?> 
        <option value="<?php echo $row_process['id']; ?>"><?php echo $row_process['manuf_process_name']; ?></option> 
        <?php } ?>
        </select> 
          *</td>
      </tr>
      <tr>
        <td align="left" class="text">Process Parameter :</td>
        <td align="left" valign="top"><select style="width:200px;" name="process_para" id="process_para" value="<?php echo $datarow['process_parameter']; ?>" readonly>
          <option value="0">---Select---</option>
        </select></td>
      </tr>
      <tr>
        <td align="left" class="text">Machine Center :</td>
        <td align="left" valign="top"><select style="width:200px;" name="machine_center_id" id="machine_center_id">
                 <?php
          $machine=DB_query("select * from machine_center where id='".$datarow['machine_center_id']."'",$db);
		  while($row_machine=DB_fetch_array($machine))
		  { 
          ?>
         <option value="<?php echo $row_machine['id']; ?>"><?php echo $row_machine['code']; ?></option> 
         <?php } ?>
        </select>
          *</td>
      </tr>
      <tr>
        <td align="left" class="text">Production Operator :</td>
        <td align="left" valign="top"><select style="width:200px;" name="production_operator_id" id="production_operator_id">
           <?php
          $production=DB_query("select * from production_operator_master where id='".$datarow['production_operator_id']."'",$db);
		  while($row_prod=DB_fetch_array($production))
		  { 
          ?>
          <option value="<?php echo $row_prod['id']; ?>"><?php echo $row_prod['operator_name']; ?></option>
          <?php } ?>
        </select>
          *</td>
      </tr>
      <tr>
        <td align="left" class="text">Shift of Production :</td>
        <td align="left" valign="top"><select style="width:120px;" name="shift_of_production" id="shift_of_production">
          <?php 
          $shift=DB_query("select * from production_shift where id='".$datarow['shift_of_production']."'",$db);
		  while($row_shift=DB_fetch_array($shift))
		  {         
          ?>
          <option  value="<?php echo $row_shift['id']; ?>"><?php echo $row_shift['shift_name']; ?></option>
          <?php } ?>
        </select>
          *</td>
      </tr>
      <tr>
        <td align="left" class="text">Process Production Date :</td>
        <td align="left" valign="top"><input type="text" style="width:120px;" name="process_pro_date" id="process_pro_date" value="<?php echo $datarow['process_prod_date']; ?>"readonly>
          </td>
      </tr>
      <tr>
        <td align="left" class="text">Process In Time :</td>
        <td align="left" valign="top"><input type="text" style="width:120px;" name="process_in_time" id="process_in_time" value="<?php echo $datarow['process_in_time']; ?>" readonly></td>
      </tr>
      <tr>
        <td align="left" class="text">Process Out Time :</td>
        <td align="left" valign="top"><input type="text" style="width:120px;" name="procee_out_time" id="procee_out_time" value="<?php echo $datarow['process_out_time']; ?>" readonly>
         </td>
      </tr>
      <tr>
        <td align="left" class="text">Last Pending WIP Qty :</td>
        <td align="left" valign="top"><input style="width:116px" type="text" name="last_pend_qty_wip" id="last_pend_qty_wip" value="<?php echo $datarow['last_pend_qty_wip']; ?>" readonly/></td>
      </tr>
      <tr>
        <td align="left" class="text">Production Quantity :</td>
        <td align="left" valign="top"><input style="width:116px" type="text" name="production_qty" id="production_qty" value="<?php echo $datarow['production_qty']; ?>" readonly/>
          *</td>
      </tr>
      <tr>
        <td align="left" class="text">Process Quality Check Required :</td>
        <td align="left" valign="top"><input type="text" style="width:120px;" name="production_qty_check" id="production_qty_check" value="<?php echo $datarow['process_qty_check']; ?>" readonly>
          </td>
      </tr>
      <tr>
        <td align="left" class="text">Production Quantity With QC :</td>
        <td align="left" valign="top"><input style="width:116px" type="text" name="production_qty_qc" id="production_qty_qc" value="<?php echo $datarow['production_qty_qc']; ?>" readonly/>
          *</td>
      </tr>
      </table>
</fieldset></td>
    <td align="right" valign="top"><fieldset style="margin:0px; padding:0px;">
      <legend align="center" class="text"><strong>QC Rejection Process Production</strong></legend>
      <?php
      $rejection=DB_query("select * from daily_rejection_process where daily_id='".$_REQUEST['Id']."'",$db);
	  $rejectiondata=DB_fetch_array($rejection);
      ?>
      <table width="485" border="0" align="center" cellpadding="2" cellspacing="2">
        <tr>
          <td width="223" align="left" class="text">Quality Rejection Applicable :</td>
          <td width="248" align="left" valign="top"><select style="width:120px;" name="quality_rejec_appli" id="quality_rejec_appli" >
            <option value="Yes" <?php if($rejectiondata['quality_rejec_appli']=='Yes'){?> selected="selected" <?php } ?>>Yes</option>
            <option value="No" <?php if($rejectiondata['quality_rejec_appli']=='No'){?> selected="selected" <?php } ?>>No</option>
          </select></td>
          </tr>
        <tr>
          <td align="left" class="text">Rejection QC Date &amp; Time :</td>
          <td align="left" valign="top"><input type="text" style="width:120px;" name="rejection_qc_date" id="rejection_qc_date" value="<?php echo $rejectiondata['rejection_qc_date'] ?>" readonly>
           </td>
          </tr>
        <tr>
          <td align="left" class="text">Department :</td>
          <td align="left" valign="top">
          	<select name="deptid" id="deptid" style="width:120px;">
              	<?php
            	$depart=DB_query("select * from deptmaster where id='".$rejectiondata['deptid']."'",$db);
            	while($depart_row=DB_fetch_array($depart))
				{
            	 ?>
            	 <option value="<?php echo $depart_row['id']; ?>"><?php echo $depart_row['deptname']; ?></option>
            	 <?php } ?>
            	</select>
          	</td>
          </tr>
        <tr>
          <td align="left" class="text">Quality Inspector Executive Name :</td>
          <td align="left" valign="top"><input style="width:200px" type="text" name="executive_name" id="executive_name" value="<?php echo $rejectiondata['executive_name'] ?>"  readonly/></td>
          </tr>
        <tr>
          <td align="left" class="text">Rejection Type :</td>
          <td align="left" valign="top"><input type="text" style="width:205px;" name="rejection_type" id="rejection_type" value="<?php echo $rejectiondata['rejection_type'] ?>"  readonly>
          </select></td>
          </tr>
        <tr>
          <td align="left" class="text">Rejection Reason :</td>
          <td align="left" valign="top"><input type="text" style="width:205px;" name="rejection_reason" id="rejection_reason" value="<?php echo $rejectiondata['rejection_reason'] ?>"  readonly>
         </td>
          </tr>
        <tr>
          <td align="left" class="text">Rejection Description :</td>
          <td align="left" valign="top"><input style="width:200px" type="text" name="rejection_desc" id="rejection_desc" value="<?php echo $rejectiondata['rejection_desc'] ?>"  readonly/></td>
          </tr>
        <tr>
          <td align="left" class="text">Quantity Rejection :</td>
          <td align="left" valign="top"><input style="width:116px" type="text" name="quantity_rejection" id="quantity_rejection" value="<?php echo $rejectiondata['quantity_rejection'] ?>"  readonly /></td>
          </tr>
        <tr>
          <td align="left" class="text">Quantity QC OK :</td>
          <td align="left" valign="top"><select  style="width:116px"  name="quantity_qc" id="quantity_qc" value="<?php echo $rejectiondata['quantity_qc'] ?>"  readonly  />
          	   	<option value="Yes" <?php if($rejectiondata['quantity_qc']=='Yes') {?> selected="selected" <?php } ?>>Yes</option>
            	<option value="NO" <?php if($rejectiondata['quantity_qc']=='No') {?> selected="selected" <?php } ?>>No</option>
            </select>          	
          </td>
        </tr>
      </table>
    </fieldset></td>
  </tr>
  <tr>
    <td align="left" valign="top">&nbsp;</td>
    <td align="right" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top"><fieldset style="margin:0px; padding:0px;">
      <legend align="center" class="text"><strong>Breakdown Process Production</strong></legend>
      <?php
      $breakdown=DB_query("select * from daily_production_breakdown where daily_id='".$_REQUEST['Id']."'",$db);
	  $breakdowndata=DB_fetch_array($breakdown);
      ?>
      <table width="485" border="0" align="left" cellpadding="2" cellspacing="2">
        <tr>
          <td width="237" align="left" class="text">Breakdown Applicable :</td>
          <td width="234" align="left" valign="top"><select style="width:120px;" name="breakdown_applicable" id="breakdown_applicable">
                <option value="Yes" <?php if($breakdowndata['breakdown_applicable']=='Yes'){?> selected="selected" <?php } ?>>Yes</option>
            <option value="No" <?php if($breakdowndata['breakdown_applicable']=='No'){?> selected="selected" <?php } ?>>No</option>
          </select></td>
          </tr>
        <tr>
          <td align="left" class="text">Breakdown Intimation Date &amp; Time :</td>
          <td align="left" valign="top"><input type="text" style="width:120px;" name="breakdown_intimation_date" id="breakdown_intimation_date" value="<?php echo $breakdowndata['breakdown_intimation_date']?>" readonly>
           </td>
          </tr>
        <tr>
          <td align="left" class="text">Maintenance Department :</td>
          <td align="left" valign="top"><select style="width:120px;" name="maintenance_dept" id="maintenance_dept">
          	<option value="0">--Select--</option>
          </select></td>
          </tr>
        <tr>
          <td align="left" class="text">Maintenance Executive Name :</td>
          <td align="left" valign="top"><input style="width:200px" type="text" name="maintenance_executive_name" id="maintenance_executive_name"  value="<?php echo $breakdowndata['maintenance_executive_name']?>" readonly/></td>
          </tr>
        <tr>
          <td align="left" class="text">Breakdown Type :</td>
          <td align="left" valign="top"><select style="width:205px;" name="breakdown_type" id="breakdown_type">
          	   	<?php
            	$breaktype=DB_query("select * from break_down_master where id='".$breakdowndata['breakdown_type']."'",$db);
				while($break_row=DB_fetch_array($breaktype))
				{            	
            	 ?>
            	 <option value="<?php echo $break_row['id']; ?>"><?php echo $break_row['brack_down_type']; ?></option>
            	 <?php } ?>
          </select></td>
          </tr>
        <tr>
          <td align="left" class="text">Breakdown Reason :</td>
          <td align="left" valign="top"><input type="text" style="width:205px;" name="breakdown_reason" id="breakdown_reason" value="<?php echo $breakdowndata['breakdown_reason']; ?>" readonly></td>
          </tr>
        <tr>
          <td align="left" class="text">Breakdown Description :</td>
          <td align="left" valign="top"><input style="width:200px" type="text" name="breakdown_desc" id="breakdown_desc" value="<?php echo $breakdowndata['breakdown_desc']; ?>" readonly/></td>
          </tr>
        <tr>
          <td align="left" class="text">Breakdown in Minutes :</td>
          <td align="left" valign="top"><input style="width:116px" type="text" name="breakdown_minute" id="breakdown_minute" value="<?php echo $breakdowndata['breakdown_minute']; ?>" readonly/></td>
          </tr>
      </table>
    </fieldset></td>
    <td align="right" valign="top"></td>
  </tr>
  <tr>
    <td align="left" valign="top">&nbsp;</td>
    <td align="right" valign="top">&nbsp;</td>
  </tr>
</table>
</body>
</html>
