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

600 lines
16 KiB
PHP

<?php include('techsyn_header.php'); ?>
<!-- Main Content Container for side bar and body-->
<div class="main-container ace-save-state" id="main-container">
<script type="text/javascript">
try{ace.settings.loadState('main-container')}catch(e){}
</script>
<?php include('techsyn_sidebar.php'); ?>
<!--breadcrumb-->
<?php
?>
<div class="main-content">
<div class="main-content-inner">
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
<ul class="breadcrumb">
<li class="active">Reports</li>
<li class="active">Medicine Report</li>
</ul>
<!-- End of breadcrumb -->
</div>
<div class="page-content">
<div id="flexigridDiv" class="table-responsiv">
<h4 style="font-size: 15px; text-align: center; font-weight: bold">Medicine Report</h4>
<table class="table table-bordered"
style="margin-left:10px; width: 100%">
<tr>
<td width="50%" align="left"><b><h4>Report name</h4></b></td>
<td align="left"><select class="chosen-select" id="report_type"
name="report_type" onchange="show_report(this.value)">
<option value="" disabled selected>please select a report</option>
<?php
$sql_report="SELECT a.report_id AS report_id, a.report_name AS repotName FROM report_master a left join assign_report b on a.report_id=b.report_id where b.role_id='". $_SESSION['RoleId']."' and report_type = 'R' ";
//echo $sql_report;
//where b.role_id='". $_SESSION['RoleId']."'
?>
<?php
echo generate_options($sql_report, '','report_id', 'repotName', 'report_type','') ?>
</select></td>
</tr>
</table>
<form id="hygiene_gaps_report"
name="hygiene_gaps_report">
<table id="hygiene_gaps" class="table table-bordered"
style="margin-left:10px; width: 100%;display:none">
<thead>
<tr>
<td align="left" style="font-size: 10px" width="15%"><strong>Report</strong></td>
<td style="font-size: 10px" width="15%"><strong>Select Employee</strong></td>
<td style="font-size: 10px" width="10%"><strong>From Date</strong></td>
<td style="font-size: 10px" width="10%"><strong>To Date</strong></td>
<td style="font-size: 10px" width="10%"><strong>Pdf</strong></td>
<td style="font-size: 10px" width="10%"><strong>Excel</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td>Medicine Issue Report</td>
<td>
<select
style="height: 30px;font-size: 10px" class="chosen-select form-control"
name="empName" data-placeholder="Select Employee" id="empName"
autofocus="autofocus" required>
<option value="All">All Employee</option>
<?php echo getEmployeeOptions() ?>
</select>
</td>
<td>
<div class="input-group">
<input class="form-control date-picker"
style="width: 80px; font-size: 10px; height: 25px;"
id="startDate" name="startDate" type="text"
data-date-format="dd-mm-yyyy" /> <span
class="input-group-addon"> <i
class="fa fa-calendar bigger-110"></i>
</span>
</div>
</td>
<td>
<div class="input-group">
<input class="form-control date-picker"
style="width: 80px; font-size: 10px; height: 25px;"
id="endDate" name="endDate" type="text"
data-date-format="dd-mm-yyyy" /> <span
class="input-group-addon"> <i
class="fa fa-calendar bigger-110"></i>
</span>
</div>
</td>
<td align="left" ><a href="#"
onclick="medicine_issue_report_pdf();"><i
class="glyphicon glyphicon-file"></i></a></td>
<td align="left"><a href="#"
onclick="medicine_issue_report_excel();"><i
class="glyphicon glyphicon-download-alt"></i></a></td>
</tr>
</tbody>
</table>
</form>
<form id="daily_log_report"
name="daily_log_report">
<table id="daily_log" class="table table-bordered"
style="margin-left:10px; width: 100%;display:none;">
<thead>
<tr>
<td align="left" style="font-size: 10px" width="15%"><strong>Report</strong></td>
<td style="font-size: 10px" width="15%"><strong>Date</strong></td>
<td style="font-size: 10px" width="15%"><strong>Pdf</strong></td>
<td style="font-size: 10px" width="15%"><strong>Excel</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td>Daily medicine log report</td>
<td>
<div class="input-group">
<input class="form-control date-picker"
style="width: 180px; font-size: 10px; height: 25px;"
id="startDate" name="startDate" type="text"
data-date-format="dd-mm-yyyy" /> <span
class="input-group-addon"> <i
class="fa fa-calendar bigger-110"></i>
</span>
</div>
</td>
<td align="left" ><a href="#"
onclick="daily_log_report_pdf();"><i
class="glyphicon glyphicon-file"></i></a></td>
<td align="left"><a href="#"
onclick="daily_log_report_excel();"><i
class="glyphicon glyphicon-download-alt"></i></a></td>
</tr>
</tbody>
</table>
</form>
<form id="monthly_expense_report"
name="monthly_expense_report">
<table id="monthly_expense" class="table table-bordered"
style="margin-left:10px; width: 100%;display: none">
<thead>
<tr>
<td align="left" style="font-size: 10px" width="15%"><strong>Report</strong></td>
<td style="font-size: 10px" width="10%"><strong>From Date</strong></td>
<td style="font-size: 10px" width="10%"><strong>To Date</strong></td>
<td style="font-size: 10px" width="15%"><strong>Pdf</strong></td>
<td style="font-size: 10px" width="15%"><strong>Excel</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td>Monthly Expense report</td>
<td>
<div class="input-group">
<input class="form-control date-picker"
style="width: 80px; font-size: 10px; height: 25px;"
id="startDate" name="startDate" type="text"
data-date-format="dd-mm-yyyy" /> <span
class="input-group-addon"> <i
class="fa fa-calendar bigger-110"></i>
</span>
</div>
</td>
<td>
<div class="input-group">
<input class="form-control date-picker"
style="width: 80px; font-size: 10px; height: 25px;"
id="endDate" name="endDate" type="text"
data-date-format="dd-mm-yyyy" /> <span
class="input-group-addon"> <i
class="fa fa-calendar bigger-110"></i>
</span>
</div>
</td>
<td align="left" ><a href="#"
onclick="monthly_expense_report_pdf();"><i
class="glyphicon glyphicon-file"></i></a></td>
<td align="left"><a href="#"
onclick="monthly_expense_report_excel();"><i
class="glyphicon glyphicon-download-alt"></i></a></td>
</tr>
</tbody>
</table>
</form>
<form id="yearly_medicine_expense"
name="yearly_medicine_expense">
<table id="yearly_medicine" class="table table-bordered"
style="margin-left:10px; width: 100%;display: none">
<thead>
<tr>
<td align="left" style="font-size: 10px" width="15%"><strong>Report</strong></td>
<td style="font-size: 10px" width="15%"><strong>YEAR</strong></td>
<td style="font-size: 10px" width="15%"><strong>Pdf</strong></td>
<td style="font-size: 10px" width="15%"><strong>Excel</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td>Yearly Expense Report</td>
<td>
<div class="input-group">
<select class="chosen-select form-control"
id="year" name="year"
data-placeholder="Choose Year" >
<?php $d=date('Y', strtotime('-1 year'));
$e=date("Y"); ?>
<option value="<?php echo $d?>"><?php echo $d?>-<?php echo $e?></option>
<?php $x=date("Y");
$y=date('Y', strtotime('+1 year')); ?>
<option value="<?php echo $x?>"><?php echo $x?>-<?php echo $y?></option>
</select>
</div>
</td>
<td align="left" ><a href="#"
onclick="yearly_expense_report_pdf();"><i
class="glyphicon glyphicon-file"></i></a></td>
<td align="left"><a href="#"
onclick="yearly_expense_report_excel();"><i
class="glyphicon glyphicon-download-alt"></i></a></td>
</tr>
</tbody>
</table>
</form>
<form id="daily_medicine_expense"
name="daily_medicine_expense">
<table id="daily_medicine" class="table table-bordered"
style="margin-left:10px; width: 100%;display: none">
<thead>
<tr>
<td align="left" style="font-size: 10px" width="15%"><strong>Report</strong></td>
<td style="font-size: 10px" width="15%"><strong>month</strong></td>
<td style="font-size: 10px" width="15%"><strong>Pdf</strong></td>
<td style="font-size: 10px" width="15%"><strong>Excel</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td>Daily Expense Report</td>
<td>
<div class="input-group">
<select class="chosen-select form-control"
id="month" name="month"
data-placeholder="Choose month" >
<option value="1">JANUARY</option>
<option value="2">FEBRUARY</option>
<option value="3">MARCH</option>
<option value="4">APRIL</option>
<option value="5">MAY</option>
<option value="6">JUNE</option>
<option value="7">JULY</option>
<option value="8">AUGUST</option>
<option value="9">SEPTEMBER</option>
<option value="10">OCTOBER</option>
<option value="11">NOVEMBER</option>
<option value="12">DECEMBER</option>
</select>
</div>
</td>
<td align="left" ><a href="#"
onclick="daily_expense_report_pdf();"><i
class="glyphicon glyphicon-file"></i></a></td>
<td align="left"><a href="#"
onclick="daily_expense_report_excel();"><i
class="glyphicon glyphicon-download-alt"></i></a></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
<?php include('techsyn_footer.php'); ?>
<style>
.input-group-addon {
height: 25px;
width: 30px;
padding: 0px 0px;
}
</style>
<script>
function medicine_issue_report_pdf(){
document.forms['hygiene_gaps_report'].action="medicine_issue_report_pdf.php";
document.forms['hygiene_gaps_report'].method='POST';
document.forms['hygiene_gaps_report'].target='_blank'
document.forms['hygiene_gaps_report'].submit();
}
function medicine_issue_report_excel(){
document.forms['hygiene_gaps_report'].action="medicine_issue_report_excel.php";
document.forms['hygiene_gaps_report'].method='POST';
document.forms['hygiene_gaps_report'].target='_blank'
document.forms['hygiene_gaps_report'].submit();
}
function daily_log_report_pdf(){
document.forms['daily_log_report'].action="daily_log_report_pdf.php";
document.forms['daily_log_report'].method='POST';
document.forms['daily_log_report'].target='_blank'
document.forms['daily_log_report'].submit();
}
function daily_log_report_excel(){
document.forms['daily_log_report'].action="daily_log_report_excel.php";
document.forms['daily_log_report'].method='POST';
document.forms['daily_log_report'].target='_blank'
document.forms['daily_log_report'].submit();
}
function monthly_expense_report_pdf(){
document.forms['monthly_expense_report'].action="monthly_expense_report_pdf.php";
document.forms['monthly_expense_report'].method='POST';
document.forms['monthly_expense_report'].target='_blank'
document.forms['monthly_expense_report'].submit();
}
function monthly_expense_report_excel(){
document.forms['monthly_expense_report'].action="monthly_expense_report_excel.php";
document.forms['monthly_expense_report'].method='POST';
document.forms['monthly_expense_report'].target='_blank'
document.forms['monthly_expense_report'].submit();
}
function yearly_expense_report_pdf(){
document.forms['yearly_medicine_expense'].action="yearly_expense_report_pdf.php";
document.forms['yearly_medicine_expense'].method='POST';
document.forms['yearly_medicine_expense'].target='_blank'
document.forms['yearly_medicine_expense'].submit();
}
function yearly_expense_report_excel(){
document.forms['yearly_medicine_expense'].action="yearly_expense_report_excel.php";
document.forms['yearly_medicine_expense'].method='POST';
document.forms['yearly_medicine_expense'].target='_blank'
document.forms['yearly_medicine_expense'].submit();
}
function daily_expense_report_pdf(){
document.forms['daily_medicine_expense'].action="daily_expense_report_pdf.php";
document.forms['daily_medicine_expense'].method='POST';
document.forms['daily_medicine_expense'].target='_blank'
document.forms['daily_medicine_expense'].submit();
}
function daily_expense_report_excel(){
document.forms['daily_medicine_expense'].action="daily_expense_report_excel.php";
document.forms['daily_medicine_expense'].method='POST';
document.forms['daily_medicine_expense'].target='_blank'
document.forms['daily_medicine_expense'].submit();
}
function show_report(repID){
if (repID === '30') {
$("#hygiene_gaps").show();
}
else {
$("#hygiene_gaps").hide();
}
if (repID === '31') {
$("#daily_log").show();
}
else {
$("#daily_log").hide();
}
if (repID === '32') {
$("#monthly_expense").show();
}
else {
$("#monthly_expense").hide();
}
if (repID === '33') {
$("#yearly_medicine").show();
}
else {
$("#yearly_medicine").hide();
}
if (repID === '34') {
$("#daily_medicine").show();
}
else {
$("#daily_medicine").hide();
}
}
</script>