diff --git a/application/controllers/emppaydate.php b/application/controllers/emppaydate.php index 3f30cdd0..50802393 100755 --- a/application/controllers/emppaydate.php +++ b/application/controllers/emppaydate.php @@ -86,6 +86,8 @@ class emppaydate extends BaseController $this->form_validation->set_rules('PF_Rate','PF_Rate','trim|required'); $this->form_validation->set_rules('ESI_Rate','ESI_Rate','trim|required'); $this->form_validation->set_rules('Food_Allowances','Food_Allowances','trim|required'); + $this->form_validation->set_rules('Incentives','Incentives','trim|required'); + if($this->form_validation->run() == FALSE || $EmpID == -1) @@ -105,6 +107,7 @@ class emppaydate extends BaseController $PF_Rate=$this->input->post('PF_Rate'); $ESI_Rate=$this->input->post('ESI_Rate'); $Food_Allowances=$this->input->post('Food_Allowances'); + $Incentives=$this->input->post('Incentives'); $Loan_Amount=$this->input->post('Loan_Amount'); $Load_Issued_date=$this->input->post('loan_issued_date'); @@ -129,7 +132,7 @@ class emppaydate extends BaseController $chked = $this->input->post('is_Active'); $IsActive = '1'; - $emppay = array('EmpID'=>$EmpID,'TotalSalary'=>$Total_Salary,'Basic_Pay'=>$Basic_Pay,'HRA_Rate'=>$HRA_Rate,'HRA_Amount'=>$HRA_Amount,'Allowances'=>$Allowances, 'PF_Rate'=>$PF_Rate, 'ESI_Rate'=>$ESI_Rate ,'Food_Allowances'=>$Food_Allowances,'Created_By'=>$CreateBy); + $emppay = array('EmpID'=>$EmpID,'TotalSalary'=>$Total_Salary,'Basic_Pay'=>$Basic_Pay,'HRA_Rate'=>$HRA_Rate,'HRA_Amount'=>$HRA_Amount,'Allowances'=>$Allowances, 'PF_Rate'=>$PF_Rate, 'ESI_Rate'=>$ESI_Rate ,'Food_Allowances'=>$Food_Allowances,'Incentives'=>$Incentives,'Created_By'=>$CreateBy); $loandetails = array('EmpID'=>$EmpID,'Loan_Amount'=>$Loan_Amount,'Loan_Issued_Date'=>$Load_Issued_date,'Monthly_Due'=>$Due_Amount,'Due_Start_Date'=>$Due_Started,'No_of_Dues'=>$No_Of_Dues,'Paid_Due'=>$Paid_due,'Remaining_Due'=>$Remaining_Due,'Paid_Amount'=>$Paid_Amount,'is_Active'=>1,'Created_By'=>$CreateBy); @@ -202,6 +205,9 @@ class emppaydate extends BaseController $this->form_validation->set_rules('PF_Rate','PF_Rate','trim|required'); $this->form_validation->set_rules('ESI_Rate','ESI_Rate','trim|required'); $this->form_validation->set_rules('Food_Allowances','Food_Allowances','trim|required'); + $this->form_validation->set_rules('Incentives','Incentives','trim|required'); + + @@ -249,11 +255,13 @@ class emppaydate extends BaseController $Last_Mod_By=$this->session->userdata('userId'); $Last_Mod_Time=date('d-m-Y h:i:sa'); $Food_Allowances=$this->input->post('Food_Allowances'); + $Incentives=$this->input->post('Incentives'); + - $emppay = array('Pay_Data_ID'=>$Pay_Data_ID,'EmpID'=>$EmpID,'TotalSalary'=>$TotalSalary,'Basic_Pay'=>$Basic_Pay,'HRA_Rate'=>$HRA_Rate,'HRA_Amount'=>$HRA_Amount,'Allowances'=>$Allowances, 'PF_Rate'=>$PF_Rate, 'ESI_Rate'=>$ESI_Rate ,'Food_Allowances'=>$Food_Allowances,'Last_Mod_By'=>$Last_Mod_By); + $emppay = array('Pay_Data_ID'=>$Pay_Data_ID,'EmpID'=>$EmpID,'TotalSalary'=>$TotalSalary,'Basic_Pay'=>$Basic_Pay,'HRA_Rate'=>$HRA_Rate,'HRA_Amount'=>$HRA_Amount,'Allowances'=>$Allowances, 'PF_Rate'=>$PF_Rate, 'ESI_Rate'=>$ESI_Rate ,'Food_Allowances'=>$Food_Allowances,'Incentives'=>$Incentives ,'Last_Mod_By'=>$Last_Mod_By); $loandetails = array('Loan_ID'=>$loan_ID,'EmpID'=>$EmpID,'Loan_Amount'=>$Loan_Amount,'Loan_Issued_Date'=>$Load_Issued_date,'Monthly_Due'=>$Due_Amount,'Due_Start_Date'=>$Due_Started,'No_of_Dues'=>$No_Of_Dues,'Paid_Due'=>$Paid_due,'Remaining_Due'=>$Remaining_Due,'Paid_Amount'=>$Paid_Amount,'is_Active'=>1,'Last_Mod_By'=>$Last_Mod_By); diff --git a/application/models/emppaydate_model.php b/application/models/emppaydate_model.php index e78a0781..62c138bd 100755 --- a/application/models/emppaydate_model.php +++ b/application/models/emppaydate_model.php @@ -66,7 +66,7 @@ class emppaydate_model extends CI_Model } function getUserInfo($paydataid) { - $sql = 'select T_Emp_Pay_Data.Pay_Data_ID,T_Emp_Pay_Data.EmpID as PAYEMPID,T_Emp_Pay_Data.Basic_Pay,T_Emp_Pay_Data.HRA_Rate,T_Emp_Pay_Data.Allowances,T_Emp_Pay_Data.Food_Allowances,T_Emp_Pay_Data.PF_Rate,T_Emp_Pay_Data.ESI_Rate,T_Emp_Pay_Data.HRA_Amount,T_Emp_Pay_Data.TotalSalary,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Loan_Master.*from T_Emp_Pay_Data + $sql = 'select T_Emp_Pay_Data.Pay_Data_ID,T_Emp_Pay_Data.EmpID as PAYEMPID,T_Emp_Pay_Data.Basic_Pay,T_Emp_Pay_Data.HRA_Rate,T_Emp_Pay_Data.Allowances,T_Emp_Pay_Data.Food_Allowances,T_Emp_Pay_Data.Incentives,T_Emp_Pay_Data.PF_Rate,T_Emp_Pay_Data.ESI_Rate,T_Emp_Pay_Data.HRA_Amount,T_Emp_Pay_Data.TotalSalary,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Loan_Master.*from T_Emp_Pay_Data join T_Employee_Details on T_Emp_Pay_Data.EmpID=T_Employee_Details.EmpID left join T_Loan_Master on T_Emp_Pay_Data.EmpID=T_Loan_Master.EmpID and T_Loan_Master.is_Active = 1 where T_Emp_Pay_Data.Pay_Data_ID = ?;'; diff --git a/application/views/addemppaydate.php b/application/views/addemppaydate.php index d709ad45..9db14c38 100755 --- a/application/views/addemppaydate.php +++ b/application/views/addemppaydate.php @@ -210,13 +210,34 @@ $("#due_started").datepicker({