From cf3aeaa4be8cfbf924a18ff50096eb8306daa893 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Wed, 28 Aug 2024 13:49:36 +0530 Subject: [PATCH] CHANGE_in employee module : GWM --- app/Controllers/Employeedetails.php | 52 +---- app/Controllers/Emppaydate.php | 8 +- app/Controllers/Monthlypay.php | 2 +- app/Controllers/Payslip.php | 102 ++++----- app/Models/Emppaydate_model.php | 6 +- app/Models/Monthlypay_model.php | 4 +- app/Views/addEmployee.php | 37 ---- app/Views/editEmployee.php | 41 ---- app/Views/emppayListing.php | 43 ++-- app/Views/monthlypayinputs.php | 323 +++++++++------------------- 10 files changed, 173 insertions(+), 445 deletions(-) diff --git a/app/Controllers/Employeedetails.php b/app/Controllers/Employeedetails.php index 77791d58..33c68cc4 100644 --- a/app/Controllers/Employeedetails.php +++ b/app/Controllers/Employeedetails.php @@ -203,36 +203,7 @@ class Employeedetails extends BaseController function AddNewEmployee() { - $validation = \Config\Services::validation(); - - - - - - // $this->validator->setRules([ - // 'ContactNumber'=> 'trim|required|min_length[10]|max_length[10]', - // 'emailid'=> 'trim|required|valid_email', - // 'gender'=> 'callback_Gender_validate', - // 'MartialStatus'=> 'callback_Martial_validate', - // 'bloodgroup'=>'callback_Blood_validate', - // 'emergencycontactnumber'=> 'trim|required|min_length[10]|max_length[10]', - // 'desigination'=> 'callback_Des_validate', - // 'departmentname'=> 'callback_Dep_validate', - // 'eduqualifaction'=> 'callback_select_validate', - // 'referrercontno'=> 'trim|min_length[10]|max_length[10]', - // 'aadharno'=> 'trim|min_length[14]|max_length[14]', - // 'panno'=> 'trim|min_length[10]|max_length[10]', - // 'passportno'=> 'trim|min_length[9]|max_length[9]', - // 'accountno'=> 'trim|min_length[10]|max_length[20]', - // 'pfno'=> 'trim|min_length[22]|max_length[22]', - // 'esino'=> 'trim|min_length[10]|max_length[10]']); - - // if ($this->validator->run() == FALSE) { - // $this->addemployee(); - // //echo 'Validate method called'; - // } else { - //echo 'Validate not method called'; $photo = $this->request->getFile('photo'); $Picture = ""; if ($photo->isValid() && !$photo->hasMoved()) { @@ -371,15 +342,11 @@ class Employeedetails extends BaseController $Basic_Pay = $this->request->getPost('Basic_Pay'); $HRA_Rate = $this->request->getPost('HRA_Rate'); $HRA_Amount = $this->request->getPost('HRA_Amount'); - - $Allowances = $this->request->getPost('Allowances'); $PF_Rate = $this->request->getPost('PF_Rate'); $ESI_Rate = $this->request->getPost('ESI_Rate'); - $Food_Allowances = $this->request->getPost('Food_Allowances'); - $Incentives = $this->request->getPost('Incentives'); $CreateBy = $this->session->get('userId'); - $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); + $emppay = array('EmpID' => $EmpID, 'TotalSalary' => $Total_Salary, 'Basic_Pay' => $Basic_Pay, 'HRA_Rate' => $HRA_Rate, 'HRA_Amount' => $HRA_Amount, 'PF_Rate' => $PF_Rate, 'ESI_Rate' => $ESI_Rate, 'Created_By' => $CreateBy); $this->emppaydate_model->addNewemppay($emppay); @@ -803,34 +770,21 @@ class Employeedetails extends BaseController $Basic_Pay = $this->request->getPost('Basic_Pay'); $HRA_Rate = $this->request->getPost('HRA_Rate'); $HRA_Amount = $this->request->getPost('HRA_Amount'); - $Allowances = $this->request->getPost('Allowances'); $PF_Rate = $this->request->getPost('PF_Rate'); $ESI_Rate = $this->request->getPost('ESI_Rate'); - $Food_Allowances = $this->request->getPost('Food_Allowances'); - $Incentives = $this->request->getPost('Incentives'); $CreateBy = $this->session->get('userId'); - $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); + $emppay = array('EmpID' => $EmpId, 'TotalSalary' => $Total_Salary, 'Basic_Pay' => $Basic_Pay, 'HRA_Rate' => $HRA_Rate, 'HRA_Amount' => $HRA_Amount, 'PF_Rate' => $PF_Rate, 'ESI_Rate' => $ESI_Rate, 'Created_By' => $CreateBy); $empPayUpdate = $this->emppaydate_model->editemppay($emppay); if ($result + $empPayUpdate > 0) { - - - // $this->session->set_flashdata('Success', $EmpId.'Employee Updated successfully!'); $this->session->setFlashdata('success', 'You Have Successfully updated the Employee Record!'); - // echo ""; - } else { - - // $this->session->set_flashdata('Error', $EmpId . 'Employee details not saved'); $this->session->setFlashdata('error', 'Record Not Updated!'); - // echo ""; - } return redirect()->route('employeeListing'); - // redirect('employeeListing'); - // } + } function exportemployee() diff --git a/app/Controllers/Emppaydate.php b/app/Controllers/Emppaydate.php index 8484b079..98423449 100644 --- a/app/Controllers/Emppaydate.php +++ b/app/Controllers/Emppaydate.php @@ -57,8 +57,8 @@ class Emppaydate extends BaseController function emppayListing() { $data['userRecords'] = $this->emppaydate_model->emppayListing(); - // dd($data['userRecords']); - $this->global['pageTitle'] = 'Employee Pay List'; + + $this->global['pageTitle'] = 'Employee Loan List'; $this->loadViews("emppayListing", $this->global, $data, NULL); } @@ -80,8 +80,8 @@ class Emppaydate extends BaseController { - helper('form'); //$this->load->library('form_validation'); - $EmpID = $this->request->getPost('EmpID'); + + $EmpID = $this->request->getPost('EmpID'); diff --git a/app/Controllers/Monthlypay.php b/app/Controllers/Monthlypay.php index b7ed6d18..5379ee31 100644 --- a/app/Controllers/Monthlypay.php +++ b/app/Controllers/Monthlypay.php @@ -151,7 +151,7 @@ class Monthlypay extends BaseController $data['datefordropdown'] = $current; $data['attendance'] = $this->monthlypay_model->monthlyAttendance($current); $data['emppay'] = $this->monthlypay_model->getEmpPayDetails($current, $string); - + $this->global['pageTitle'] = 'Monthly Attendance'; $this->loadViews("attendance", $this->global, $data, NULL); } diff --git a/app/Controllers/Payslip.php b/app/Controllers/Payslip.php index 5763e2c2..1090edb5 100644 --- a/app/Controllers/Payslip.php +++ b/app/Controllers/Payslip.php @@ -521,7 +521,6 @@ class Payslip extends BaseController $HRA_Amount = $value->HRA_Amount; $Basic_Pay = $value->Basic_Pay; $TotalSalary = $value->TotalSalary; - $Food_Allowances = $value->Food_Allowances; $Days_worked = $value->Days_worked; // working day $Sunday = $value->sunday_count; // Sunday count $LOP_Days = $value->NoofDays - ($Days_worked + $Sunday); // not working day @@ -529,7 +528,6 @@ class Payslip extends BaseController $OT_Hrs_Worked = $value->OT_Hrs_Worked; //OT hours $Monthly_Due = $value->Monthly_Due; // AUTO LOAN DUE $Loan_Recovered = $value->Loan_Recovered; //MANUAL LOAN DUE - $MasterIncentives = $value->MasterIncentives; //Master values get $due_start_date = $value->DueDate; $paydate = $current; //From POST parm @@ -561,20 +559,14 @@ class Payslip extends BaseController } - $Allowances = $value->Allowances; + $PF_Rate = $value->PF_Rate; $ESI_Rate = $value->ESI_Rate; - $MonthIncentive = $value->MonthlyIncentives; - $Incentive = 0; - if (empty($MonthIncentive)) { - $Incentive = $MasterIncentives; - } else { - $Incentive = $MonthIncentive; - } + - $dayFood_Allowance = $Food_Allowances * ($Days_worked + $Sunday); + $totalDaysWorked = ($Days_worked + $Sunday) + $Paid_leave; @@ -609,18 +601,18 @@ class Payslip extends BaseController /** pf amount per day**/ //echo $totalothour;die; - $empSalaryAdd = $currentDayBasic + $currentDayHra + $totSalayOT + $dayFood_Allowance + $Allowances + $Incentive; - // echo $totalDaysWorked .'
'; - // echo $currentDayBasic .'
'; - // echo $currentDayHra .'
'; - // echo $totSalayOT .'
'; - // echo $dayFood_Allowance .'
'; - // echo $Allowances .'
'; - // echo $Incentive .'
'; - // die; + $empSalaryAdd = $currentDayBasic + $currentDayHra + $totSalayOT; + $empSalarySub = $esiAmount + $pfAmount + $loan; + $salaryInCurrentday = $empSalaryAdd - $empSalarySub; - + // echo $esiAmount .'
'; + // echo $pfAmount .'
'; + // echo $loan .'
'; + // echo $empSalarySub .'
'; + // echo $empSalaryAdd .'
'; + // echo $salaryInCurrentday .'
'; + // die; $employeeSalary[] = round($salaryInCurrentday); $esi[] = number_format($esiAmount,2); @@ -632,7 +624,7 @@ class Payslip extends BaseController $data['pf'] = $pf; $data['over_time'] = $ot; -// dd($data); +// dd($data); $this->global['pageTitle'] = 'Payroll Monthly Inputs'; $this->loadViews("monthlypayinputs", $this->global, $data, NULL); } @@ -649,7 +641,7 @@ class Payslip extends BaseController //dd($data['fresh']); - $employeeSalary = []; + $employeeSalary = []; $esi = []; $pf = []; $ot = []; @@ -660,7 +652,6 @@ class Payslip extends BaseController $HRA_Amount = $value->HRA_Amount; $Basic_Pay = $value->Basic_Pay; $TotalSalary = $value->TotalSalary; - $Food_Allowances = $value->Food_Allowances; $Days_worked = $value->Days_worked; // working day $Sunday = $value->sunday_count; // Sunday count $LOP_Days = $value->NoofDays - ($Days_worked + $Sunday); // not working day @@ -668,7 +659,6 @@ class Payslip extends BaseController $OT_Hrs_Worked = $value->OT_Hrs_Worked; //OT hours $Monthly_Due = $value->Monthly_Due; // AUTO LOAN DUE $Loan_Recovered = $value->Loan_Recovered; //MANUAL LOAN DUE - $MasterIncentives = $value->MasterIncentives; //Master values get $due_start_date = $value->DueDate; $paydate = $current; //From POST parm @@ -704,21 +694,13 @@ class Payslip extends BaseController } - $Allowances = $value->Allowances; - $HRA_Rate = $value->HRA_Rate; $PF_Rate = $value->PF_Rate; $ESI_Rate = $value->ESI_Rate; - $MonthIncentive = $value->MonthlyIncentives; //t_monthly_pay_inputs,for change month - $Incentive = 0; - if (empty($MonthIncentive)) { - $Incentive = $MasterIncentives; - } else { - $Incentive = $MonthIncentive; - } + - $dayFood_Allowance = $Food_Allowances * ($Days_worked + $Sunday); + $totalDaysWorked = ($Days_worked + $Sunday) + $Paid_leave; @@ -755,19 +737,17 @@ class Payslip extends BaseController /** pf amount per day**/ //echo $totalothour;die; - $empSalaryAdd = $currentDayBasic + $currentDayHra + $totSalayOT + $dayFood_Allowance + $Allowances + $Incentive; - // echo $totalDaysWorked .'
'; - // echo $currentDayBasic .'
'; - // echo $currentDayHra .'
'; - // echo $totSalayOT .'
'; - // echo $dayFood_Allowance .'
'; - // echo $Allowances .'
'; - // echo $Incentive .'
'; - // die; + $empSalaryAdd = $currentDayBasic + $currentDayHra + $totSalayOT; $empSalarySub = $esiAmount + $pfAmount + $loan; - $salaryInCurrentday = $empSalaryAdd - $empSalarySub; + // echo $esiAmount .'
'; + // echo $pfAmount .'
'; + // echo $loan .'
'; + // echo $empSalarySub .'
'; + // echo $empSalaryAdd .'
'; + // echo $salaryInCurrentday .'
'; + // die; $employeeSalary[] = round($salaryInCurrentday); $esi[] = number_format($esiAmount,2); @@ -778,7 +758,7 @@ class Payslip extends BaseController $data['esi'] = $esi; $data['pf'] = $pf; $data['over_time'] = $ot; - // dd($data); + // dd($data); //echo sizeof($data['fresh'])."-".sizeof($data['empSalary']);die; $this->global['pageTitle'] = 'Payroll Monthly Inputs'; $this->loadViews("monthlypayinputs", $this->global, $data, NULL); @@ -835,8 +815,8 @@ class Payslip extends BaseController $LOP_Days = $j['LOP Days']; $Paid_leave = $j['Paid Leave']; $OT_Hrs_Worked = $j['OT Hrs']; - $Loan_Recovered = $j['Manual Loan Due ₹']; - $Incentives = $j['Incentives in ₹']; + $Loan_Recovered = $j['Auto Loan Due ₹']; + // $Incentives = $j['Incentives in ₹']; $Festival_Bonus = $j['Festival Bonus in ₹']; $Other_Deductions = $j['TDS Deductions in ₹']; $Estimate = $j['Estimate in ₹']; @@ -883,11 +863,11 @@ class Payslip extends BaseController } } - $Incentives_first = explode(".", $Incentives); - if (!is_numeric($Incentives) || (strlen((string)$Incentives)) > 8 || (strlen((string)$Incentives_first[0])) > 5) { - //echo $EmpID . "-Loan Recoverd Invalid Data!"; - $ErrorFlag++; - } + // $Incentives_first = explode(".", $Incentives); + // if (!is_numeric($Incentives) || (strlen((string)$Incentives)) > 8 || (strlen((string)$Incentives_first[0])) > 5) { + // //echo $EmpID . "-Loan Recoverd Invalid Data!"; + // $ErrorFlag++; + // } $Festivalbonus_first = explode(".", $Festival_Bonus); if (!is_numeric($Festival_Bonus) || (strlen((string)$Festival_Bonus)) > 8 || (strlen((string)$Festivalbonus_first[0])) > 5) { @@ -928,18 +908,18 @@ class Payslip extends BaseController $LOP_Days = isset($j['LOP Days']) ? $j['LOP Days'] : 0.00; $Paid_leave = isset($j['Paid Leave']) ? $j['Paid Leave'] : 0.00; $OT_Hrs_Worked = isset($j['OT Hrs']) ? $j['OT Hrs'] : 0.00; - $Loan_Recovered = isset($j['Manual Loan Due ₹']) ? $j['Manual Loan Due ₹'] : 0.00; - if (is_string($Loan_Recovered)) { - $Loan_Recovered = strtoupper($Loan_Recovered); - } - $Incentives = isset($j['Incentives in ₹']) ? $j['Incentives in ₹'] : 0.00 ; + $Loan_Recovered = isset($j['Auto Loan Due ₹']) ? $j['Auto Loan Due ₹'] : 0.00; + // if (is_string($Loan_Recovered)) { + // $Loan_Recovered = strtoupper($Loan_Recovered); + // } + // $Incentives = isset($j['Incentives in ₹']) ? $j['Incentives in ₹'] : 0.00 ; $Festival_Bonus = isset($j['Festival Bonus in ₹']) ? $j['Festival Bonus in ₹'] : 0.00; - $Other_Deductions = isset($j['Other Deductions in ₹']) ? $j['Other Deductions in ₹'] : 0.00; + $tds_Deductions = isset($j['TDS Deductions in ₹']) ? $j['TDS Deductions in ₹'] : 0.00; $Estimate = isset($j['Estimate in ₹']) ? $j['Estimate in ₹'] : 0.00; $Created_By = $this->session->get('userId'); - $monthlypaydata = array('Month_Year' => $month, 'EmpID' => $EmpID, 'Days_worked' => $DaysWorked, 'LOP_Days' => $LOP_Days, 'Paid_leave' => $Paid_leave, 'OT_Hrs_Worked' => $OT_Hrs_Worked, 'Loan_Recovered' => $Loan_Recovered, 'Incentives' => $Incentives, 'Festival_Bonus' => $Festival_Bonus, 'Other_Deductions' => $Other_Deductions, 'Estimate' => $Estimate, 'Created_By' => $Created_By); - //print_r($monthlypaydata); die; + $monthlypaydata = array('Month_Year' => $month, 'EmpID' => $EmpID, 'Days_worked' => $DaysWorked, 'LOP_Days' => $LOP_Days, 'Paid_leave' => $Paid_leave, 'OT_Hrs_Worked' => $OT_Hrs_Worked, 'Festival_Bonus' => $Festival_Bonus, 'Other_Deductions' => $tds_Deductions, 'Estimate' => $Estimate, 'Created_By' => $Created_By ,'Loan_Recovered'=>$Loan_Recovered); + // print_r($monthlypaydata); die; $result = $this->monthlypay_model->saveMonthlyData_model($monthlypaydata); $total = $total + $result; } diff --git a/app/Models/Emppaydate_model.php b/app/Models/Emppaydate_model.php index cd81431f..17bdf4ba 100644 --- a/app/Models/Emppaydate_model.php +++ b/app/Models/Emppaydate_model.php @@ -17,10 +17,10 @@ class Emppaydate_model extends Model { $builder = $this->db->table('t_loan_master') ->select('t_loan_master.*,t_emp_pay_data.*,t_employee_details.FirstName') - ->join('t_employee_details','t_loan_master.EmpID = t_employee_details.EmpID') - ->join('t_emp_pay_data','t_loan_master.EmpID = t_emp_pay_data.EmpID'); + ->join('t_employee_details','t_loan_master.EmpID = t_employee_details.EmpID','LEFT') + ->join('t_emp_pay_data','t_loan_master.EmpID = t_emp_pay_data.EmpID','LEFT'); $query =$builder->get(); - $result = $query->getResult(); + $result = $query->getResult(); return $result; } diff --git a/app/Models/Monthlypay_model.php b/app/Models/Monthlypay_model.php index f6df9a13..98c3665a 100644 --- a/app/Models/Monthlypay_model.php +++ b/app/Models/Monthlypay_model.php @@ -100,7 +100,7 @@ class Monthlypay_model extends Model //echo $lastdate; //left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and month(t_payroll.PayOn) = month(?) and year(t_payroll.PayOn) = year(?) - $sql = "select t_emp_pay_data.EmpID, t_emp_pay_data.Incentives as MasterIncentives,t_emp_pay_data.*,t_employee_details.FirstName,t_employee_details.DateofJoining,t_employee_details.Designation,t_employee_details.esi_applicable,t_employee_details.pf_applicable,t_employee_details.is_management_team,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_attendance.sunday_count,t_loan_master.Loan_ID,t_loan_master.Monthly_Due,t_loan_master.Due_Start_Date as DueDate,t_loan_master.Loan_Amount,t_loan_master.Paid_Amount,t_payroll.Key,t_monthly_pay_inputs.Incentives as MonthlyIncentives,t_monthly_pay_inputs.Loan_Recovered,t_monthly_pay_inputs.Estimate,t_monthly_pay_inputs.Festival_Bonus,t_monthly_pay_inputs.Other_Deductions,t_loan_history .Balance_Amount + $sql = "select t_emp_pay_data.EmpID,t_emp_pay_data.*,t_employee_details.FirstName,t_employee_details.DateofJoining,t_employee_details.Designation,t_employee_details.esi_applicable,t_employee_details.pf_applicable,t_employee_details.is_management_team,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_attendance.sunday_count,t_loan_master.Loan_ID,t_loan_master.Monthly_Due,t_loan_master.Due_Start_Date as DueDate,t_loan_master.Loan_Amount,t_loan_master.Paid_Amount,t_payroll.Key,t_monthly_pay_inputs.Incentives as MonthlyIncentives,t_monthly_pay_inputs.Loan_Recovered,t_monthly_pay_inputs.Estimate,t_monthly_pay_inputs.Festival_Bonus,t_monthly_pay_inputs.Other_Deductions,t_loan_history .Balance_Amount 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 and t_payroll.PayOn = ? @@ -206,7 +206,7 @@ class Monthlypay_model extends Model $count = $res[0]['count']; } -// print_r($data);die; + if ($count == 0) { $builder = $this->db->table('t_monthly_pay_inputs'); diff --git a/app/Views/addEmployee.php b/app/Views/addEmployee.php index 2e34915b..64c07d9a 100644 --- a/app/Views/addEmployee.php +++ b/app/Views/addEmployee.php @@ -906,44 +906,7 @@ legend { -
-
-
- Allowances - -
-
-
-
- Food Allowances(Per Day) - - -
-
- -
-
- Incentives - - -
-
-
-
diff --git a/app/Views/editEmployee.php b/app/Views/editEmployee.php index 13ce1fed..4826c3d1 100644 --- a/app/Views/editEmployee.php +++ b/app/Views/editEmployee.php @@ -1198,47 +1198,6 @@ legend { -
-
-
- Allowances - -
-
- -
-
- Food Allowances(Per Day) - - -
-
- -
-
- Incentives - - -
-
-
-
-
diff --git a/app/Views/emppayListing.php b/app/Views/emppayListing.php index 855274d6..c0c3e68e 100644 --- a/app/Views/emppayListing.php +++ b/app/Views/emppayListing.php @@ -40,31 +40,24 @@ - - EmpID ?>-FirstName;?> - TotalSalary; ?> - Loan_Amount; ?> - Loan_Issued_Date; ?> - Monthly_Due; ?> - No_of_Dues; ?> - Paid_Due; ?> - Remaining_Due; ?> - Paid_Amount; ?> - - - EDIT - - - + if(!empty($userRecords)) { foreach($userRecords as $record) { ?> + + EmpID ?>-FirstName;?> + TotalSalary; ?> + Loan_Amount; ?> + Loan_Issued_Date; ?> + Monthly_Due; ?> + No_of_Dues; ?> + Paid_Due; ?> + Remaining_Due; ?> + Paid_Amount; ?> + + + EDIT + + + +
diff --git a/app/Views/monthlypayinputs.php b/app/Views/monthlypayinputs.php index 1fa85988..ee47922a 100644 --- a/app/Views/monthlypayinputs.php +++ b/app/Views/monthlypayinputs.php @@ -190,9 +190,7 @@ $('html').bind('keypress', function(e) { Auto Loan Due ₹ - Manual Loan Due ₹ - Incentives in ₹ TDS Deductions in ₹ Festival Bonus in ₹ @@ -215,15 +213,8 @@ $('html').bind('keypress', function(e) { $i = 0; foreach($sample as $i=> $record) { - $index++; - - if(in_array($record->EmpID,$testarray)) - { - $index--; - }else{ - - - array_push($testarray,$record->EmpID); + $index++; + if(in_array($record->EmpID,$testarray)) { $index--; }else{ array_push($testarray,$record->EmpID); ?> @@ -233,10 +224,10 @@ $('html').bind('keypress', function(e) { FirstName; ?> DateofJoining); - $newDateFormat = $date->format('d-m-Y'); - echo $newDateFormat; - ?> + $date = DateTime::createFromFormat('Y-m-d H:i:s', $record->DateofJoining); + $newDateFormat = $date->format('d-m-Y'); + echo $newDateFormat; + ?> Designation; ?> NoofDays; ?> @@ -288,9 +279,9 @@ $('html').bind('keypress', function(e) { - - - + + + @@ -309,43 +300,19 @@ $('html').bind('keypress', function(e) { - Key) && !empty($record->Loan_ID)){ echo "contenteditable='true'; style='background-color:#ffcccc;text-align:right' title='Loan Pending'"; } ?> - Key)){?> title="Payslip Calculated" - style="text-align:right;color:blue;" - style="text-align:right;" > - - Loan_Recovered)) - { if(is_numeric($record->Loan_Recovered)){echo number_format($record->Loan_Recovered,2,'.',''); $totalmanualoan[] = $record->Loan_Recovered;}else {echo $record->Loan_Recovered; $totalmanualoan[] = $record->Loan_Recovered;}}else{echo number_format(0.00,2,'.',''); $totalmanualoan[] = 0;} ?> - - - - - Key)){echo "contenteditable='true';"; } ?> - Key)){?> title="Payslip Calculated" - style="text-align:right;color:blue;" - style="text-align:right;" > - - - MonthlyIncentives)){echo $record->MonthlyIncentives; $totalinst [] = $record->MonthlyIncentives;}else {echo $record->MasterIncentives; $totalinst [] = $record->MasterIncentives;} - - ?> - + - Key)){echo "contenteditable='true';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;" style="text-align:right;" > + Other_Deductions)){echo $record->Other_Deductions;$totalotherDet [] = $record->Other_Deductions;}else{ echo number_format(0.00,2,'.','');} ?> @@ -366,10 +333,11 @@ $('html').bind('keypress', function(e) { Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;" > Estimate)){ - echo $record->Estimate; $estTotal [] = $record->Estimate; - }else { - echo $empSalary[$i]; $estTotal [] = $empSalary[$i]; - }?> + echo $record->Estimate; $estTotal [] = $record->Estimate; + }else { + echo $empSalary[$i]; $estTotal [] = $empSalary[$i]; + } + ?> @@ -379,9 +347,14 @@ $('html').bind('keypress', function(e) { - + + + + + value="Loan_Amount) ? $record->Loan_Amount : 0?>"> - + @@ -422,22 +390,22 @@ $('html').bind('keypress', function(e) { } } - //print_r($totalinst); + ?> + - + Total - - + - + - + @@ -467,10 +435,10 @@ $('html').bind('keypress', function(e) {