<?php
 $modid=$_REQUEST['modid'];
$frmid=$_REQUEST['frmid'];
$rurl="&modid=".$modid."&frmid=".$frmid;
 if($_REQUEST['action']=='delete' and $_REQUEST['Id']!='')
{
 $del1=DB_query("delete from tbl_inprocess_audit_laminations where id='".$_REQUEST['Id']."'",$db);
  $del2=DB_query("delete from tbl_inprocess_audit_lamination_details where parent_id='".$_REQUEST['Id']."'",$db);
  $s->pageLocation('index.php?route=view_process_laminationaudit&modid='.$_REQUEST['modid'].'&frmid='.$_REQUEST['frmid'].$rurl);
}
?>

<h2 align="center">Audit Reportlist For Lamination/Window Lamination Audit</h2>
<a href="index.php?route=inprocess_laminiation&modid=<?php echo $_REQUEST['modid'];?>&frmid=<?php echo $_REQUEST['frmid'];?>">Add Audit Lamination/Window Laminations</a>
<br><br>
<table width="100%" border="0" cellpadding="2" cellspacing="2">
<tr>
<th>Branch</th>
<th>Job Ticket No</th>
<th>Lamination Slip No</th>
<th>Customer Name</th>
<th>Item Name</th>
<th>Machine Center </th>
<th>Operator</th>
<th>Shift</th>
<th>View</th>
<th>Edit</th>
<th>Delete</th>
</tr>
<?php
$sql=DB_query("Select * from tbl_inprocess_audit_laminations",$db);	
$i=0;
$num=DB_num_rows($sql);
if($num>0)
{
while($myrow=DB_fetch_array($sql))
{
?>
<tr bgcolor="#FFFFFF">
<td><?php   echo  $branch=$s->getField('locations','loccode',$myrow['branch_id'],'locationname');?></td>
<td><?php echo $branch1=$s->getField('job_route_card','id',$myrow['job_card_id'],'job_card_no');;?></td>
<td><?php echo $myrow['lamination_slip'];?></td>
<td><?php echo $myrow['customer_name'];?></td>
<td><?php echo $myrow['item_name'];?></td>
<td><?php echo $myrow['machine'];?></td>
<td><?php echo $myrow['operator'];?></td>
<td><?php echo $myrow['shift'];?></td>
<td><div align="center"><a href="index.php?route=view_inprocess_lamination&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=view_process_audit&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="9">No Records Find</td>
</tr>
<?php }   ?>
	
</table>
