121 lines
3.9 KiB
PHP
121 lines
3.9 KiB
PHP
<?php //include('pdf_header_reverse.php');
|
|
include('includes/config/config.php');
|
|
include('includes/functions.php');
|
|
//include('pop_up_top.php');
|
|
|
|
$startDate = date('Y-m-d', strtotime($_POST['startDate_fees']));
|
|
$endDate = date('Y-m-d', strtotime($_POST['endDate_fees']));
|
|
// $from_date = date('d-m-Y', strtotime($from_date1));
|
|
error_log("start date ".$startDate);
|
|
error_log("end date ".$endDate);
|
|
$ohc = $_POST['ohc_id6'];
|
|
?>
|
|
<link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" />
|
|
<style>
|
|
@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>
|
|
|
|
<body>
|
|
<?php include('pdf_current_ohc_header.php'); ?>
|
|
<h3><center>Fees Report</center></h3>
|
|
<table width="100%">
|
|
<tr>
|
|
|
|
<td style="font-size: 15px;"><strong style="margin-left: 650px"></strong></td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td align="left" style="font-size: 12px"><strong>Duration: <?php echo date("d-M-Y", strtotime($startDate)); ?> to <?php echo date("d-M-Y", strtotime($endDate)); ?></strong></td>
|
|
<!-- <td align="center" style="font-size: 15px"><button id="printPageButton" class="btn btn-success" onClick="window.print();">Print</button></td> -->
|
|
<td align="right" style="font-size: 12px"><strong>Selected Location : <?=getFieldFromTable('ohc_type_name','ohc_type','ohc_type_id', $ohc)?></strong></td>
|
|
</tr>
|
|
|
|
</table>
|
|
<br>
|
|
<table border="1" width="100%" cellspacing="0">
|
|
<?php
|
|
$sqll = "SELECT count(*) as total FROM employee_appointment a JOIN patient_master b on a.emp_id=b.id WHERE a.ohc_type_id='" . $_POST['ohc_id6'] . "' and date(a.appointment_date) between STR_TO_DATE('" . $startDate . "', '%Y-%m-%d') AND STR_TO_DATE('" . $endDate . "', '%Y-%m-%d')";
|
|
|
|
$result_sqll = mysqli_query($conn, $sqll);
|
|
$num_rows = mysqli_num_rows($result_sqll);
|
|
$row0 = mysqli_fetch_assoc($result_sqll);
|
|
error_log("total:" . $sqll);
|
|
|
|
$sql = "SELECT * from fee_collection WHERE date(collection_date) between STR_TO_DATE('" . $startDate . "', '%Y-%m-%d') AND STR_TO_DATE('" . $endDate . "', '%Y-%m-%d') AND ohc_type_id='" . $_POST['ohc_id6'] . "'";
|
|
error_log($sql."get sql");
|
|
|
|
$result = mysqli_query($conn, $sql);
|
|
|
|
?>
|
|
|
|
<strong>
|
|
<tr bgcolor="#eeeeee">
|
|
<td>Sr.No</td>
|
|
<td>Trainee Name</td>
|
|
<td>Fees</td>
|
|
<td>Receipt No</td>
|
|
<td>Date</td>
|
|
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
$count = 1;
|
|
while ($row1 = mysqli_fetch_assoc($result)) {
|
|
extract($row1);
|
|
|
|
// error_log($row1['employer_contractor_id']);
|
|
|
|
?>
|
|
|
|
<tr>
|
|
<td><?php echo $count ?></td>
|
|
<td><?php echo getFieldFromTable('patient_name','patient_master','id', $row1['beneficiary_name']) ?></td>
|
|
<td><?php echo $row1['fee_amount'] ?></td>
|
|
<td><?php echo $row1['fee_collection_id'] ?></td>
|
|
|
|
<td><?php echo date('d-m-Y', strtotime($row1['collection_date'])) ?></td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
<?php
|
|
$count++;
|
|
}
|
|
?>
|
|
<!-- <tr Height="10px">
|
|
<td colspan="25"><b>TOTAL: <?php echo $row0['total'] ?></b></td>
|
|
</tr> -->
|
|
</table>
|
|
</body>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
window.print();
|
|
|
|
});
|
|
</script>
|