<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_monthwise_production where id='".$_REQUEST['Id']."'",$db);	
$s->pageLocation("index.php?route=month_wise_productionlist&daction=Updated".$rurl);
}
?>

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

<h1>MonthWise Production Schedule List</h1>
<a href="index.php?route=month_wise_production&modid=<?php echo $_REQUEST['modid'];?>&frmid=<?php echo $_REQUEST['frmid'];?>">Add MonthWise Production List</a>
<br /><br />
<table width="100%" border="1" cellpadding="3" cellspacing="0" style="border-collapse:collapse; border:#666666 solid 1px;">
<tr>
<td class="tabledata">SOP No.</td>
<td class="tabledata">Delivery schudule</td>
<td class="tabledata">Item Code</td>
<td class="tabledata">Quantity</td>
<td class="tabledata">View</td>
<td class="tabledata">Edit</td>
<td class="tabledata">Delete</td>
</tr>
<?php
$sql=DB_query("Select * from tbl_monthwise_production where CompanyId='".$_SESSION['ACGCompanyId']."'",$db);	
$i=0;
$num=DB_num_rows($sql);
if($num>0)
{
while($myrow=DB_fetch_array($sql))
{
$itemname=$s->getField('item_master','StockID',$myrow['item_code'],'item_name');	
?>
<tr bgcolor="#c1c1c1">
<td><?php echo $myrow['sop_no'];?></td>
<td><?php echo $myrow['delivery_schudule'];?></td>
<td><?php echo $itemname;?></td>
<td><?php echo $myrow['quantity'];?></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=month_wise_productionlist&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="#c1c1c1">
<td colspan="12">No Records Find</td>
</tr>
<?php }   ?>
	
</table>
