Payslip Production changes
This commit is contained in:
parent
8006f335c6
commit
5898479021
@ -2,7 +2,8 @@
|
||||
|
||||
class Payroll_model extends CI_Model
|
||||
{
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This function is used to insert the File details in database
|
||||
* @FileDetails array : This will have the set of value which we need to insert into database
|
||||
@ -46,7 +47,6 @@ class Payroll_model extends CI_Model
|
||||
return $query->result();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to insert the File data in database
|
||||
* @FileDetails array : This will have the set of value which we need to insert into database
|
||||
@ -86,9 +86,9 @@ class Payroll_model extends CI_Model
|
||||
{
|
||||
$this->db->select('Pay.*,payfile.TotalNoofDays as TotalNoofDays ,Emp.FirstName as FName ,Emp.LastName as Lname,Emp.DateofBirth as Dob,Emp.PANNo as Pan,Emp.BankBranchName as BankName,Emp.IFSCCode as IFSCCode,Emp.DateofJoining as DOJ,Emp.Designation as Designation,Dep.DepartmentName as DeptName');
|
||||
$this->db->from('T_Payroll Pay');
|
||||
$this->db->join('T_Payroll_File payfile', 'Pay.PayOn = payfile.PayOn','left');
|
||||
$this->db->join('T_Employee_Details Emp', 'Pay.EmpID = Emp.EmpID','left');
|
||||
$this->db->join('T_DepartmentDetails Dep', 'Emp.Departmentcode = Dep.DEPCode','left');
|
||||
$this->db->join('T_Payroll_File payfile', 'Pay.PayOn = payfile.PayOn');
|
||||
$this->db->join('T_Employee_Details Emp', 'Pay.EmpID = Emp.EmpID');
|
||||
$this->db->join('T_DepartmentDetails Dep', 'Emp.Departmentcode = Dep.DEPCode');
|
||||
$this->db->where('Pay.PayOn', $PayOn);
|
||||
if($EmpId != '')
|
||||
{
|
||||
@ -122,7 +122,7 @@ class Payroll_model extends CI_Model
|
||||
{
|
||||
$this->db->select('Pay.EmpID as EmpId,Emp.FirstName as Fname,Emp.LastName as Lname');
|
||||
$this->db->from('T_Payroll Pay');
|
||||
$this->db->join('T_Employee_Details Emp', 'Pay.EmpID = Emp.EmpID','left');
|
||||
$this->db->join('T_Employee_Details Emp', 'Pay.EmpID = Emp.EmpID');
|
||||
if($Payon != '')
|
||||
{
|
||||
$this->db->where('Pay.PayOn', $Payon);
|
||||
@ -136,13 +136,18 @@ class Payroll_model extends CI_Model
|
||||
* This function is used to get the PayOn details from T_Payroll_File
|
||||
* @return array $result : This is result of the query
|
||||
*/
|
||||
function getEmpAll()
|
||||
function getEmpAll($Payon ='')
|
||||
{
|
||||
$this->db->select('Pay.EmpID as EmpId');
|
||||
$this->db->select('Pay.EmpID as EmpId,Emp.FirstName as Fname,Emp.LastName as Lname');
|
||||
$this->db->from('T_Payroll Pay');
|
||||
$this->db->order_by("Pay.EmpID", "asc");
|
||||
$this->db->join('T_Employee_Details Emp', 'Pay.EmpID = Emp.EmpID');
|
||||
if($Payon != '')
|
||||
{
|
||||
$this->db->where('Pay.PayOn', $Payon);
|
||||
}
|
||||
$this->db->order_by("Pay.EmpID", "asc");
|
||||
|
||||
$query = $this->db->get();
|
||||
$query = $this->db->get();
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
|
||||
@ -188,5 +188,14 @@ function addNewemployee($Employee)
|
||||
return $query->result_array();
|
||||
}
|
||||
}
|
||||
function getEmployeeCount( )
|
||||
{
|
||||
|
||||
$this->db->select('count(*) as EmpCount');
|
||||
$this->db->from('T_Employee_Details');
|
||||
$this->db->where('IsActive ',1 );
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user