ATTENDANCE ISSUES FIXED
This commit is contained in:
parent
28e1661996
commit
10fa80b1d1
@ -64,7 +64,7 @@ class monthlypay extends BaseController
|
||||
|
||||
|
||||
$hname = $d->Holiday_Name;
|
||||
$hdate = $d->Date;
|
||||
$hdate = date_format(date_create($d->Date),'Y-m-d');
|
||||
|
||||
$tostore = array('H_Name'=>$hname,'H_Date'=>$hdate);
|
||||
$isExist = $this->monthlypay_model->checkHoliday($hdate);
|
||||
@ -178,7 +178,7 @@ class monthlypay extends BaseController
|
||||
|
||||
|
||||
$res = $this->monthlypay_model->saveAttendance($monthattendance,$Month_Year,$EmpID);
|
||||
echo $res;
|
||||
// echo $res;
|
||||
$total = $total + $res;
|
||||
// die();
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ class Payroll_model extends CI_Model
|
||||
// echo $source.'-'.$year1.'-'.$year2;
|
||||
|
||||
$this->db->distinct();
|
||||
$this->db->select('Pay.EmpID,Emp.FirstName as FName ,Emp.LastName as Lname,sum(Loan_Amount) as Loan_Amount,sum(Paid_Amount) as Paid_Amount');
|
||||
$this->db->select('Pay.EmpID,Emp.FirstName as FName ,Emp.LastName as Lname,sum(loan.Loan_Amount) as Loan_Amount,sum(loan.Paid_Amount) as Paid_Amount');
|
||||
$this->db->from('T_Emp_Pay_Data Pay');
|
||||
$this->db->join('T_Employee_Details Emp', 'Pay.EmpID = Emp.EmpID');
|
||||
$this->db->join('T_Loan_Master loan', 'Pay.EmpID = loan.EmpID');
|
||||
|
||||
@ -203,7 +203,7 @@ $attendance = array_merge($attendance,$emppay);
|
||||
echo form_input($data);?>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="submit" value="Change Month" class="btn btn-primary" onclick="changeMonth();" title='click here for load attendance for specified month'>
|
||||
<input type="submit" value="Change Month" class="btn btn-primary" title='click here for load attendance for specified month'>
|
||||
</div>
|
||||
|
||||
|
||||
@ -313,7 +313,7 @@ $attendance = array_merge($attendance,$emppay);
|
||||
|
||||
<th class="celda_encabezado_general" rowspan="2">S.NO</th>
|
||||
<th class="celda_encabezado_general" rowspan="2">Employee ID</th>
|
||||
<th class="celda_encabezado_general" rowspan="2">Employee Name</th>
|
||||
<th style="background-color:#3c8dbc;color:#fff;border:5px" rowspan="2">Employee Name</th>
|
||||
|
||||
|
||||
<?php
|
||||
@ -369,9 +369,9 @@ $attendance = array_merge($attendance,$emppay);
|
||||
foreach($finalarray as $a){ $row++;$index++;?>
|
||||
|
||||
<tr id="<?php echo $row;?>">
|
||||
<td class="celda_normal" ><?php echo $index;?></td>
|
||||
<td class="celda_normal"><?php echo $a->EmpID;?></td>
|
||||
<td class="celda_normal"><?php echo $a->FirstName.'-'.$a->LastName;?></td>
|
||||
<td width="45" height="45" class="celda_normal" ><?php echo $index;?></td>
|
||||
<td width="79" height="45"class="celda_normal"><?php echo $a->EmpID;?></td>
|
||||
<td width="80" height="45" class="celda_normal"><?php echo $a->FirstName.'-'.$a->LastName;?></td>
|
||||
|
||||
<?php for ($col =1; $col <= $monthdays;$col++){
|
||||
$flag =0;
|
||||
@ -602,6 +602,8 @@ function myFunction(p,i,v)
|
||||
var totalDaysWorked=0;
|
||||
var absent = 0;
|
||||
var sundays = <?php echo $noofsundays?>;
|
||||
var publicholidays = <?php echo $noofpublicholidays?>;
|
||||
|
||||
var totaldays = <?php echo $monthdays?>;
|
||||
totaldays = (totaldays * 2)+3;
|
||||
//console.log(totaldays);
|
||||
@ -712,7 +714,7 @@ function myFunction(p,i,v)
|
||||
document.getElementById(totalhrsid).innerHTML = parseFloat(totalworkingHrs).toFixed(2);// == ''?0:parseFloat(totalworkingHrs));
|
||||
document.getElementById(totalothrsid).innerHTML = parseFloat(totalOTHrs).toFixed(2);// == ''?0:parseFloat(totalOTHrs));
|
||||
document.getElementById(paidleaveid).innerHTML = parseFloat(paidleave).toFixed(2);
|
||||
document.getElementById(daysworkedid).innerHTML = parseFloat((totalworkingHrs/8)+4).toFixed(2);
|
||||
document.getElementById(daysworkedid).innerHTML = parseFloat((totalworkingHrs/8)+sundays+publicholidays).toFixed(2);
|
||||
document.getElementById(absentid).innerHTML = parseFloat(absent).toFixed(2);
|
||||
}
|
||||
|
||||
|
||||
@ -329,7 +329,7 @@ $('html').bind('keypress', function(e)
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
// alert(data);
|
||||
var trHTML="";
|
||||
var obj =JSON.parse(data);
|
||||
var temparray = [];
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
$(function() {
|
||||
|
||||
$("#hdate").datepicker({
|
||||
dateFormat: 'yy-mm-dd',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
});
|
||||
$('html').bind('keypress', function(e)
|
||||
@ -99,14 +99,15 @@ $('html').bind('keypress', function(e)
|
||||
|
||||
{
|
||||
$index++;
|
||||
|
||||
?>
|
||||
$date = date_create($day->H_Date);
|
||||
$date = date_format($date,'d-m-Y');
|
||||
?>
|
||||
|
||||
<tr id="<?php echo $index;?>">
|
||||
<!-- <td style="text-align:right;"><?php echo $index ?></td> -->
|
||||
|
||||
<td contenteditable='true' style="text-align:right;"><?php if(!empty($day->H_Name)){echo $day->H_Name;}else{echo "NO DATA";}?></td>
|
||||
<td contenteditable='true' style="text-align:right;"><?php if(!empty($day->H_Date)){echo $day->H_Date;}else{echo "NO DATA";}?></td>
|
||||
<td contenteditable='true' style="text-align:left;"><?php if(!empty($day->H_Name)){echo $day->H_Name;}else{echo "NO DATA";}?></td>
|
||||
<td contenteditable='true' style="text-align:right;"><?php echo $date;?></td>
|
||||
<td style="text-align:right;"><a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" id="Del" ><span class="glyphicon glyphicon-trash"></span></a></td>
|
||||
|
||||
</tr>
|
||||
@ -157,7 +158,7 @@ $('html').bind('keypress', function(e)
|
||||
</script>
|
||||
<script type="text/html" id="addList">
|
||||
<tr id="<%=index%>">
|
||||
<td style="text-align:right;" ><%=Holiday_Name%></td>
|
||||
<td style="text-align:left;" contenteditable="true"><%=Holiday_Name%></td>
|
||||
<td style="text-align:right;" contenteditable="true"><%=Date%></td>
|
||||
<td style="text-align:right;">
|
||||
<a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
||||
@ -219,6 +220,7 @@ $('#submit').click(function(){
|
||||
|
||||
var jsondata = $('#phdays').tableToJSON();
|
||||
var jsondata = JSON.stringify(jsondata);
|
||||
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:{param1:jsondata},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user