From 3461c7f75b3eba7287eb13f07517b87d9193d67f Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Tue, 28 Nov 2017 14:48:20 +0530 Subject: [PATCH] Paydata issue fixed --- application/models/monthlypay_model.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/application/models/monthlypay_model.php b/application/models/monthlypay_model.php index 79b97e70..cec87f4d 100755 --- 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; }