Change in payroll save : GWM

This commit is contained in:
Smart 2024-09-18 08:17:23 +05:30
parent be86795246
commit 8674ff7f1c

View File

@ -895,16 +895,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 +914,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 +923,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 +939,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++;
}