diff --git a/app/Controllers/Payslip.php b/app/Controllers/Payslip.php index 7e4d2d32..5763e2c2 100644 --- a/app/Controllers/Payslip.php +++ b/app/Controllers/Payslip.php @@ -778,7 +778,7 @@ class Payslip extends BaseController $data['esi'] = $esi; $data['pf'] = $pf; $data['over_time'] = $ot; - + // dd($data); //echo sizeof($data['fresh'])."-".sizeof($data['empSalary']);die; $this->global['pageTitle'] = 'Payroll Monthly Inputs'; $this->loadViews("monthlypayinputs", $this->global, $data, NULL); @@ -824,9 +824,9 @@ class Payslip extends BaseController $ErrorFlag = 0; - $Emp = $j['Employee']; + - $EmpID = substr($Emp, 0, 4); + $EmpID = $j['Emp ID']; //$Name = $j['Employee Name']; //echo $EmpID; die; @@ -838,7 +838,7 @@ class Payslip extends BaseController $Loan_Recovered = $j['Manual Loan Due ₹']; $Incentives = $j['Incentives in ₹']; $Festival_Bonus = $j['Festival Bonus in ₹']; - $Other_Deductions = $j['Other Deductions in ₹']; + $Other_Deductions = $j['TDS Deductions in ₹']; $Estimate = $j['Estimate in ₹']; $Created_By = $this->session->get('userId'); @@ -921,18 +921,13 @@ class Payslip extends BaseController foreach ($json as $index => $j) { - $Emp = $j['Employee']; - - // $EmpID = substr($Emp, 0, 4); - $parts = explode("-", $Emp); - $EmpID = $parts[0]; - - //$Name = $j['Employee']; - + + + $EmpID = $j['Emp ID']; $DaysWorked = $j['Days Worked']; - $LOP_Days = $j['LOP Days']; - $Paid_leave = $j['Paid Leave']; - $OT_Hrs_Worked = $j['OT Hrs']; + $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); @@ -944,7 +939,7 @@ class Payslip extends BaseController $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; + //print_r($monthlypaydata); die; $result = $this->monthlypay_model->saveMonthlyData_model($monthlypaydata); $total = $total + $result; } @@ -993,8 +988,6 @@ class Payslip extends BaseController $Data['Payon'] = $this->payroll_model->getPayOn(); - - $this->global['pageTitle'] = 'Payroll Generater'; $this->loadViews("payslipgenerate", $this->global, $Data, NULL); @@ -1015,6 +1008,7 @@ class Payslip extends BaseController $id = $this->request->getPost('id1'); $result = $this->payroll_model->getEmployeelist2($id); + $HTML = ""; if (count($result) > 0) { diff --git a/app/Views/addEmployee.php b/app/Views/addEmployee.php index 50ae509a..2e34915b 100644 --- a/app/Views/addEmployee.php +++ b/app/Views/addEmployee.php @@ -394,7 +394,7 @@ function onlyAlphabets(evt) { function validatePF() { - var regpf = /^([a-zA-Z]){5}([0-9]){17}$/; + var regpf = /^\d{12}$/; var PF = $('#pfno').val(); @@ -1005,8 +1005,8 @@ legend { diff --git a/app/Views/editEmployee.php b/app/Views/editEmployee.php index 85145b28..13ce1fed 100644 --- a/app/Views/editEmployee.php +++ b/app/Views/editEmployee.php @@ -494,7 +494,7 @@ function validateESI() { } function validatePF() { - var regpf = /^([a-zA-Z]){5}([0-9]){17}?$/; + var regpf = /^\d{12}$/; var PF = $('#pfno').val(); @@ -1307,8 +1307,8 @@ legend { value="" onchange="validatePF();" class="form-control" style="text-transform:uppercase" - pattern="([a-zA-Z]){5}([0-9]){17}" - title=" 5 Character and 17 Digit number (ex:ABCDE12345678901234567)" + pattern="\d{12}" + title="12 Digit number" onkeypress="return alpha(event);"> diff --git a/app/Views/monthlypayinputs.php b/app/Views/monthlypayinputs.php index df8f1a5f..1fa85988 100644 --- a/app/Views/monthlypayinputs.php +++ b/app/Views/monthlypayinputs.php @@ -35,51 +35,50 @@ ?> - - - - + -$('html').bind('keypress', function(e) -{ - //alert('Key Pressed'); - if(e.keyCode == 13) - { - return false; - } + - - - -
- -
-

-
Employee Monthly Payment Listing
-

-
-
- - -
-
-
-
- -
- -

The Red highlighted Employee have loan to pay. Put 'NA' for Skip Current Month Loan Due.

-
-
-
- -
- +
+ +
+

+
Employee Monthly Payment Listing
+

+
+
+ + +
+
+
+
+ +
+ +

The Red highlighted Employee have loan + to pay. Put 'NA' for Skip Current + Month Loan Due.

