ohctech_p8/direct_medicine_issue_excel.php

30 lines
1.0 KiB
PHP
Raw Normal View History

2024-10-16 19:18:52 +05:30
<?php
// include('pdf_header.php');
include('includes/config/config.php');
//include('pop_up_top.php');
header('Content-Type: application/force-download');
header('Content-disposition: attachment; filename=excel_issuepoint.xls');
?>
<table border="1" width="100%">
<?php
$sql="select a.*, b.type_name, c.item_name from direct_medicine_issue_log a left join direct_medicine_issue_log_details x on a.issue_log_id=x.issue_log_id left join medicine_issue_point b on a.issue_point_id = b.point_id left join tbl_items c on x.item_id = c.item_id";
//echo $sql;
$result = mysqli_query($conn,$sql);
?><tr bgcolor='#eeeeee'>
<th> Issue Type </th>
<th>Medicine Name</th>
<th>Issue Qty</th>
</tr><?php
while($rowOfEmployee=mysqli_fetch_array($result)){
?><tr>
<td><?php echo $rowOfEmployee['type_name']?></td>
<td><?php echo $rowOfEmployee['item_name']?></td>
<td><?php echo $rowOfEmployee['issue_qty']?></td>
</tr><?php
}
?>
</table>
<?php
// include('pdf_footer.php');
?>