236 lines
7.2 KiB
PHP
236 lines
7.2 KiB
PHP
<?php
|
|
include('pdf_header.php');
|
|
include('includes/config/config.php');
|
|
include_once('includes/functions.php');
|
|
$from_date = $_REQUEST['startDate2'];
|
|
$to_date = $_REQUEST['endDate2'];
|
|
|
|
|
|
//include('pop_up_top.php');
|
|
?>
|
|
<link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" />
|
|
|
|
<body>
|
|
<style>
|
|
.tbl2 {
|
|
font-size: 12px;
|
|
|
|
border: 1px solid black;
|
|
border-collapse: collapse;
|
|
|
|
}
|
|
|
|
.tbl2 td,
|
|
th {
|
|
font-size: 12px;
|
|
|
|
border: 1px solid black;
|
|
border-collapse: collapse;
|
|
|
|
padding: 4px;
|
|
}
|
|
|
|
@page {
|
|
margin: 15px;
|
|
}
|
|
|
|
.btn {
|
|
background-color: #4CAF50;
|
|
border-radius: 5%;
|
|
/* Green */
|
|
border: none;
|
|
color: white;
|
|
padding: 5px 8px;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
font-size: 12px;
|
|
margin: 4px 2px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
@media print {
|
|
#printPageButton {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|
|
<table width="100%" class="tbl2">
|
|
<tr>
|
|
<div style="font-size:15px">
|
|
|
|
<td width="50%" align="center" style="font-size:20px"><strong>BIO WASTE GENERATION REPORT</strong></td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<?php
|
|
|
|
|
|
include("pdf_ohc_header.php");
|
|
?>
|
|
|
|
<table width="100%">
|
|
<tr>
|
|
|
|
<td align="left"><strong>From <?= $from_date ?> - <?= $to_date ?></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="right" style="font-size: 15px"><button align="center" id="printPageButton"
|
|
class="btn btn-success" onClick="window.print();">Print</button></td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
|
|
<table border="1" width="100%" class="tbl2">
|
|
<?php
|
|
|
|
//$sql_waste="SELECT c.ohc_type_name,a.waste_category_name,b.* FROM `waste_category` a inner join bio_medical_waste b on a.waste_category_id=b.waste_category inner join ohc_type c on c.ohc_type_id=b.ohc_type_id where b.ohc_type_id='".$_SESSION['current_ohcttype']."' ";
|
|
//$results_issue_items = mysqli_query($conn,$sql_issue_items);
|
|
//$sql=base64_decode($filterkey);
|
|
|
|
//$results= mysqli_query($conn,$sql_waste);
|
|
$sql = "SELECT * FROM `bio_medical_waste_new` WHERE `ohc_type_id` = '" . $_SESSION['current_ohcttype'] . "' and date(`waste_gen_date`) between STR_TO_DATE('" . $from_date . "', '%d-%m-%Y') AND STR_TO_DATE('" . $to_date . "', '%d-%m-%Y') order by waste_gen_date ASC";
|
|
error_log('bwr_query' . $sql);
|
|
$result = mysqli_query($conn, $sql);
|
|
|
|
?>
|
|
<tr>
|
|
<th rowspan="2">Sr.No.</th>
|
|
<th rowspan="2">Date of Disposal</th>
|
|
<th rowspan="2">Date of generation</th>
|
|
<th rowspan="2">Storage</th>
|
|
<th colspan="4">Quantity of Bio- Medical Waste</th>
|
|
<th colspan="4">No. Of Bags</th>
|
|
<th rowspan="2">Collected By</th>
|
|
<th rowspan="2">Purpose of Sending</th>
|
|
<th rowspan="2">Transportation</th>
|
|
<th rowspan="2">Chalan No. & Date</th>
|
|
<th rowspan="2">Signature of Collector</th>
|
|
<th rowspan="2">Remarks</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th bgcolor="#f9e84e">Yellow Category (in gm)</th>
|
|
|
|
<th bgcolor="#fa8072">Red Category (in gm)</th>
|
|
<th bgcolor="#6495ed">Blue Category (in gm)</th>
|
|
<th bgcolor="#eeeeee">White Category (in gm)</th>
|
|
<th bgcolor="#f9e84e">Yellow</th>
|
|
|
|
|
|
<th bgcolor="#6495ed">Blue</th>
|
|
<th bgcolor="#fa8072">Red</th>
|
|
<th bgcolor="#eeeeee">White</th>
|
|
</tr>
|
|
|
|
<?php
|
|
$count = 1;
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
|
extract($row);
|
|
?>
|
|
|
|
<tr>
|
|
<td align="center"><?php echo $count ?></td>
|
|
<td align="center"><?php echo date_format(date_create($row['waste_gen_date']), "d-M-Y ") ?></td>
|
|
<td align="center"><?php echo date_format(date_create($row['waste_gen_date']), "d-M-Y ") ?></td>
|
|
|
|
<td align="center"></td>
|
|
|
|
<td align="center" bgcolor="#f9e84e"><?php echo $row['plant_yellow_qty'] ?></td>
|
|
|
|
|
|
|
|
<td align="center" bgcolor="#fa8072"><?php echo $row['plant_red_qty'] ?></td>
|
|
|
|
<td align="center" bgcolor="#6495ed"><?php echo $row['plant_blue_qty'] ?></td>
|
|
|
|
<td align="center" bgcolor="#eeeeee"><?php echo $row['plant_white_qty'] ?></td>
|
|
|
|
<td align="center" bgcolor="#f9e84e"><?php echo $row['yellow_bags'] ?></td>
|
|
|
|
|
|
|
|
<td align="center" bgcolor="#6495ed"><?php echo $row['blue_bags'] ?></td>
|
|
|
|
<td align="center" bgcolor="#fa8072"><?php echo $row['red_bags'] ?></td>
|
|
|
|
<td align="center" bgcolor="#eeeeee"><?php echo $row['white_bags'] ?></td>
|
|
|
|
<td align="center"><?php echo $row['collected_by'] ?></td>
|
|
|
|
<td align="center"></td>
|
|
|
|
<td align="center"><?php echo $row['vehicle_no'] ?></td>
|
|
|
|
<td align="center"><?php echo $row['challan_no'] ?></td>
|
|
|
|
<td align="center"></td>
|
|
|
|
<td align="center"></td>
|
|
|
|
<td align="center"></td>
|
|
|
|
|
|
</tr>
|
|
<?php
|
|
$count++;
|
|
}
|
|
?>
|
|
<?php $sql1 = "SELECT SUM(plant_yellow_qty ) as plant_yellow_qty,sum(yellow_bags) as total_yellow_bags,sum(plant_white_qty) as plant_white_qty,sum(white_bags) as total_white_bags,sum(plant_blue_qty) as plant_blue_qty,sum(blue_bags) as total_blue_bags,sum(plant_red_qty) as plant_red_qty,sum(red_bags) as total_red_bags FROM `bio_medical_waste_new` WHERE `ohc_type_id` = '" . $_SESSION['current_ohcttype'] . "' and date(`waste_gen_date`) between STR_TO_DATE('" . $from_date . "', '%d-%m-%Y') AND STR_TO_DATE('" . $to_date . "', '%d-%m-%Y')";
|
|
error_log($sql1);
|
|
$result1 = mysqli_query($conn, $sql1);
|
|
$row1 = mysqli_fetch_assoc($result1);
|
|
extract($row1);
|
|
//echo "hello".$row1[0];
|
|
$plant_yellow_qty = $row1['plant_yellow_qty'];
|
|
$no_yellow_bags = $row1['total_yellow_bags'];
|
|
|
|
|
|
$plant_blue_qty = $row1['plant_blue_qty'];
|
|
$no_blue_bags = $row1['total_blue_bags'];
|
|
|
|
$plant_red_qty = $row1['plant_red_qty'];
|
|
$no_red_bags = $row1['total_red_bags'];
|
|
|
|
$plant_white_qty = $row1['plant_white_qty'];
|
|
$no_white_bags = $row1['total_white_bags'];
|
|
|
|
//echo $abc;
|
|
|
|
?>
|
|
<tr>
|
|
<td colspan="4" align="center"></td>
|
|
<td align="center">Total:<?php echo round($plant_yellow_qty, 3, PHP_ROUND_HALF_EVEN); ?>gm</td>
|
|
|
|
|
|
|
|
<td align="center">Total:<?php echo round($plant_red_qty, 3, PHP_ROUND_HALF_EVEN); ?>gm</td>
|
|
<td align="center">Total:<?php echo round($plant_blue_qty, 3, PHP_ROUND_HALF_EVEN); ?>gm</td>
|
|
|
|
|
|
|
|
<td align="center">Total:<?php echo round($plant_white_qty, 3, PHP_ROUND_HALF_EVEN); ?>gm</td>
|
|
|
|
|
|
<td align="center">Total:<?php echo $no_yellow_bags; ?></td>
|
|
|
|
|
|
|
|
<td align="center">Total:<?php echo $no_blue_bags; ?></td>
|
|
|
|
<td align="center">Total:<?php echo $no_red_bags; ?></td>
|
|
|
|
|
|
<td align="center">Total:<?php echo $no_white_bags; ?></td>
|
|
|
|
<td colspan="6"></td>
|
|
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
|
|
<?php
|
|
// include('pdf_footer.php');
|
|
?>
|