74 lines
2.7 KiB
PHP
74 lines
2.7 KiB
PHP
<?php
|
|
|
|
//include ('pdf_header_reverse.php');
|
|
include ('includes/config/config.php');
|
|
include ('includes/functions.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: 30px">Bio Medical Waste
|
|
Generation Report</td>
|
|
<td width="25%" align="left"> User : <?php echo $username ?></td>
|
|
<?php if(isset($from_date) && isset($to_date)){?>
|
|
<td width="25%" align="right"> Range : <?php echo $from_date; ?> to <?php echo $to_date ;?></td>
|
|
<?php }?>
|
|
</tr>
|
|
</table>
|
|
<table width="87%" border="1">
|
|
<tr>
|
|
<th width="2%" align="left">Sr</th>
|
|
<th align="left" width="10%">Waste Gen. Date</th>
|
|
<th align="left" width="30%">waste Category</th>
|
|
<th align="left" width="10%">QTY(grams)</th>
|
|
<th width="10%" align="left">Comments</th>
|
|
<th width="10%" align="left">IsDisposed</th>
|
|
<th width="10%" align="left">Disposal Comments</th>
|
|
</tr>
|
|
<?php
|
|
|
|
$from_date = $_REQUEST['startDate'];
|
|
$to_date = $_REQUEST['endDate'];
|
|
|
|
$sql_stock = "select * from bio_medical_waste";
|
|
if(isset($from_date) && isset($to_date)){
|
|
$sql_stock="select * from bio_medical_waste where date_format(date(waste_gen_date),'%Y-%m-%d') between STR_TO_DATE('".$from_date."', '%d-%m-%Y') AND STR_TO_DATE('".$to_date."', '%d-%m-%Y')";
|
|
echo $sql_stock;
|
|
}
|
|
$results_stock = @mysqli_query($conn,$myconn,$sql_stock);
|
|
$count = 0;
|
|
while ($row_stock = @mysqli_fetch_array($results_stock)) {
|
|
// $issue_date=$row_stock[];
|
|
// $item_desc = getTableFieldValue('tbl_items', 'item_name', 'item_id', $row_stock['item_id']);
|
|
// $emp_id = getTableFieldValue('employee_appointment', 'emp_id', 'appointment_id', $row_stock['appointment_id']);
|
|
// $issue_datetime = getTableFieldValue('employee_appointment', 'appointment_date', 'appointment_id', $row_stock['appointment_id']);
|
|
// $issue_date = new DateTime($issue_datetime);
|
|
|
|
// $employee_name = getTableFieldValue('employee', "CONCAT(fname, ' ', lname)", 'id', $emp_id);
|
|
$waste_gen_date = $row_stock['waste_gen_date'];
|
|
$waste_category = $row_stock['waste_category'];
|
|
$qty = $row_stock['qty'];
|
|
$comments = $row_stock['comments'];
|
|
$isDisposed = $row_stock['isDisposed'];
|
|
$disposal_comments = $row_stock['disposal_comments'];
|
|
?><tr>
|
|
<td><?php echo ++$count?></td>
|
|
<td><?php echo $waste_gen_date->format('d/m/Y');?></td>
|
|
<td><?php echo $waste_category?></td>
|
|
<td><?php echo $qty?></td>
|
|
<td><?php echo $comments?></td>
|
|
<td><?php echo $isDisposed?></td>
|
|
<td><?php echo $disposal_comments?></td>
|
|
</tr><?php
|
|
}
|
|
|
|
?>
|
|
|
|
</table>
|
|
<?php
|
|
//include('pdf_footer.php');
|
|
?>
|