41 lines
1.6 KiB
PHP
41 lines
1.6 KiB
PHP
|
<?php
|
||
|
header("Content-type:application/octet-stream");
|
||
|
|
||
|
header("Content-type: application/x-msdownload");
|
||
|
header("Content-Disposition: attachment; filename=excel_procurement.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" width="100%">
|
||
|
<?php
|
||
|
|
||
|
?><strong><tr bgcolor='#eeeeee'><th width="5%">Sr.</th><th align="center" width="50%">Item</th><th width="5%" align="center" >Qty</th><th align="center" width="5%">Batch</th><th align="center" width="10%">Expiry Date</th></tr></strong>
|
||
|
|
||
|
<?php
|
||
|
$count=0;
|
||
|
$sql_expiry_items="SELECT * from cleanup_item_stock a order by a.expiry_date desc";
|
||
|
error_log($sql_expiry_items . "query");
|
||
|
$results_expiry_items = mysqli_query($GLOBALS['conn'],$sql_expiry_items);
|
||
|
error_log($GLOBALS['conn']);
|
||
|
while ($row_expiry_items= mysqli_fetch_assoc($results_expiry_items)) {
|
||
|
|
||
|
$id=$row_expiry_items['stock_expiry_hist_id'];
|
||
|
$item_name = getTableFieldValue('tbl_items','item_name','item_id',$row_expiry_items['item_id']);
|
||
|
$item_qty=$row_expiry_items['cleanup_qty'];
|
||
|
$item_batch=$row_expiry_items['batch_no'];
|
||
|
$item_expiry_date=date_format(date_create($row_expiry_items['expiry_date']),"M-Y ");
|
||
|
$count=$count+1;
|
||
|
?><tr><td><center><?php echo $count?></center></td><td><?php echo $item_name ?></td><td><center><?php echo $item_qty?></center></td><td><center><?php echo $item_batch?></center></td><td><center><?php echo $item_expiry_date?></center></td></td><?php
|
||
|
}
|
||
|
|
||
|
?>
|
||
|
|
||
|
</table>
|