diff --git a/application/models/monthlypay_model.php b/application/models/monthlypay_model.php
old mode 100644
new mode 100755
index 18bc6307..cec87f4d
--- a/application/models/monthlypay_model.php
+++ b/application/models/monthlypay_model.php
@@ -28,20 +28,15 @@ class monthlypay_model extends CI_Model
function getEmpPayDetails($current="",$s="")
{
- //echo $s;die();
- if($s == ''){
- $current = '01-'.$current;
- $current = date_create($current);
- $current = date_format($current,"Y-m-d");
- }
- $this->db->select('T_Emp_Pay_Data.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Employee_Details.DateofJoining');
- $this->db->from('T_Emp_Pay_Data');
- $this->db->join('T_Employee_Details ','T_Emp_Pay_Data.EmpID=T_Employee_Details.EmpID');
- $this->db->where('T_Employee_Details.DateofJoining <=',$current);
+ $this->db->select('T_Employee_Details.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Employee_Details.DateofJoining');
+ $this->db->from('T_Employee_Details');
+ //$this->db->join('T_Emp_Pay_Data','T_Emp_Pay_Data.EmpID=T_Employee_Details.EmpID','Left');
+ $this->db->where('T_Employee_Details.IsActive',1);
$this->db->order_by('EmpID','asc');
$query = $this->db->get();
- $result = $query->result();
+ $result = $query->result();
+
return $result;
}
@@ -113,7 +108,7 @@ class monthlypay_model extends CI_Model
function deleteHoliday($d)
{
- //echo "from Model" . $d;
+ $d = date_format(date_create($d),'Y-m-d');
$this->db->where('H_date',$d);
$this->db->delete('T_Public_Holidays');
return $this->db->affected_rows();
diff --git a/application/views/attendance.php b/application/views/attendance.php
old mode 100644
new mode 100755
index 8d64ae27..827a46ce
--- a/application/views/attendance.php
+++ b/application/views/attendance.php
@@ -18,7 +18,9 @@ $datefordropdown = date_create($datefordropdown);
$datefordropdown = date_format($datefordropdown,'M-Y');
//echo $datefordropdown;
$attendance = array_merge($attendance,$emppay);
-// echo count($attendance) ."
";
+date_default_timezone_set('Asia/Kolkata');
+$currentday = date('d');
+
// print_r($attendance);
// echo "
------------------------------
";
@@ -207,6 +209,7 @@ $attendance = array_merge($attendance,$emppay);
+
@@ -215,29 +218,7 @@ $attendance = array_merge($attendance,$emppay);
format("D") == "Sun") //Check that the day is Sunday here
- // {
-
- // array_push($ind,$begin->format("d"));
- // }
-
- // $begin->modify('+1 day');
- // }
- // $noofsundays = count($ind);
$testarray=array();
$finalarray = array();
@@ -263,42 +244,7 @@ $attendance = array_merge($attendance,$emppay);
}
}
}
-//print_r($testarray);echo count($testarray);
-//echo "
...........................
";
-//print_r($finalarray);echo count($finalarray);
-// $index = 0;
-// foreach($finalarray as $gg )
-// {
- // echo "
...........................
";
- // $index = $index +1;
- // echo "S.NO" . $index . "
";
- // echo "EmpID" . $gg->EmpID ."
";
- // //echo $key ."-".$value;
-
- // for ($col =1; $col <= $monthdays;$col++){
- // $flag =0;
- // foreach($ind as $in)
- // {
- // if($in == $col)
- // {
- // $flag = 1;
- // }
- // }
- // $WH='WH'.$col;
- // $OT = 'OT'.$col;
-
-
- // if(!empty($gg->$WH)){echo "WORK" . $gg->$WH."--";}else{echo "WORK" . "0--";}
-
- // if(!empty($gg->$OT)){echo "OT" . $gg->$OT. "--";}else{echo "OT" . "0--";}
- // }
-// // /// echo "$WH";
- // //print_r($gg);
-
- // //break;
-
-// }
-//die();
+
?>
@@ -322,6 +268,13 @@ $attendance = array_merge($attendance,$emppay);
$flag =0;
$flag2 = 0;
+ $todayflag = 0;
+
+ if($col == $currentday)
+ {
+ $todayflag = 1;
+
+ }
foreach($sundayarray as $in) //For Find out Sundays($ind) from $monthdays array
{
if($in == $col)
@@ -329,31 +282,32 @@ $attendance = array_merge($attendance,$emppay);
$flag = 1;
}
}
-
+ $title = '';
foreach($publicholidaysarray as $h) //For Find out public holidays from $monthdays array
{
$temp = $h->H_Date;
$temp = substr($temp,8);
- $title = '';
+
if($temp == $col)
{
$flag2 = 1;
//$title ="Public Holiday-" . str_replace(" ","_",$h->H_Name);
$title = str_replace(" ","_",$h->H_Name);
//echo $title;
-
}
}
?>
-
title = "Sunday" title = class="celda_encabezado_general" >".$col . "W";}else{echo $col."W";}?> |
- title = "Sunday" title = class="celda_encabezado_general" >".$col . "OT";}else{echo $col."OT";}?> |
+ title = " " title = "sunday" class="celda_encabezado_general" > ".$col."W";} else { echo $col."W"; } ?> |
+ title = " " title = "sunday" class="celda_encabezado_general" > ".$col."OT";} else { echo $col."OT"; }?> |
Total Hrs |
OT Hrs |
@@ -371,11 +325,18 @@ $attendance = array_merge($attendance,$emppay);
|
- EmpID;?> |
+ EmpID;?> |
FirstName.'-'.$a->LastName;?> |
H_Date;
$temp = substr($temp,8);
$title = '';
- $flag2 = 0;
+ //echo $temp.'-'.$col.'/';
if($temp == $col)
{
$flag2 = 1;
@@ -403,11 +364,12 @@ $attendance = array_merge($attendance,$emppay);
$OT = 'OT'.$col;
?>
- title = "Sunday" title = class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id ="" contenteditable = "true">$WH)){echo $a->$WH;}else{echo "";}?> |
- title = "Sunday" title = class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id ="" contenteditable = "true">$OT)){echo $a->$OT;}else{echo "";}?> |
+ title = " " title = "sunday" class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "" contenteditable = "true" tabindex=""> $WH)){echo $a->$WH;} else { echo '0';}?> |
+ title = " " title = "sunday" class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "" contenteditable = "true" tabindex=""> $OT)){echo $a->$OT;} else { echo '0';}?> |
Total_WHrs)){echo $a->Total_WHrs;}else{echo "0.00";}?> |
Total_OTHrs)){echo $a->Total_OTHrs;}else{echo "0.00";}?> |
@@ -464,18 +426,9 @@ $attendance = array_merge($attendance,$emppay);
//alert(currentmonth);
var currentdate = '01-'+currentmonth+'-'+currentyear;
- //alert(currentdate);
- // var today = new Date();
- // alert(today);
- // var day =today.getDate();
- // alert(day);
- // var month =today.getMonth();
- // month++;
- // alert(month);
- // var year = today.getFullYear();
- // alert(year);
- var totaldata = 0;
- $('#content').loader('hide');
+
+ var totaldata = 0;
+ $('.content').loader('show');
$.ajax({
data:{param1:alldata,param2:currentdate,param3:Totalnoofdays},
//dataType:"json",
@@ -485,7 +438,7 @@ $attendance = array_merge($attendance,$emppay);
success:function(data) {
if(data)
{
- $('#content').loader('hide');
+ $('.content').loader('hide');
alert(data);
//totaldata = totaldata + parseFloat(data);
//console.log(data);
@@ -511,8 +464,9 @@ $attendance = array_merge($attendance,$emppay);
$("#attendance").CongelarFilaColumna({lboHoverTr:true});
$('html').bind('keypress', function(e)
{
- //alert(e.which || e.keyCode);
- if(((e.which || e.keyCode) == 8) || ((e.which || e.keyCode) == 9) || ((e.which || e.keyCode) == 46) || ((e.which || e.keyCode) == 37) || ((e.which || e.keyCode) == 39))
+
+
+ if(((e.which || e.keyCode) == 8) || ((e.which || e.keyCode) == 9) || ((e.which || e.keyCode) == 46) || ((e.which || e.keyCode) == 37) || ((e.which || e.keyCode) == 39))
{
return true;
@@ -531,17 +485,44 @@ $attendance = array_merge($attendance,$emppay);
- });
-
-
});
+
+ $('td').focus(function(e){
+
+ var id = e.target.id;
+ var val = document.getElementById(id).textContent
+ console.log(val);
+ if(val == 0)
+ {
+ window.setTimeout(function(){ document.getElementById(id).textContent = ''; }, 0);
+ }
+ });
+
+ $('td').focusout(function(e){
+
+ var id = e.target.id;
+ var val = document.getElementById(id).textContent
+ if(val == '')
+ {
+ window.setTimeout(function(){ document.getElementById(id).textContent = '0'; }, 0);
+ }
+ console.log(val);
+ });
+
+
+ });
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/application/views/monthlypayinputs.php b/application/views/monthlypayinputs.php
old mode 100644
new mode 100755
index 616bfeeb..7d460971
--- a/application/views/monthlypayinputs.php
+++ b/application/views/monthlypayinputs.php
@@ -184,10 +184,10 @@ $('html').bind('keypress', function(e)
|
EmpID ?> |
FirstName ." ". $record->LastName ?> |
- Key)){echo "contenteditable='true';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Days_worked)){echo $record->Days_worked;}else{echo "0.00";}?> |
- Key)){echo "contenteditable='true';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >LOP_Days)){echo $record->LOP_Days;}else{echo "0.00";}?> |
- Key)){echo "contenteditable='true';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Paid_leave)){echo number_format($record->Paid_leave,2,'.','');}else { echo number_format(0.00,2,'.','');} ?> |
- Key)){echo "contenteditable='true';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >OT_Hrs_Worked)){echo $record->OT_Hrs_Worked;}else { echo number_format(0.00,2,'.','');} ?> |
+ Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Days_worked)){echo $record->Days_worked;}else{echo "0.00";}?> |
+ Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >LOP_Days)){echo $record->LOP_Days;}else{echo "0.00";}?> |
+ Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Paid_leave)){echo number_format($record->Paid_leave,2,'.','');}else { echo number_format(0.00,2,'.','');} ?> |
+ Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >OT_Hrs_Worked)){echo $record->OT_Hrs_Worked;}else { echo number_format(0.00,2,'.','');} ?> |
Key)){echo "contenteditable='true';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Loan_Recovered)){if(is_numeric($record->Loan_Recovered)){echo number_format($record->Loan_Recovered,2,'.','');}else {echo $record->Loan_Recovered;}}else{echo number_format(0.00,2,'.','');} ?> |
Key)){echo "contenteditable='true';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Incentives)){echo $record->Incentives;}else{ echo number_format(0.00,2,'.','');;} ?> |
Key)){echo "contenteditable='true';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Other_Deductions)){echo $record->Other_Deductions; }else{ echo number_format(0.00,2,'.','');;} ?> |
@@ -318,6 +318,7 @@ $('html').bind('keypress', function(e)
var finaldate = month.concat(hyphan);
var finaldate = finaldate.concat(res[1]);
//alert(finaldate);
+ $('.content').loader('show');
$.ajax({
data:{param1:finaldate},
@@ -371,10 +372,10 @@ $('html').bind('keypress', function(e)
'' + (i) + ' | ' +
'' + val.EmpID + ' | ' +
'' + val.FirstName+" "+ val.LastName + ' | ' +
- '' + Days_Worked + ' | ' +
- '' + LOP_Days + ' | ' +
- '' + Paid_leave + ' | ' +
- '' + OT_Hrs_Worked + ' | ' +
+ '' + Days_Worked + ' | ' +
+ '' + LOP_Days + ' | ' +
+ '' + Paid_leave + ' | ' +
+ '' + OT_Hrs_Worked + ' | ' +
'' + Loan_Recovered + ' | ' +
'' + Incentives + ' | ' +
'' + Other_Deductions+ ' | ' +
@@ -386,6 +387,7 @@ $('html').bind('keypress', function(e)
// //alert(trHTML);
//alert(temparray);
$('#monthlyListings > tbody').append(trHTML);
+ $('.content').loader('hide');
}
}
});
diff --git a/application/views/paysliplist.php b/application/views/paysliplist.php
old mode 100644
new mode 100755
diff --git a/application/views/publicholidays.php b/application/views/publicholidays.php
old mode 100644
new mode 100755
index 34142c04..0f06c5e2
--- a/application/views/publicholidays.php
+++ b/application/views/publicholidays.php
@@ -144,7 +144,7 @@ $('html').bind('keypress', function(e)