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

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

<h1>Production Planning List</h1>
<a href="index.php?route=production_planning_jobcard&modid=<?php echo $_REQUEST['modid'];?>&frmid=<?php echo $_REQUEST['frmid'];?>">Add Production Planning Job card</a>
<br><br>
<table width="100%" border="1" cellspacing="0" cellpadding="3" style="border-collapse:collapse; border:#999999 solid 1px;">
<tr>
<td class="tabledata">Job Card No</td>
<td class="tabledata">Vouchar No </td>
<td class="tabledata">Sop No</td>
<td class="tabledata">Party</td>
<td class="tabledata">Item Name</td>
<td class="tabledata">View</td>
<td class="tabledata">Edit</td>
<td class="tabledata">Delete</td>
</tr>
<?php
$sql=DB_query("Select * from job_production_card where CompanyId='".$_SESSION['ACGCompanyId']."'",$db);	
$i=0;
$num=DB_num_rows($sql);
if($num>0)
{
while($myrow=DB_fetch_array($sql))
{
	$jobcard=$s->getField('job_route_card','id',$myrow['job_card_id'],'job_card_no');
?>
<tr bgcolor="#c1c1c1">
<td><?php echo $jobcard;?></td>
<td><?php echo $myrow['vouchar_no'];?></td>
<td><?php echo $myrow['sop_no'];?></td>
<td><?php echo $myrow['party_name'];?></td>
<td><?php echo $myrow['item_name'];?></td>
<td><div align="center"><a href="index.php?route=view_production_planning&modid=<?php echo $_REQUEST['modid'];?>&frmid=<?php echo $_REQUEST['frmid'];?>&action=edit&Id=<?php echo $myrow['id'];?>">View</a></div></td>
<td><div align="center"><a href="">Edit</a></div></td>
<td><div align="center"><a href="index.php?route=production_planning_jobcardllist&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>
</div></div>