+
+
+
+ + +
+ -
-
-
-
- -
-
-
- -
- - - - - - - - - - - - - - +
+
+
+
+ + +
+
-
- - - - - - - - - - - - +
+
S.NoEmp ID Employee DOJDesignationTotal DaysDays WorkedLOP DaysPaid LeaveOT HrsBasic SalaryPre Day SalaryWorked SalaryPre hr SalaryEarned SalaryBasic Salary(0.7)HRA Salary(0.3)Gross SalaryESIPFOver Time
+ + - + + + + + + + + + + - - - - - + + + + + + + + + + + - - - - - - - Auto Loan Due ₹ + + + + + + + + + + + + + + + EmpID); ?> - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + + - + + - + + + - - + + + - - - - + - + + - - - - - + - - - - - - - - - - - + + + + + + + - + + - - - - + + - - - - - - - - - - - - - - - -
Auto Loan Due ₹S.NoEmp ID Employee DOJDesignationTotal DaysDays WorkedLOP DaysPaid LeaveOT HrsManual Loan Due ₹Incentives in ₹TDS Deductions in ₹Festival Bonus in ₹Basic SalaryPre Day SalaryWorked SalaryPre hr SalaryEarned SalaryBasic Salary(0.7)HRA Salary(0.3)Gross SalaryESIPFOver TimeEstimate in ₹
Manual Loan Due ₹Incentives in ₹TDS Deductions in ₹Festival Bonus in ₹Estimate in ₹
EmpID ; ?>FirstName; ?> - + + EmpID ; ?>FirstName; ?> + DateofJoining); $newDateFormat = $date->format('d-m-Y'); echo $newDateFormat; ?> - Designation; ?>NoofDays; ?>Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Days_worked)){echo $record->Days_worked+$record->sunday_count;}else{echo "0.00";}?>Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >LOP_Days)){echo $record->LOP_Days;}else{echo "0.00";}?>Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Paid_leave)){echo number_format($record->Paid_leave,2,'.','');}else { echo number_format(0.00,2,'.','');} ?>Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >OT_Hrs_Worked)){echo $record->OT_Hrs_Worked;}else { echo number_format(0.00,2,'.','');} ?>TotalSalary; ?>TotalSalary / $record->NoofDays; echo number_format($perDaySalary, 2); ?>Days_worked+$record->sunday_count); echo number_format($workedSalary, 2); ?> Designation; ?>NoofDays; ?>Key)){echo "contenteditable='false';"; } ?> + Key)){?> title="Payslip Calculated" + style="text-align:right;color:blue;" + style="text-align:right;" > + Days_worked)){echo $record->Days_worked+$record->sunday_count;}else{echo "0.00";}?> + Key)){echo "contenteditable='false';"; } ?> + Key)){?> title="Payslip Calculated" + style="text-align:right;color:blue;" + style="text-align:right;" > + LOP_Days)){echo $record->LOP_Days;}else{echo "0.00";}?> + Key)){echo "contenteditable='false';"; } ?> + Key)){?> title="Payslip Calculated" + style="text-align:right;color:blue;" + style="text-align:right;" > + Paid_leave)){echo number_format($record->Paid_leave,2,'.','');}else { echo number_format(0.00,2,'.','');} ?> + Key)){echo "contenteditable='false';"; } ?> + Key)){?> title="Payslip Calculated" + style="text-align:right;color:blue;" + style="text-align:right;" > + OT_Hrs_Worked)){echo $record->OT_Hrs_Worked;}else { echo number_format(0.00,2,'.','');} ?> + Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Monthly_Due)){echo $record->Monthly_Due; $totalmonthloan []=$record->Monthly_Due;}else { echo number_format(0.00,2,'.','');} ?>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;} ?> + TotalSalary; ?> + TotalSalary / $record->NoofDays; echo number_format($perDaySalary, 2); ?> + + Days_worked+$record->sunday_count); echo number_format($workedSalary, 2); ?> + + + + + + + + Key)){echo "contenteditable='false';"; } ?> + Key)){?> title="Payslip Calculated" + style="text-align:right;color:blue;" + style="text-align:right;" > + Monthly_Due)){echo $record->Monthly_Due; $totalmonthloan []=$record->Monthly_Due;}else { echo number_format(0.00,2,'.','');} ?> + 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) && !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,'.','');} ?>Key)){echo "contenteditable='true';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Festival_Bonus)){echo $record->Festival_Bonus;$totalfestival [] = $record->Festival_Bonus;}else{ echo number_format(0.00,2,'.','');;} ?>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,'.','');} ?> + Key)){echo "contenteditable='true';"; } ?> + Key)){?> title="Payslip Calculated" + style="text-align:right;color:blue;" + style="text-align:right;" > + Festival_Bonus)){echo $record->Festival_Bonus;$totalfestival [] = $record->Festival_Bonus;}else{ echo number_format(0.00,2,'.','');;} ?> + Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"> - Estimate)){ + + + Key)){echo "contenteditable='false';"; } ?> + Key)){?> title="Payslip Calculated" + style="text-align:right;color:blue;" > + Estimate)){ echo $record->Estimate; $estTotal [] = $record->Estimate; }else { echo $empSalary[$i]; $estTotal [] = $empSalary[$i]; }?> -
Total
-
-

 

-
-
- -
-
-
- + -
-
-
-
-
- - + \ No newline at end of file + \ No newline at end of file