<?php session_name('CAKEPHP'); session_start();
$PageSecurity = 2;
include('includes/SQL_CommonFunctions.inc');
include('includes/DefinePOClass.php');
$title = _('Import Bill Book List');
$PageName ='Import Bill Book List';

if($_REQUEST['id']!='' && $_REQUEST['act']=='delete')
{
	$delete1=DB_query("Delete from import_billbook where id='".$_REQUEST['id']."'",$db);
	prnMsg( _('Record Deleted Successfully'),'success');
echo "<script>location.href='index.php?route=ImportBillBookList&modid=".$_REQUEST['modid']."&frmid=".$_REQUEST['frmid']."'</script>";
}
?>
<h2 align="center"><strong>Import Purchase Bill Book List</strong></h2>
<a href="index.php?route=ImportBillBook&modid=<?php echo $_REQUEST['modid'];?>&frmid=<?php echo $_REQUEST['frmid'];?>">ADD NEW BILL</a>
<br />
<br />
<table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <th>Bill No. </th>
    <th>Bill Date </th>
    <th>MRN No. </th>
    <th>MRN Date </th>
    <th>Branch</th>
    <th>Vendor</th>
    <th>View</th>
    <th>Edit</th>
    <th>Delete</th>
  </tr>
  <?php 
  $sql=DB_query("Select * from import_billbook",$db);
  $i=0;
  while($myrow=DB_fetch_array($sql)){
  ?>
  <tr bgcolor="#FFFFFF">
    <td><?php echo $myrow['billNo'];?></td>
    <td><?php echo $myrow['billDate'];?></td>
    <td><?php echo $myrow['mrnNo'];?></td>
    <td><?php echo $myrow['mrnDate'];?></td>
    <td><?php echo $myrow['site'];?></td>
    <td><?php echo $myrow['vendor'];?></td>
    <td><a href="">View</a></td>
    <td><a href="">Edit</a></td>    
    <td><a href="index.php?route=ImportBillBookList&modid=<?php echo $_REQUEST['modid'];?>&frmid=<?php echo $_REQUEST['frmid'];?>&id=<?php echo $myrow['id']?>&act=delete" onclick="return confirm('This record will be deleted. Are you sure?')">Delete</a></td>
  </tr>
  <?php } ?>
</table>

