<?php
$table_name='sub_amendment';
$condition="id='".$_REQUEST['id']."'";
$record=$s->GetRecordById($table_name,  $condition);
$recordRow=DB_fetch_array($record);
?>
<link href="css/tender_project.css" rel="stylesheet" type="text/css" />
<h3> Work Order Amendment Approval View</h3>
<table width="100%" border="1" cellpadding="3" >
<tr>
<th width="24%" class="tabledata"><div align="left">Project</div></th>
<td width="22%">
<?php echo $s->GetFieldValue('locations',"loccode='".$recordRow['project']."'",'locationname');?></th>
<th width="28%" class="tabledata"><div align="left">Block</div></th>
<td width="26%"><?php echo $s->GetFieldValue('sub_block_master',"id='".$recordRow['block']."'",'block_name');?></th>
</tr>
<tr>
<th class="tabledata"><div align="left">Contractor</div></th>
<td><?php echo $s->GetFieldValue('sub_contractor_definition',"id='".$recordRow['contractor']."'",'contractor_name');?></td>
<th class="tabledata"><div align="left">Work Order No.</div></th>
<td><?php echo $s->GetFieldValue('sub_preparation',"id='".$recordRow['work_order_no']."'",'work_order_no'); ?></td>
</tr>
<tr>
<th class="tabledata"><div align="left">Work Order Ammendment Date</div></th>
<td><?php echo ConvertSQLDate($recordRow['amendment_date']); ?></td>
<th class="tabledata"><div align="left">Work Order Start Date</div></th>
<td><?php echo ConvertSQLDate($recordRow['start_date']);?></td>
</tr>
<tr>

<th class="tabledata"><div align="left">Work Order Completion Date</div></th>

<td> <?php echo ConvertSQLDate($recordRow['completion_date']); ?></td>
</tr>
</table>
<br/>
<div style="width:810px; overflow:auto;">
<table width="100%" border="1">
	<tr >
	<td class="tabledata">Sl.No.</td>
	<td class="tabledata">Activity Group</td>
	<td class="tabledata">Activity</td>
	<td class="tabledata">Work Order Quantity</td>
	<td class="tabledata">Amendment Qty</td>
	<td class="tabledata">+/-</td>
	<td class="tabledata">Current Qty</td>
	<td class="tabledata">Work Order Rate</td>
	<td class="tabledata">Amendment Rate</td>
	<td class="tabledata">+ / -</td>
	<td class="tabledata">Current Rate</td>
	<td class="tabledata">Net Amount</td>
	</tr>
	<?php 
	$recchild=DB_query("select * from sub_amendment_chield where pid='".$_REQUEST['id']."'",$db);
	$i=0;
	while($recchildRow=DB_fetch_array($recchild)){
	?>
	<tr>
	<td><?php echo $i+1; ?></td>
	<td><?php echo $group_name=$s->GetFieldValue('master_boq',"id='".$recchildRow['group_id']."'",'group_title');?></td>
	<td style="width:300px;"><?php echo $activity_name=$s->GetFieldValue('master_boq',"id='".$recchildRow['activity_id']."'",'group_title');?></td>
	<td><?php echo $recchildRow['work_order_qty'] ;?></td>
	<td><?php echo $recchildRow['ammd_qty'] ?></td>
	<td><?php echo $recchildRow['operation1'] ?></td>
	<td><?php echo $recchildRow['curr_qty'] ?></td>
	<td><?php echo $recchildRow['work_order_rate'] ?></td>
	<td><?php echo $recchildRow['ammd_rate'] ?></td>
	<td><?php echo $recchildRow['operation2'] ?></td>
	<td><?php echo $recchildRow['curr_rate'] ?></td>
	<td><?php echo $recchildRow['net_ammount'] ?></td>
	</tr>
	<?php $i++; } ?>
</table>
</div>

