From 4f6f599666e393b38afeaffee31a359f89fec627 Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Sat, 22 Apr 2017 13:14:06 +0530 Subject: [PATCH] PDF generater added --- application/models/Payroll_model.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/application/models/Payroll_model.php b/application/models/Payroll_model.php index b583644b..f6ca0eb1 100644 --- a/application/models/Payroll_model.php +++ b/application/models/Payroll_model.php @@ -118,15 +118,19 @@ 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 getEmployeelist() + function getEmployeelist($Payon ='') { $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'); + if($Payon != '') + { + $this->db->where('Pay.PayOn', $Payon); + } $this->db->order_by("Pay.EmpID", "asc"); $query = $this->db->get(); - return $query->result(); + return $query; } /* *//** * This function is used to get the PayOn details from T_Payroll_File @@ -142,5 +146,19 @@ class Payroll_model extends CI_Model return $query->result_array(); } + /* *//** + * This function is used to delete the PayOn details from T_Payroll + * @return array $result : This is result of the query + */ + function deleteFileData($PayOn='') + { + + $this->db->where("PayOn", $PayOn); + + $this->db->delete('T_Payroll'); + + + + } } ?> \ No newline at end of file