diff --git a/application/controllers/employeedetails.php b/application/controllers/employeedetails.php
index 2b0372e1..89ac2deb 100755
--- a/application/controllers/employeedetails.php
+++ b/application/controllers/employeedetails.php
@@ -224,6 +224,8 @@ class employeedetails extends BaseController
$this->form_validation->set_rules('panno', 'panno', 'trim|min_length[10]|max_length[10]');
$this->form_validation->set_rules('passportno', 'passportno', 'trim|min_length[9]|max_length[9]');
$this->form_validation->set_rules('accountno', 'accountno', 'trim|min_length[10]|max_length[20]');
+ $this->form_validation->set_rules('pfno', 'pfno', 'trim|min_length[22]|max_length[22]');
+ $this->form_validation->set_rules('esino', 'esino', 'trim|min_length[10]|max_length[10]');
if($this->form_validation->run() == FALSE)
@@ -281,6 +283,9 @@ class employeedetails extends BaseController
$driverlicense = strtoupper($this->input->post ( 'driverlicense' ));
$licenseExpiryDate = $this->input->post ( 'licenseExpiryDate' );
$VoterID = strtoupper($this->input->post ( 'voterID' ));
+ $PFno = $this->input->post('pfno');
+ $ESIno = $this->input->post('esino');
+ $Nominee = $this->input->post('nomineename');
$createdby = $this->session->userdata ( 'userId' );
if($licenseExpiryDate != '')
@@ -320,8 +325,10 @@ class employeedetails extends BaseController
'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,
'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'CreatedBy'=>$createdby,
'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,
- 'LicenseValidtill'=>$License_ExpiryDate,'VoterID'=>$VoterID);
- $this->load->model('employeedetails_model');
+ 'LicenseValidtill'=>$License_ExpiryDate,'VoterID'=>$VoterID,'PFNO'=>$PFno,'ESI'=>$ESIno,
+ 'NomineeDetails'=>$Nominee);
+ //$this->load->model('employeedetails_model');
+ //print_r($Employee);die();
$result = $this->employeedetails_model->addNewemployee($Employee);
if($result > 0)
@@ -593,6 +600,9 @@ echo "";redirect('employeeListing','
$this->form_validation->set_rules('panno', 'panno', 'trim|max_length[10]');
$this->form_validation->set_rules('passportno', 'passportno', 'trim|min_length[9]|max_length[9]');
$this->form_validation->set_rules('accountno', 'accountno', 'trim|min_length[10]|max_length[20]');
+ $this->form_validation->set_rules('pfno', 'pfno', 'trim|min_length[22]|max_length[22]');
+ $this->form_validation->set_rules('esino', 'esino', 'trim|min_length[10]|max_length[10]');
+
if($this->form_validation->run() == FALSE)
{
@@ -605,11 +615,24 @@ echo "";redirect('employeeListing','
$this->load->model('employeedetails_model');
$EmpId = $this->input->post('employeeid');
$PictureName = $this->input->post('Image');
+ $ModifyPictureName = $this->input->post('ModifyImage');
if ($PictureName != '')
{
//echo 'Exists';
- $Picture = $PictureName;
+ //$Picture = $PictureName;
+ if(strlen($ModifyPictureName) == 0)
+ {
+ //echo 'Exists But Not replace';
+ $Picture = $PictureName;
+ }
+ else
+ {
+ //echo 'Exists But Replace';
+ $Picture = $ModifyPictureName;
+ //$Picture = $this->editimage($ModifyPictureName);
+ //$Picture = $this->add($ModifyPictureName);
+ }
}
else
{
@@ -662,7 +685,11 @@ echo "";redirect('employeeListing','
$driverlicense = strtoupper($this->input->post ( 'Driverlicense' ));
$licenseExpiryDate = $this->input->post ( 'LicenseExpiryDate' );
$VoterID = strtoupper($this->input->post ( 'VoterID' ));
- $chked = $this->input->post('isactive');
+ $pfno = strtoupper($this->input->post('pfno'));
+ //$uano = $this->input->post('uano');
+ $esino = $this->input->post('esino');
+ $Nominee = $this->input->post('nomineename');
+ $chked = $this->input->post('isactive');
// echo 'chkvalue'. $chked ;
if( $chked != '')
{
@@ -697,8 +724,21 @@ echo "";redirect('employeeListing','
}
//echo $DOB;
- $Employee = array('FirstName'=>$FirstName, 'LastName'=>$LastName,'FatherName'=>$FatherName,'Gender'=>$Gender,'DateofBirth'=>$DOB,'ContactNumber'=>$ContactNumber,'EmailId'=>$EmailId,'BloodGroup'=>$BloodGroup,'MartialStatus'=>$MartialStatus,'DateofJoining'=>$DOJ,'PreviousYearsOfExp'=>$Previousexperience,'Designation'=>$desigination,'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadharno,'PANNo'=>$panno,'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$Valid,'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'UpdatedBY'=>$UpdatedBY,'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,'LicenseValidtill'=>$License_ExpiryDate,'VoterID'=>$VoterID);
-
+ $Employee = array('FirstName'=>$FirstName, 'LastName'=>$LastName,'FatherName'=>$FatherName,'Gender'=>$Gender,
+ 'DateofBirth'=>$DOB,'ContactNumber'=>$ContactNumber,'EmailId'=>$EmailId,
+ 'BloodGroup'=>$BloodGroup,'MartialStatus'=>$MartialStatus,'DateofJoining'=>$DOJ,
+ 'PreviousYearsOfExp'=>$Previousexperience,'Designation'=>$desigination,
+ 'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,
+ 'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,
+ 'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,
+ 'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadharno,'PANNo'=>$panno,
+ 'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,
+ 'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$Valid,
+ 'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,
+ 'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'UpdatedBY'=>$UpdatedBY,
+ 'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,'LicenseValidtill'=>$License_ExpiryDate,
+ 'VoterID'=>$VoterID,'PFNO'=>$pfno,'ESI'=>$esino,'NomineeDetails'=>$Nominee);
+ //print_r($Employee);die();
$result = $this->employeedetails_model->UpdateEmployee($Employee,$EmpId);
if($result > 0)
@@ -767,7 +807,7 @@ echo ""; redirect('employeeListin
$this->excel->getActiveSheet()->setCellValue('AE5', 'IsActive');
$this->excel->getActiveSheet()->setCellValue('AF5', 'PFNO');
$this->excel->getActiveSheet()->setCellValue('AG5', 'ESI');
- $this->excel->getActiveSheet()->setCellValue('AH5', 'UANO');
+ $this->excel->getActiveSheet()->setCellValue('AH5', 'Nominee Name');
$this->excel->getActiveSheet()->setCellValue('AI5', 'PF_Balance');
$this->excel->getActiveSheet()->setCellValue('AJ5', 'PF_Bal_On');
$this->excel->getActiveSheet()->setCellValue('AK5', 'Remarks');
diff --git a/application/views/addemployee.php b/application/views/addemployee.php
index 6d340526..5037a973 100755
--- a/application/views/addemployee.php
+++ b/application/views/addemployee.php
@@ -89,18 +89,18 @@ $(function(){
function alpha(evt) {
var k;
document.all ? k = evt.keyCode : k = evt.which;
- return ((k > 64 && k < 91) || (k > 96 && k < 123) || k == 8 || k == 33 || (k >= 48 && k <= 57));
+ return ((k > 64 && k < 91) || (k > 96 && k < 123) || k == 8 || k == 32 || k == 33 || (k >= 48 && k <= 57));
}
//PAN Validate
function validatePAN() {
- var reg = /(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}$/;
-
- var PAN = $('#panno').val();
+ //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();
if(PAN != '')
{
- if (reg.test(PAN) == false)
+ if (regpan.test(PAN) == false)
{
alert('Please Enter Valid PAN Number');
return (false);
@@ -365,7 +365,46 @@ function onlyAlphabets(evt) {
}
-
+function validatePF() {
+ var regpf = /^([a-zA-Z]){5}([0-9]){17}$/;
+
+
+ var PF = $('#pfno').val();
+
+ if(PF != '')
+ {
+ if (regpf.test(PF) == false)
+ {
+ alert('Please Enter Valid PF Number');
+ return (false);
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+}
+
+function validateESI() {
+ var reg = /(?=.*[0-9]).{10,}$/;
+
+ var ESI = $('#esino').val();
+
+ if(ESI != '')
+ {
+ if (reg.test(ESI) == false)
+ {
+ alert('Please Enter Valid ESI Number');
+ return (false);
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+}