ESH/excel_manage_item.php
2024-10-23 18:28:06 +05:30

37 lines
1.8 KiB
PHP

<?php //include('pdf_header.php');
include('includes/config/config.php');
include('includes/functions.php');
//include('pop_up_top.php');
header('Content-Type: application/force-download');
header('Content-disposition: attachment; filename=excel_manage_item.xls');
?>
<table border="1">
<?php
$sql=base64_decode($filterkey);
$result = mysqli_query($conn,$sql);
$count=0;
?><tr bgcolor='#eeeeee'><th width=5%>Sr.<th width=15%>Item Code</th><th width=15%>Item Desc</th><th width=10%>Ailment Systems</th><th width=15%>Item Form</th><th width=10%>Category</th>
<th width=10%>Status</th><th width=10%>Is Prescription</th><th width=10%>Reorder Qty</th></tr><?php
while($row1=mysqli_fetch_array($result)){
extract($row1);
$item_id=$row1['item_id'];
$cat=getTableFieldValue('tbl_categories','cat_name','cat_id',$row1['cat'],'');
$item_form=getTableFieldValue('medicine_form','form_name','form_id',$row1['item_form_id'],'');
//$subcat=getTableFieldValue('sub_category','sub_cat_name','sub_cat_id',$row1['subcat'],'');
$unit=getTableFieldValue('unit_master','unit_name','unit_id',$row1['unit_id'],'');
/*$item_ingredients =getCommaSeperatedValuesForInClause("select ingredient_name from ingredient ","ingredient_id",$row1['active_ingredients']);*/
$item_ailment_systems = getCommaSeperatedValuesForInClause("select ailment_sys_name from ailment_system ","ailment_sys_id",$row1['ailments']);
$count=$count+1;
?><tr><td><?php echo $count?></td><td><?php echo $item_code ?></td><td><?php echo $item_name?></td>
<td><?php echo $item_ailment_systems?></td><td><?php echo $item_form?></td><td> <?php echo $cat?></td><td> <?php echo $status==1?'Active':'Inactive'?></td>
<td><?php echo $is_prescription==1?'Yes':'No' ?></td><td><?php echo $reorder_stock_level?></tr>
<?php
}
?>
</table>
<?php
//include('pdf_footer.php');
?>