HR module issues fixes

This commit is contained in:
VE10-Sanjeev 2025-05-14 13:15:56 +00:00
parent 8bb5eba5d6
commit 656a27f907
3 changed files with 8 additions and 29 deletions

View File

@ -279,7 +279,9 @@ class Employeedetails extends BaseController
$Nominee = $this->request->getPost('nomineename');
$createdby = $this->session->get('userId');
$is_management_team = $this->request->getPost('is_management_team');
$is_management_team = ($is_management_team != '') ? '1' : '0';
$is_driver = $this->request->getPost('is_driver');
$is_driver = ($is_driver != '') ? '1' : '0';
$TDS_Rate = $this->request->getPost('TDS_Rate');
$tds_applicable=$this->request->getPost('tds_applicable');
@ -346,7 +348,7 @@ class Employeedetails extends BaseController
'esi_applicable' => $esi_applicable,
'pf_applicable' => $pf_applicable,
'work_location' => $work_location,
'is_driver' => ($is_driver === null || $is_driver === '') ? 0 : $is_driver,
'is_driver' => $is_driver,
);
//print_r($Employee);die();
@ -783,7 +785,9 @@ class Employeedetails extends BaseController
$Nominee = $this->request->getPost('nomineename');
$chked = $this->request->getPost('isactive');
$is_management_team = $this->request->getPost('is_management_team');
$is_management_team = ($is_management_team != '') ? '1' : '0';
$is_driver = $this->request->getPost('is_driver');
$is_driver = ($is_driver != '') ? '1' : '0';
$esi_applicable = $this->request->getPost('esi_applicable');
$pf_applicable = $this->request->getPost('pf_applicable');
$work_location = $this->request->getPost('work_location');
@ -854,7 +858,7 @@ class Employeedetails extends BaseController
'ESI' => $esino,
'NomineeDetails' => $Nominee,
'is_management_team' => $is_management_team,
'is_driver' => ($is_driver === null || $is_driver === '') ? 0 : $is_driver,
'is_driver' => $is_driver,
'esi_applicable' => $esi_applicable,
'pf_applicable' => $pf_applicable,
'work_location' => $work_location,

View File

@ -149,8 +149,8 @@ class Monthlypay extends BaseController
$data['sundayarray'] = $sundayarray;
$data['monthdays'] = $monthdays;
$data['datefordropdown'] = $current;
$data['attendance'] = $this->monthlypay_model->monthlyAttendance($current);
$data['emppay'] = $this->monthlypay_model->getEmpPayDetails($current, $string);
$data['attendance'] = $this-> monthlypay_model->monthlyAttendance($current);
$data['emppay'] = $this-> monthlypay_model->getEmpPayDetails($current,$string);
$leavedate = $this->monthlypay_model->employeeLeaveDates($month . "-" . $year);
$employeeLeaveDate = [];

View File

@ -55,28 +55,6 @@ class Monthlypay_model extends Model
}
function getEmpPayDetails_attendance_old($current = "", $s = "")
{
$month_val = date('m', strtotime($current));
$year_val = date('Y', strtotime($current));
$date_val = cal_days_in_month(CAL_GREGORIAN, $month_val, $year_val);
//$monthyear_val = date('Y-m',strtotime($current));
$lastdate = $year_val . '-' . $month_val . '-' . $date_val;
$builder = $this->db->table('t_employee_details')
->select('t_employee_details.EmpID,t_employee_details.FirstName,t_employee_details.LastName,t_employee_details.DateofJoining,t_employee_details.is_driver')
//->join('t_emp_pay_data','t_emp_pay_data.EmpID=t_employee_details.EmpID','Left')
->where('t_employee_details.IsActive', 1)
->where('t_employee_details.is_driver !=', 1)
->where('t_employee_details.DateofJoining <=', $lastdate)
->orderBy('EmpID', 'asc');
$query = $builder->get();
$result = $query->getResult();
// $last_query = $this->db->getLastQuery();
// echo $last_query;die;
return $result;
}
function getEmpPayDetails($current = "", $s = "")
{
@ -88,12 +66,9 @@ class Monthlypay_model extends Model
$builder = $this->db->table('t_employee_details')
->select('t_employee_details.EmpID,t_employee_details.FirstName,t_employee_details.LastName,t_employee_details.DateofJoining,t_employee_details.is_driver')
//->join('t_emp_pay_data','t_emp_pay_data.EmpID=t_employee_details.EmpID','Left')
->join('t_monthly_pay_inputs as p','p.EmpID=t_employee_details.EmpID','Left')
->where('t_employee_details.IsActive', 1)
->where('t_employee_details.is_driver !=', 1)
->where('t_employee_details.DateofJoining <=', $lastdate)
->where("p.Month_Year IS NULL OR
STR_TO_DATE(p.Month_Year, '%m-%Y') <=", $lastdate)
->orderBy('EmpID', 'asc');
$query = $builder->get();
$result = $query->getResult();