From 77a4228156e2a29f9355ae260a5d89fe98d0b5d3 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Thu, 4 Jan 2018 18:48:55 +0530 Subject: [PATCH] monthly payment listing screen changes --- application/controllers/payslip.php | 17 +- application/models/monthlypay_model.php | 3 +- application/views/monthlypayinputs.php | 316 ++++++++++-------------- 3 files changed, 145 insertions(+), 191 deletions(-) diff --git a/application/controllers/payslip.php b/application/controllers/payslip.php index 5aa8793c..a69e9f9a 100755 --- a/application/controllers/payslip.php +++ b/application/controllers/payslip.php @@ -498,7 +498,7 @@ function phpAlert($msg) { $current = date("m-Y"); $data['month'] = $this-> monthlypay_model->monthlyListing($current); // $data['fresh'] = $this-> monthlypay_model->getEmpPayDetails($current); - + $data['dropdownvalue'] = $current; $data['fresh'] = $this-> monthlypay_model->getEmpPayDetailsforMonthInputs($current); $this->global['pageTitle'] = 'Siddharth : Payroll Monthly Inputs'; $this->loadViews("monthlypayinputs", $this->global,$data,NULL); @@ -509,12 +509,15 @@ function phpAlert($msg) { function changeMonth() { - $current = $this->input->post('param1'); - // echo $current;die(); - $month = $this-> monthlypay_model->monthlyListing($current); - $fresh = $this-> monthlypay_model->getEmpPayDetailsforMonthInputs($current); - $data = json_encode(array_merge($month,$fresh)); - echo $data; + $current = $this->input->post('monthyear'); + + $data['month'] = $this-> monthlypay_model->monthlyListing($current); + + $data['dropdownvalue'] = $current; + $data['fresh'] = $this-> monthlypay_model->getEmpPayDetailsforMonthInputs($current); + + $this->global['pageTitle'] = 'Siddharth : Payroll Monthly Inputs'; + $this->loadViews("monthlypayinputs", $this->global,$data,NULL); } diff --git a/application/models/monthlypay_model.php b/application/models/monthlypay_model.php index a1da02e5..476b7a15 100755 --- a/application/models/monthlypay_model.php +++ b/application/models/monthlypay_model.php @@ -49,8 +49,9 @@ class monthlypay_model extends CI_Model //echo $current; $current = date_create($current); $current = date_format($current,'Y-m-d'); - $sql = "select T_Emp_Pay_Data.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Employee_Details.DateofJoining,T_Attendance.Days_Worked as Days_worked,T_Attendance.Absent as LOP_Days,T_Attendance.Paid_Leave as Paid_leave,T_Attendance.Total_OTHrs as OT_Hrs_Worked,T_Attendance.NoofDays,T_Loan_Master.Loan_ID from T_Emp_Pay_Data + $sql = "select T_Emp_Pay_Data.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Employee_Details.DateofJoining,T_Attendance.Days_Worked as Days_worked,T_Attendance.Absent as LOP_Days,T_Attendance.Paid_Leave as Paid_leave,T_Attendance.Total_OTHrs as OT_Hrs_Worked,T_Attendance.NoofDays,T_Loan_Master.Loan_ID,T_Payroll.Key from T_Emp_Pay_Data left join T_Employee_Details on T_Employee_Details.EmpID = T_Emp_Pay_Data.EmpID + left join T_Payroll on T_Employee_Details.EmpID = T_Payroll.EmpID left join T_Attendance on T_Emp_Pay_Data.EmpID = T_Attendance.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_Employee_Details.DateofJoining <= CURRENT_DATE diff --git a/application/views/monthlypayinputs.php b/application/views/monthlypayinputs.php index b3615607..ed67374b 100755 --- a/application/views/monthlypayinputs.php +++ b/application/views/monthlypayinputs.php @@ -1,4 +1,23 @@ - + @@ -115,7 +134,9 @@ $('html').bind('keypress', function(e) ?>
- +
+ +
@@ -211,42 +232,47 @@ $('html').bind('keypress', function(e)
\ No newline at end of file