Employee performance Report
This commit is contained in:
parent
1aeaac0b88
commit
d7cedfe621
@ -243,6 +243,7 @@ $route['Report_pending_purchase'] = "report/pending_purchase";
|
|||||||
$route['cashbookreport']="report/cashbook";
|
$route['cashbookreport']="report/cashbook";
|
||||||
$route['cashbookmonthlyexpenses']="report/monthexpenses";
|
$route['cashbookmonthlyexpenses']="report/monthexpenses";
|
||||||
$route['cashbookyearlyexpenses']="report/yearexpenses";
|
$route['cashbookyearlyexpenses']="report/yearexpenses";
|
||||||
|
$route['Empperform']="user/empPerFormation";
|
||||||
|
|
||||||
// Company Information
|
// Company Information
|
||||||
$route['companyview'] = 'companycontroller/companyview';
|
$route['companyview'] = 'companycontroller/companyview';
|
||||||
|
|||||||
@ -422,13 +422,20 @@ class user extends BaseController
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function monthattendance()
|
function monthattendance($empID ='')
|
||||||
{
|
{
|
||||||
|
|
||||||
$date = date('Y-m');
|
$date = date('Y-m');
|
||||||
//echo $date;
|
//echo $date;
|
||||||
$dates = $date . '-01';
|
$dates = $date . '-01';
|
||||||
|
$EmpID = '';
|
||||||
|
if(empty($empID)){
|
||||||
$EmpID = $this->input->post('id');
|
$EmpID = $this->input->post('id');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$EmpID = $empID;
|
||||||
|
}
|
||||||
// echo $EmpID;die;
|
// echo $EmpID;die;
|
||||||
$monthabs = $this->dahsboard_Model->attendance($EmpID, $dates);
|
$monthabs = $this->dahsboard_Model->attendance($EmpID, $dates);
|
||||||
$persent_month = date('t');//current month of days 31
|
$persent_month = date('t');//current month of days 31
|
||||||
@ -573,19 +580,29 @@ function monthattendance()
|
|||||||
$month['present_percentage'] = 0;
|
$month['present_percentage'] = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
echo json_encode($month);
|
if(empty($empID)){
|
||||||
|
echo json_encode($month);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return $month;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function attendanceyear()
|
function attendanceyear($empID ='')
|
||||||
{
|
{
|
||||||
//echo "hai";die;
|
//echo "hai";die;
|
||||||
$CURMONTH = date('m');
|
$CURMONTH = date('m');
|
||||||
$CURDATE = date('d');
|
$CURDATE = date('d');
|
||||||
$CURYEAR = date('Y');
|
$CURYEAR = date('Y');
|
||||||
|
$EmpID = '';
|
||||||
|
if(empty($empID)){
|
||||||
$EmpID = $this->input->post('id');
|
$EmpID = $this->input->post('id');
|
||||||
// $month = $this->monthattendance($EmpID);
|
}
|
||||||
// echo json_encode($month);
|
else
|
||||||
|
{
|
||||||
|
$EmpID = $empID;
|
||||||
|
}
|
||||||
$day = array();
|
$day = array();
|
||||||
$datejoin = $this->dahsboard_Model->joindate($EmpID);
|
$datejoin = $this->dahsboard_Model->joindate($EmpID);
|
||||||
$DateofJoiningInString = $datejoin[0]->DateofJoining;
|
$DateofJoiningInString = $datejoin[0]->DateofJoining;
|
||||||
@ -758,8 +775,48 @@ function attendanceyear()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode($data);
|
if(empty($empID)){
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function empPerFormation()
|
||||||
|
{
|
||||||
|
|
||||||
|
// $this->global['pageTitle'] = 'Siddharth : Reports';
|
||||||
|
//echo "welcome";
|
||||||
|
$EmpLists =$this->dahsboard_Model->getEmployee();
|
||||||
|
|
||||||
|
//print_r($EmpLists);die;
|
||||||
|
$index = 0;
|
||||||
|
$data['emp_performence_details'] = array();
|
||||||
|
foreach ($EmpLists as $Emp) {
|
||||||
|
$EmpID = $Emp->EmpID;
|
||||||
|
$FirstName =$Emp->FirstName;
|
||||||
|
$LastName =$Emp->LastName;
|
||||||
|
$IsActive =$Emp->IsActive;
|
||||||
|
|
||||||
|
//echo $EmpID;
|
||||||
|
$currentmonthemp = $this-> monthattendance($EmpID);
|
||||||
|
$fineyearemp = $this->attendanceyear($EmpID);
|
||||||
|
$a = array($EmpID,$FirstName,$LastName,$IsActive,$currentmonthemp,$fineyearemp);
|
||||||
|
$data['emp_performence_details'][$index]= $a;
|
||||||
|
//pre($data[$EmpID]['month']);die;
|
||||||
|
$index++;
|
||||||
|
}
|
||||||
|
|
||||||
|
//print_r($data['emp_performence_details']);die;
|
||||||
|
|
||||||
|
$this->loadViews("empperform", $this->global, $data, NULL);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************HR DASHBOART Controller END **************************************/
|
/****************HR DASHBOART Controller END **************************************/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
172
application/views/empperform.php
Normal file
172
application/views/empperform.php
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
<!-- <?php foreach ($emp_performence_details as $values)
|
||||||
|
{
|
||||||
|
print_r($values);
|
||||||
|
}
|
||||||
|
?> -->
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
|
||||||
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
span.highlight {
|
||||||
|
background-color: yellow;
|
||||||
|
}
|
||||||
|
div.dt-buttons {
|
||||||
|
position: relative;
|
||||||
|
float: right;
|
||||||
|
|
||||||
|
}
|
||||||
|
.btn-success {
|
||||||
|
background-color: #3c8dbc;
|
||||||
|
border-color: #3c8dbc;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
|
||||||
|
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Employees Performance</b></p></h3></center>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 text-right" style="margin-bottom:-3%;">
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<table id="PerForm" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
|
<thead style="background-color:#ddf">
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<th>EmpID</th>
|
||||||
|
<th>Employee Name </th>
|
||||||
|
<th>Status</th>
|
||||||
|
<th>MonthWorking</th>
|
||||||
|
<th>MonthPresent</th>
|
||||||
|
<th>MonthPercentage</th>
|
||||||
|
|
||||||
|
<th>YearWorking</th>
|
||||||
|
<th>YearPresent</th>
|
||||||
|
<th>YearPercentage</th>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
foreach ($emp_performence_details as $values)
|
||||||
|
{
|
||||||
|
|
||||||
|
?> <tr>
|
||||||
|
|
||||||
|
<td><?php echo $values[0] ?></td>
|
||||||
|
|
||||||
|
<td><?php echo $values[1] .' '.$values[2]?></td>
|
||||||
|
<?php if($values[3]==1){ ?>
|
||||||
|
|
||||||
|
<td><?php echo 'Active' ?></td>
|
||||||
|
<td><?php echo $values[4]['CUR_month'] ?></td>
|
||||||
|
<td><?php echo $values[4]['values'] ?></td>
|
||||||
|
<td><?php echo $values[4]['present_percentage'] ?></td>
|
||||||
|
|
||||||
|
<td><?php echo $values[5]['totaldays']?></td>
|
||||||
|
<td><?php echo $values[5]['workeds'] ?></td>
|
||||||
|
<td><?php echo $values[5]['yeardata'] ?></td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php }else
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
?> <td><?php echo 'InActive' ?></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td><?php echo $values[4]['CUR_month'] ?></td>
|
||||||
|
<td><?php echo $values[4]['values'] ?></td>
|
||||||
|
<td><?php echo $values[4]['present_percentage'] ?></td>
|
||||||
|
|
||||||
|
<td><?php echo $values[5]['totaldays']?></td>
|
||||||
|
<td><?php echo $values[5]['workeds'] ?></td>
|
||||||
|
<td><?php echo $values[5]['yeardata'] ?></td>
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js">
|
||||||
|
</script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
table = $('#PerForm').DataTable( {
|
||||||
|
|
||||||
|
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||||
|
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||||
|
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||||
|
buttons: [
|
||||||
|
|
||||||
|
{
|
||||||
|
extend: 'excelHtml5',
|
||||||
|
footer: 'true',
|
||||||
|
// messageTop: $('').text(),
|
||||||
|
title: 'Report -Employee Performance ',
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':visible'
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
'colvis'
|
||||||
|
]
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
</script>
|
||||||
|
|
||||||
@ -74,6 +74,8 @@
|
|||||||
<div class="col-xs-3">
|
<div class="col-xs-3">
|
||||||
<h4><span class="fa fa-calendar"> Attendance </span></h4>
|
<h4><span class="fa fa-calendar"> Attendance </span></h4>
|
||||||
<p class="uk-text uk-margin-remove" target="_blank" >Employee Attendance</p>
|
<p class="uk-text uk-margin-remove" target="_blank" >Employee Attendance</p>
|
||||||
|
|
||||||
|
<a href="<?php echo base_url(); ?>Empperform" target="_blank">Employee Performance<p class="uk-text uk-margin-remove"></p></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user