<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']!='')
{
 $del1=DB_query("delete from tbl_inprocess_audit_hotfoil where id='".$_REQUEST['Id']."'",$db);
  $del2=DB_query("delete from tbl_inprocess_audit_checkpoint_details where parent_id='".$_REQUEST['Id']."'",$db);
  $s->pageLocation('index.php?route=view_process_audit&modid='.$_REQUEST['modid'].'&frmid='.$_REQUEST['frmid'].$rurl);
}
?>

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

<h1>Audit Reportlist For Hot Foil Stamping</h1>
<a href="index.php?route=in_process_printing_report&modid=<?php echo $_REQUEST['modid'];?>&frmid=<?php echo $_REQUEST['frmid'];?>">Hot Foil Stamping</a>
<br><br>
<table width="100%" border="1" cellspacing="0" cellpadding="3" style="border-collapse:collapse; border:#999999 solid 1px;">
   <tr>
<td class="tabledata">Branch</td>
<td class="tabledata">Job Ticket No</td>
<td class="tabledata">Hot Foil Slip No</td>
<td class="tabledata">Customer Name</td>
<td class="tabledata">Item Name</td>
<td class="tabledata">Machine Center </td>
<td class="tabledata">Operator</td>
<td class="tabledata">Shift</td>
<td class="tabledata">View</td>
<td class="tabledata">Edit</td>
<td class="tabledata">Delete</td>
</tr>
<?php
$sql=DB_query("Select * from tbl_inprocess_audit_hotfoil",$db);	
$i=0;
$num=DB_num_rows($sql);
if($num>0)
{
while($myrow=DB_fetch_array($sql))
{
?>
<tr bgcolor="#c1c1c1">
<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['hotfoil_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_process_audit_data&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="#c1c1c1">
<td colspan="9">No Records Find</td>
</tr>
<?php }   ?>
	
</table>
</div></div>