<?php $PageSecurity = 4;
global  $db;
include('includes/session.inc');
include('includes/SQL_CommonFunctions.inc');
include('includes/function_lib.php');
?>
<link href="css/professional/default.css" rel="stylesheet" type="text/css" />
<div class="body_contain">
<div class="tab_div"><h1 style="text-align:center;">Completed Work Detail</h1></div>
<table width="100%" border="1" cellpadding="3" cellspacing="0" style="border-collapse:collapse; border:#666666 solid 1px;">
    	 <tr bgcolor="#CCCCCC">
			<td><strong>S. No.</strong></td>
    	    <td><strong>PAP No.</strong></td>
			<td><strong>PAP Quantity</strong></td>
			<td><strong>PCS No.</strong></td>
			<td><strong>Activity Code</strong></td>
			<td><strong>Activity Name</strong></td>
  	        <td><strong>Complete Date</strong></td>
  	        <td><strong>Complete Quantity</strong></td>
   	    </tr>
    	  
          
			<?php
				$querychk = "SELECT * from project_completion AS A Left Join project_completion_details AS B ON A.id=B.master_id WHERE A.boq_id='".$_REQUEST['boq_id']."' and itemcode='".$_REQUEST['itemcode']."' and level='".$_REQUEST['level']."' and act_name='".$_REQUEST['activity']."'";
				$reschk = DB_query($querychk,$db) or die(DB_error());
				$i=1;
				while($resultchk = DB_fetch_array($reschk)){
			?>
		<tr bgcolor="#FFFFFF">
			<td class="jjrs_tabledata1" style="width:56px;"><?php echo $i; ?></td>
			<td class="jjrs_tabledata1" style="width:56px;"><?php echo $s->GetFieldVAlue('boq_entry',"id='".$_REQUEST['boq_id']."'",'boq_no'); ?></td>
			<td class="jjrs_tabledata1" style="width:56px;"><?php echo $_REQUEST['qty']; ?></td>
			<td class="jjrs_tabledata1" style="width:56px;"><?php echo $resultchk['pcs_no']; ?></td>
			<td class="jjrs_tabledata1" style="width:56px;"><?php echo $s->GetFieldVAlue('sub_activity_defination',"id='".$_REQUEST['activity']."'",'activity_code'); ?></td>
			<td class="jjrs_tabledata1" style="width:56px;"><?php echo $s->GetFieldVAlue('sub_activity_defination',"id='".$_REQUEST['activity']."'",'activity_name'); ?></td>
			<td class="jjrs_tabledata1" style="width:56px;"><?php echo ConvertSQLDate($resultchk['complete_date']); ?></td>
			<td class="jjrs_tabledata1" style="width:56px;"><?php echo $resultchk['complete_qty']; ?></td>
          </tr>
         <?php $i++;} ?>      
          
        </table>

</div></div>

