37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
<?php //include('pdf_header.php');
|
|
header("Content-type:application/octet-stream");
|
|
|
|
header("Content-type: application/x-msdownload");
|
|
header("Content-Disposition: attachment; filename=dispensary_stock_excel.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');
|
|
?>
|
|
<table border="1">
|
|
<?php
|
|
$sql=base64_decode($filterkey);
|
|
|
|
$result = mysqli_query($conn,$sql);
|
|
$count=0;
|
|
?><tr bgcolor='#eeeeee'><th width=10%>Sr.</th><th width=50%>Item Description</th><th width=40%>Stock Quantity</th></tr><?php
|
|
while($row1=mysqli_fetch_array($result)){
|
|
extract($row1);
|
|
|
|
$item_id=$row1['item_id'];
|
|
$item_desc = getTableFieldValue('tbl_items','item_name','item_id',$item_id);
|
|
$unit_id=getTableFieldValue('tbl_items','unit_id','item_id',$item_id);
|
|
$unit_name=getTableFieldValue('unit_master','unit_name','unit_id',$unit_id);
|
|
$count=$count+1;
|
|
?><tr><td><?php echo $count;?></td><td> <?php echo $item_desc ; ?></td><td> <?php echo $row1['stock_qty']." ".$unit_name; ?></td></tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</table>
|
|
<?php
|
|
//include('pdf_footer.php');
|
|
?>
|