<?php 
$url_cancel= "index.php?route=ToolPlants/Assets_sales/FixedAssetsSalesreceipt_posting_index".$rurl;
$url_add= "index.php?route=ToolPlants/Assets_sales/FixedAssetsSalesreceipt_posting".$rurl;
?>
<?php
	if($_REQUEST['action']=='delete' && !empty($_REQUEST['isid']))
	{
		if($s->DeleteRecord('tpl_fixed_assetsales_recipt_posting',"id=".$_REQUEST['isid']))
		{			
			$_SESSION['success_msg']="Delete Successfully";
		
		}
	}

if($_REQUEST['Cancel']!='')
{
	unset($_REQUEST);
}
?>

<table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td style="padding:5px"><!-- General details -->
      <table width="100%" cellspacing="0" cellpadding="0" border="0" class="small">
        <tr>
          <td style="padding:5px; text-align:right;" colspan="4" align="center">
	<div align="center">
		
		<a href="<?php echo $url_add;?>">Add New</a></div>
        </tr>
        <tr>
          <td class="detailedViewHeader"  style="text-align:center;" colspan="4"><b>Fixed Asset Sales Receipt</b></td>
        </tr>
       
   <tr>
	<td><table width="100%" border="1" cellspacing="1" cellpadding="5" align="center">
  	<tr>
  		<th><strong>Sl. No.</strong></th>
	  	<th><strong>Receipt Project</strong></th>
	  		<th><strong>Purchaser</strong></th>
	  			<th><strong>Receipt No</strong></th>
	  			<th><strong>Receipt Date</strong></th>
	  	<th colspan="2"><strong>Action</strong></th>
   </tr>
              <tr>
              	<?php 
              	$record=$s->GetRecordById('tpl_fixed_assetsales_recipt_posting',1);
              	// $record=DB_query("select * from tpl_asset_transfer_issue",$db);
  					$i=0;
					while($row=DB_fetch_array($record))
					{
						$i++;
						extract($row);
						
              	?>
	           	<td><?php  echo "<b>". $i." : </b>";?></td>
	            <td><?php  echo $receipt_project;?> </td>
	             <td><?php  echo $purchaser;?> </td>
	              <td><?php  echo $receipt_no;?> </td>
	               <td><?php  echo $receipt_date;?> </td>
                <td><a href="<?php echo $url_add;?>&action=edit&isid=<?php echo $id;?>"><img src="images/icon-edit.png" width="10" height="10"></a> </td><td>
				<a href="<?php echo $url_cancel;?>&action=delete&isid=<?php echo $id;?>"><img src="images/Icon_Delete.png" width="10" height="10" onClick="return confirm('Are you sure you wish to delete this Record?')"></a></td>
              </tr><?php 
				} 
              ?>
            
            </table></td>
        </tr>
        <tr>
          <td style="padding:5px; text-align:right;" colspan="4" align="right"></td>
        </tr>
      </table></td>
  </tr>
</table>
<?php if(isset($_SESSION['success_msg']))
{ ?>
	<script> alert("<?php echo ($_SESSION['success_msg']);?>");</script>
<?php 
}	unset($_SESSION['success_msg']);
?>
