diff --git a/application/controllers/payslip.php b/application/controllers/payslip.php index f1f9d360..fe5fbcfa 100755 --- a/application/controllers/payslip.php +++ b/application/controllers/payslip.php @@ -486,12 +486,12 @@ function getEmployee() $EmpId = $sheet->getCell('A'.$x)->getValue(); $EmpId=strtoupper($EmpId); - $LOPDays = $sheet->getCell('B'.$x)->getValue(); - $OTHoursWorked =$sheet->getCell('C'.$x)->getValue(); - $loanRecovered=$sheet->getCell('D'.$x)->getValue(); + $LOPDays = $sheet->getCell('C'.$x)->getValue(); + $OTHoursWorked =$sheet->getCell('D'.$x)->getValue(); + $loanRecovered=$sheet->getCell('E'.$x)->getValue(); //$loanBalance=$sheet->getCell('E'.$x)->getValue(); - $Incentive =$sheet->getCell('E'.$x)->getValue(); - $Other_Deductions =$sheet->getCell('F'.$x)->getValue(); + $Incentive =$sheet->getCell('F'.$x)->getValue(); + $Other_Deductions =$sheet->getCell('G'.$x)->getValue(); if( $EmpId != '') { diff --git a/application/models/emppaydate_model.php b/application/models/emppaydate_model.php index 786d30b8..342caee8 100755 --- a/application/models/emppaydate_model.php +++ b/application/models/emppaydate_model.php @@ -50,8 +50,9 @@ class emppaydate_model extends CI_Model function emppayListing($searchText = '', $page, $segment) { - $this->db->select('*'); + $this->db->select('T_Emp_Pay_Data.*,T_Employee_Details.FirstName,T_Employee_Details.LastName'); $this->db->from('T_Emp_Pay_Data'); + $this->db->join('T_Employee_Details','T_Emp_Pay_Data.EmpID=T_Employee_Details.EmpID'); if(!empty($searchText)) { @@ -98,11 +99,12 @@ class emppaydate_model extends CI_Model } function getUserInfo($paydataid) { - $this->db->select(); + $this->db->select('T_Emp_Pay_Data.*,T_Employee_Details.FirstName,T_Employee_Details.LastName'); $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('isDeleted', 0); //$this->db->where('roleId !=', 1); - $this->db->where('Pay_Data_ID', $paydataid); + $this->db->where('T_Emp_Pay_Data.Pay_Data_ID', $paydataid); $query = $this->db->get(); //print_r($query->result()); //die(); diff --git a/application/models/monthlypay_model.php b/application/models/monthlypay_model.php index 409d940a..21eaf321 100755 --- a/application/models/monthlypay_model.php +++ b/application/models/monthlypay_model.php @@ -41,8 +41,10 @@ class monthlypay_model extends CI_Model */ function monthlyListing($searchText = '', $page, $segment) { - $this->db->select('*'); + $this->db->select('T_Monthly_Pay_Inputs.*,T_Employee_Details.FirstName,T_Employee_Details.LastName'); $this->db->from('T_Monthly_Pay_Inputs'); + $this->db->join('T_Employee_Details','T_Monthly_Pay_Inputs.EmpID=T_Employee_Details.EmpID'); + //$this->db->where('month.EmpID=mast.EmpID'); $this->db->order_by("Month_Year", "desc"); @@ -57,7 +59,7 @@ class monthlypay_model extends CI_Model OR Other_Deductions LIKE '%".$searchText."%' )"; - $this->db->where($likeCriteria); + $this->db->where('T_Monthly_Pay_Inputs.EmpID',$likeCriteria); } $this->db->limit($page, $segment); @@ -82,12 +84,13 @@ function addNewmonthlisting($m_list) } function getUserInfo($EmpID,$month_year) { - $this->db->select('Month_Year, EmpID, LOP_Days, OT_Hrs_Worked, Loan_Recovered,Incentives, Other_Deductions, Created_By, Created_Time, Last_Mod_By, Last_Mod_Time'); + $this->db->select('T_Monthly_Pay_Inputs.*,T_Employee_Details.FirstName,T_Employee_Details.LastName'); $this->db->from('T_Monthly_Pay_Inputs'); + $this->db->join('T_Employee_Details','T_Monthly_Pay_Inputs.EmpID=T_Employee_Details.EmpID'); //$this->db->where('isDeleted', 0); //$this->db->where('roleId !=', 1); - $this->db->where('EmpID', $EmpID); - $this->db->where('Month_Year', $month_year); + $this->db->where('T_Monthly_Pay_Inputs.EmpID', $EmpID); + $this->db->where('T_Monthly_Pay_Inputs.Month_Year', $month_year); $query = $this->db->get(); return $query->result(); diff --git a/application/views/editOldemppay.php b/application/views/editOldemppay.php index 740dcd17..7344676a 100755 --- a/application/views/editOldemppay.php +++ b/application/views/editOldemppay.php @@ -48,6 +48,7 @@ if (loan == paid) $Pay_Data_ID=''; $EmpID=''; + $Empname=""; $Basic_Pay=''; $HRA_Rate=''; $OT_Rate=''; @@ -82,6 +83,7 @@ if(!empty($emppay)) $Pay_Data_ID=$ep->Pay_Data_ID; $EmpID=$ep->EmpID; + $Empname=$ep->FirstName ." ". $ep->LastName ; $TotalSalary=$ep->TotalSalary; $Basic_Pay=$ep->Basic_Pay; $HRA_Rate=$ep->HRA_Rate; @@ -167,9 +169,25 @@ if(!empty($emppay)) + +