<link rel="stylesheet" href="css/new_mxerp.css">
<?php
$modid=$_REQUEST['modid'];
$frmid=$_REQUEST['frmid'];
$rurl="&modid=".$modid."&frmid=".$frmid;
if($_REQUEST['action']=='delete' and $_REQUEST['Id']!='')
{
$del=DB_query("delete from tbl_production_capacity_plan where id='".$_REQUEST['Id']."'",$db);	
$s->pageLocation("index.php?route=production_capacity_planlist&daction=Updated".$rurl);
}
?>

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


<h1>Production Capacity Plan List</h1>
<a href="index.php?route=production_capacity_plan&modid=<?php echo
		 $_REQUEST['modid'];?>&frmid=<?php echo
	$_REQUEST['frmid'];?>">Add Production Capacity Plan</a> <br /><br />
<table width="100%" border="1" cellpadding="3" cellspacing="0" style="border-collapse:collapse; border:#666666 solid 1px;">
<tr>
<td class="tabledata">Sr. No </td>
<td class="tabledata">Item Name</td>
<td class="tabledata">Machine Group Center</td>
<td class="tabledata">Speed Kph</td>
<td class="tabledata">Prod Capacity</td>
<td class="tabledata">Westage Allow</td>
<td class="tabledata">Branch</td>
<td class="tabledata">View</td>
<td class="tabledata">Edit</td>
<td class="tabledata">Delete</td>
</tr>
<?php
$sql=DB_query("Select * from tbl_production_capacity_plan where CompanyId='".$_SESSION['ACGCompanyId']."'",$db);	
$i=1;
$num=DB_num_rows($sql);
if($num>0)
{
while($myrow=DB_fetch_array($sql))
{
$itemname=$s->getField('item_master','id',$myrow['item_id'],'item_name');	
$machinegroup=$s->getField('machine_group_master','id',$myrow['machine_group_id'],'machine_gp_location')
?>
<tr bgcolor="#c1c1c1">
<td><?php echo $i;?></td>
<td><?php echo $itemname;?></td>
<td><?php echo $machinegroup; ?></td>
<td><?php echo $myrow['speed_kph'];?></td>
<td><?php echo $myrow['prod_capacity'];?></td>
<td><?php echo $myrow['westage_allow'];?></td>
<td><?php echo $myrow['brach'];?></td>
<td><div align="center"><a href="">View</a></div></td>
<td><div align="center"><a href="">Edit</a></div></td>
<td><div align="center"><a href="index.php?route=production_capacity_planlist&modid=<?php echo $_REQUEST['modid'];?>&frmid=<?php echo $_REQUEST['frmid'];?>&action=delete&Id=<?php echo $myrow['id'];?>" onclick="return confirm('Are you sure you want to delete?')">Delete</a></div></td>
</tr>
<?php $i++;}}
else { ?>
	<tr bgcolor="#FFFFFF">
<td colspan="12">No Records Find</td>
</tr>
<?php }   ?>
	
</table>

</div></div>