diff --git a/app/Controllers/Payslip.php b/app/Controllers/Payslip.php index b0b94253..2560f3ff 100755 --- a/app/Controllers/Payslip.php +++ b/app/Controllers/Payslip.php @@ -69,7 +69,9 @@ class Payslip extends BaseController $EmpId = $this->request->getPost('employee'); $res = $this->payroll_model->getMonthlyPayDetails($EmpId, $PayOn); + $result = $res[0]; + $loan = []; $loanHistory = []; $loan_id = 0; @@ -126,7 +128,6 @@ class Payslip extends BaseController 'ESINumber' => $result->ESINO, 'UANNO' => $result->PFNO, ]; - $insert = $this->payroll_model->insertPayroll($data); if($insert){ @@ -895,16 +896,16 @@ class Payslip extends BaseController $Created_By = $this->session->get('userId'); if (!is_numeric($DaysWorked) || ($DaysWorked > 31) || (strlen((string)$DaysWorked)) > 5) { - //echo $EmpID . "-LOP_Days Invalid Data!"; + // echo $EmpID . "-LOP_Days Invalid Data!"; $ErrorFlag++; } if (!is_numeric($LOP_Days) || ($LOP_Days > 31) || (strlen((string)$LOP_Days)) > 5) { - //echo $EmpID . "-LOP_Days Invalid Data!"; + // echo $EmpID . "-LOP_Days Invalid Data!"; $ErrorFlag++; } if (!is_numeric($Paid_leave) || ($Paid_leave > 31) || (strlen((string)$Paid_leave)) > 5) { - //echo $EmpID . "-Paid Leave Invalid Data!"; + // echo $EmpID . "-Paid Leave Invalid Data!"; $ErrorFlag++; } @@ -914,7 +915,7 @@ class Payslip extends BaseController $OT_Hrs_Worked_first = explode(".", $OT_Hrs_Worked); if (!is_numeric($OT_Hrs_Worked) || (strlen((string)$OT_Hrs_Worked)) > 6 || (strlen((string)$OT_Hrs_Worked_first[0])) >= 4) // || (strlen((string)$OT_Hrs_Worked_first[1]))> 3 ) { - //echo $EmpID . "-OT Hrs Invalid Data!"; + // echo $EmpID . "-OT Hrs Invalid Data!"; $ErrorFlag++; } @@ -923,14 +924,14 @@ class Payslip extends BaseController $Loan_Recovered_first = explode(".", $Loan_Recovered); if ((strlen((string)$Loan_Recovered)) > 8 || (strlen((string)$Loan_Recovered_first[0])) > 5) { - //echo $EmpID . "-Loan Recoverd Invalid Data!"; + // echo $EmpID . "-Loan Recoverd Invalid Data!"; $ErrorFlag++; } } else if (is_string($Loan_Recovered)) { - //echo "STRING"; + // echo "STRING"; if (strcasecmp($Loan_Recovered, 'NA')) { - //echo "NOT NA"; + // echo "NOT NA"; $ErrorFlag++; } } @@ -939,18 +940,21 @@ class Payslip extends BaseController $Festivalbonus_first = explode(".", $Festival_Bonus); if (!is_numeric($Festival_Bonus) || (strlen((string)$Festival_Bonus)) > 8 || (strlen((string)$Festivalbonus_first[0])) > 5) { + // echo $EmpID . "-Festival bonus Invalid Data!"; $ErrorFlag++; } $Other_Deductions_first = explode(".", $Other_Deductions); if (!is_numeric($Other_Deductions) || (strlen((string)$Other_Deductions)) > 8 || (strlen((string)$Other_Deductions_first[0])) > 5) { - //echo $EmpID . "-Loan Recoverd Invalid Data!"; + // echo $EmpID . "-Other Deductions Invalid Data!"; $ErrorFlag++; } $Estimate_first = explode(".", $Estimate); - if (!is_numeric($Estimate) || (strlen((string)$Estimate)) > 8 || (strlen((string)$Estimate_first[0])) > 5) { - //echo $EmpID . "-Loan Recoverd Invalid Data!"; + + if (!is_numeric($Estimate) || (strlen((string)$Estimate)) > 8 || (strlen((string)$Estimate_first[0])) > 6) { + // echo $Estimate_first[0]; + // echo $EmpID . "-Estimate Invalid Data!"; $ErrorFlag++; } diff --git a/app/Models/Payroll_model.php b/app/Models/Payroll_model.php index aebe4db9..51e22f3a 100755 --- a/app/Models/Payroll_model.php +++ b/app/Models/Payroll_model.php @@ -494,7 +494,7 @@ class Payroll_model extends Model function getMonthlyPayDetails($EmpId, $PayOn) { $builder = $this->db->table('t_monthly_pay_inputs MonthlyPay ') - ->select('MonthlyPay.*, E.BankAccountNo , E.PFNO , E.ESI as ESINO , L.*') + ->select('MonthlyPay.*, E.BankAccountNo , E.PFNO , E.ESI as ESINO , L.Loan_ID, L.Loan_Amount, L.Loan_Issued_Date, L.Monthly_Due, L.Due_Start_Date, L.No_of_Dues, L.Paid_Due, L.Remaining_Due, L.Paid_Amount') ->join('t_employee_details as E', 'MonthlyPay.EmpID = E.EmpID', 'left') ->join('t_loan_master as L', 'MonthlyPay.EmpID = L.EmpID and L.is_Active = 1', 'left') ->where('MonthlyPay.EmpID', $EmpId) diff --git a/app/Views/attendance.php b/app/Views/attendance.php index b267f23d..62779526 100755 --- a/app/Views/attendance.php +++ b/app/Views/attendance.php @@ -519,7 +519,8 @@ $currentday = date('d'); var currentdate = '01-' + currentmonth + '-' + currentyear; var totaldata = 0; - // $('.content').loader('show'); + + $('#loader').show(); $.ajax({ data: { param1: alldata, @@ -532,7 +533,8 @@ $currentday = date('d'); success: function(data) { if (data) { - // $('.content').loader('hide'); + + $('#loader').hide(); alert(data); //totaldata = totaldata + parseFloat(data); //console.log(data); diff --git a/app/Views/includes/new_footer.php b/app/Views/includes/new_footer.php index ca8238cd..ece6ba57 100755 --- a/app/Views/includes/new_footer.php +++ b/app/Views/includes/new_footer.php @@ -140,6 +140,9 @@ // todayHighlight: true, // clearBtn: true // }); + + + diff --git a/app/Views/includes/new_header.php b/app/Views/includes/new_header.php index 55d69e6b..a2bba4ba 100755 --- a/app/Views/includes/new_header.php +++ b/app/Views/includes/new_header.php @@ -354,6 +354,61 @@ /* This CSS is for Table Cell Expend*/ + + + + + + + + @@ -367,11 +422,11 @@