39 lines
1.2 KiB
PHP
39 lines
1.2 KiB
PHP
<?php
|
|
header("Content-type:application/octet-stream");
|
|
|
|
header("Content-type: application/x-msdownload");
|
|
header("Content-Disposition: attachment; filename=excel_pending_expiry_list.xls");
|
|
header("Pragma: no-cache");
|
|
header("Expires: 0");
|
|
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
|
|
?>
|
|
<?php
|
|
include('includes/config/config.php');
|
|
include('includes/functions.php')
|
|
//include('pop_up_top.php');
|
|
?>
|
|
|
|
<body>
|
|
<table border="1">
|
|
<?php
|
|
$sql=base64_decode($filterkey);
|
|
//echo $sql;
|
|
$result = mysqli_query($conn,$sql);
|
|
$count=0;
|
|
?><tr bgcolor='#eeeeee'><th width=5%>Sr.</th><th width=35%>Item</th><th width=20%>Quantity</th><th width=20%>Batch</th><th width=20%>Expiry</th></tr><?php
|
|
while($row1=mysqli_fetch_array($result)){
|
|
extract($row1);
|
|
|
|
|
|
$item_desc = getItemWithFormName($row1['item_id']);
|
|
$item_qty=$row1['stock_qty'];
|
|
$item_batch=$row1['item_batch_no'];
|
|
$item_expiry_date=date_format(date_create($row1['expiry_date']),"M-Y ");
|
|
$count=$count+1;
|
|
?><tr><td><?php echo $count;?></td><td> <?php echo $item_desc ; ?></td><td align="right"> <?php echo $item_qty ?></td><td align="right"> <?php echo $item_batch ?></td><td align="right"> <?php echo $item_expiry_date ?></td></tr>
|
|
<?php
|
|
}
|
|
|
|
?>
|
|
</table>
|
|
</body>
|