diff --git a/app/Controllers/Inwardgateregister.php b/app/Controllers/Inwardgateregister.php index f633fb88..86bc1379 100755 --- a/app/Controllers/Inwardgateregister.php +++ b/app/Controllers/Inwardgateregister.php @@ -382,7 +382,7 @@ class Inwardgateregister extends BaseController if (!empty($MasterFile)) { $requestMasterFileName = $MasterFile->getName(); if ($MasterFile && $MasterFile->isValid() && !$MasterFile->hasMoved()) { - if (!empty($this->inwardgateregister_model->isFileExistsInIGRmaster($requestMasterFileName))) { + if (!empty($this->inwardgateregister_model->isFileExistsInIGRmaster(filename: $requestMasterFileName))) { log_message('error', 'File already exists in the database'.$requestMasterFileName); } else{ @@ -1727,7 +1727,7 @@ function updateIGRWeight(){ // Ensure file exists and is not a directory if (file_exists($filePath) && is_file($filePath)) { // Sanitize filename for ZIP - $sanitizedFilename = preg_replace('/[^a-zA-Z0-9_\-\.]/', '_', $file->filename); + $sanitizedFilename = preg_replace('/[^a-zA-Z0-9_\-\.]/', '_', $file->file); if (!$zip->addFile($filePath, $sanitizedFilename)) { echo ''; $zip->close(); diff --git a/app/Views/addEmployeenew.php b/app/Views/addEmployeenew.php index d8062dac..240f82ec 100755 --- a/app/Views/addEmployeenew.php +++ b/app/Views/addEmployeenew.php @@ -315,11 +315,13 @@ } function ValidatePassport() { - var regsaid = /^[aA-prPR-wyWY][1-9]\d\s?\d{4}[1-9]$/ig; - var passport = $("#passportno").val(); - //alert(passport); + + var regsaid = /^[A-Z][1-9]\d\s?\d{4}[1-9]$/; + var passport = $("#passportno").val().trim(); + if (regsaid.test(passport) == false) { alert('You have entered invalid Passport.'); + alert(`The first character must be an uppercase alphabet. The next two characters should be numbers,with the first character ranging from 1 to 9 and the second character from 0 to 9. It may include zero or one white space character. The subsequent four characters can be any number from 0 to 9. The last character should be any number from 1 to 9."`); return (false); } else { return true; @@ -1001,7 +1003,7 @@ class="form-control" value="Aadhar" readonly>
- +
@@ -1027,7 +1029,7 @@ class="form-control" value="PAN" readonly>
- +
@@ -1039,8 +1041,15 @@ + pattern="^[A-Z][1-9]\d\s?\d{4}[1-9]$" + title=" + The first character must be an uppercase alphabet. + The next two characters should be numbers, + with the first character ranging from 1 to 9 and the second character from 0 to 9. + It may include zero or one white space character. + The subsequent four characters can be any number from 0 to 9. + The last character should be any number from 1 to 9." + >
@@ -1049,7 +1058,7 @@ class="form-control" value="Passport" readonly>
- +
@@ -1063,7 +1072,7 @@ class="form-control" value="Bank Passbook" readonly>
- +
@@ -1076,7 +1085,7 @@ class="form-control" value="Other Document" >
- +
diff --git a/app/Views/editEmployeenew.php b/app/Views/editEmployeenew.php index 202b2e4f..e2d1f10d 100755 --- a/app/Views/editEmployeenew.php +++ b/app/Views/editEmployeenew.php @@ -1026,7 +1026,7 @@ if (!empty($EmpDetails)) {
- +
@@ -1064,7 +1064,7 @@ if (!empty($EmpDetails)) {
- +
@@ -1102,7 +1102,7 @@ if (!empty($EmpDetails)) {
- +
@@ -1130,7 +1130,7 @@ if (!empty($EmpDetails)) {
- +
@@ -1157,7 +1157,7 @@ if (!empty($EmpDetails)) {
- +
@@ -1210,12 +1210,17 @@ if (!empty($EmpDetails)) {
+ pattern="^[A-Z][1-9]\d\s?\d{4}[1-9]$" + title=" + The first character must be an uppercase alphabet. + The next two characters should be numbers, + with the first character ranging from 1 to 9 and the second character from 0 to 9. + It may include zero or one white space character. + The subsequent four characters can be any number from 0 to 9. + The last character should be any number from 1 to 9." + >
@@ -1340,7 +1345,7 @@ if (!empty($EmpDetails)) { //var reg = /(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}$/; var regpan = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/; - var PAN = $('#panno').val(); + var PAN = $('#panno').val().trim(); if (PAN != '') { if (regpan.test(PAN) == false) { @@ -1361,7 +1366,7 @@ if (!empty($EmpDetails)) { function ValidateAadhar() { //alert('validation entered'); var reg = /^\d{4}\s\d{4}\s\d{4}$/ - var aadhar = $('#aadharno').val(); + var aadhar = $('#aadharno').val().trim(); var aadhar_count = $('#aadharno').val().length; if (aadhar != '') // && aadhar_count != '') @@ -1692,11 +1697,16 @@ if (!empty($EmpDetails)) { } function ValidatePassport() { - var regsaid = /^[A-PR-WY][1-9]\d\s?\d{4}[1-9]$/ig; - var passport = $("#passportno").val(); - //alert(passport); + var regsaid = /^[A-Z][1-9]\d\s?\d{4}[1-9]$/ig; + var passport = $("#passportno").val().trim(); if (regsaid.test(passport) == false) { alert('You have entered invalid Passport.'); + alert(` The first character must be an uppercase alphabet. + The next two characters should be numbers, + with the first character ranging from 1 to 9 and the second character from 0 to 9. + It may include zero or one white space character. + The subsequent four characters can be any number from 0 to 9. + The last character should be any number from 1 to 9."`); return; }