90 lines
3.8 KiB
PHP
90 lines
3.8 KiB
PHP
<?php include('pdf_header_reverse.php');
|
|
// include('pdf_header.php');
|
|
// include('includes/config/config.php');
|
|
// include('includes/functions.php')
|
|
//include('pop_up_top.php');
|
|
|
|
?>
|
|
<link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" />
|
|
|
|
<body>
|
|
<table width="100%">
|
|
<tr>
|
|
<div style="font-size:12px">
|
|
<td width="25%" align="left"> Run Date :
|
|
<?php echo date("d-M-Y"); ?>
|
|
</td>
|
|
<td width="50%" align="center" style="font-size:10px"><strong>Medical Item List</strong></td>
|
|
<td width="25%" align="left"> User :
|
|
<?php echo $username ?>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table border="1">
|
|
<?php
|
|
$sql = base64_decode($filterkey);
|
|
|
|
$result = mysqli_query($conn, $sql);
|
|
$count = 0;
|
|
?>
|
|
<tr bgcolor='#eeeeee'>
|
|
<th width="5%">Sr.
|
|
<th width="8%">Item Code</th>
|
|
<th width="10%">Item Name</th>
|
|
<th width="15%">Salt Name</th>
|
|
<th width="10%">Ailment Systems</th>
|
|
<th width="10%">Item Form</th>
|
|
<th width="10%">Usage Category</th>
|
|
<th width="10%">Category</th>
|
|
<th width="8%">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'], '');
|
|
$medicine_usage_cat = getTableFieldValue('medicine_usage_cat', 'medicine_usage_cat_name', 'medicine_usage_cat_id', $row1['medicine_usage_cat_id'], '');
|
|
//$subcat=getTableFieldValue('sub_category','sub_cat_name','sub_cat_id',$row1['subcat'],'');
|
|
$unit = getTableFieldValue('unit_master', 'unit_name', 'unit_id', $row1['unit_id'], '');
|
|
// $reorder_stock_level=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']);
|
|
|
|
$query_salt = "select group_concat(salt_id) as salt_id from item_salt where item_id='" . $item_id . "' ";
|
|
error_log("salt name query " . $query_salt);
|
|
|
|
if (!$result_salt = @mysqli_query($conn, $query_salt)) {
|
|
exit(mysqli_error($conn));
|
|
}
|
|
if (mysqli_num_rows($result_salt) > 0) {
|
|
$row_salt = mysqli_fetch_assoc($result_salt);
|
|
$salt_name = getCommaSeperatedValuesForInClause("select salt_name from salt_master", 'salt_id', $row_salt['salt_id']);
|
|
}
|
|
|
|
$count = $count + 1;
|
|
?>
|
|
<tr>
|
|
<td><?php echo $count ?></td>
|
|
<td><?php echo $item_code ?></td>
|
|
<td><?php echo $item_name ?></td>
|
|
<td><?php echo $salt_name ?></td>
|
|
<td><?php echo $item_ailment_systems ?></td>
|
|
|
|
<td><?php echo $item_form ?></td>
|
|
<td><?php echo $medicine_usage_cat ?></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');
|
|
?>
|