diff --git a/application/controllers/employeedetails.php b/application/controllers/employeedetails.php
index dd72cab6..da0299fd 100755
--- a/application/controllers/employeedetails.php
+++ b/application/controllers/employeedetails.php
@@ -226,17 +226,24 @@ class employeedetails extends BaseController
$bankbranchname = $this->input->post('bankbranchname');
$bankaddress = $this->input->post('bankaddress');
$aadharno = $this->input->post('aadharno');
- $panno = $this->input->post('panno');
+ $panno =strtoupper($this->input->post('panno'));
$passportno = $this->input->post('passportno');
$ValidTill = $this->input->post('ValidTill');
$addinfo = $this->input->post('addinfo');
- $IsActive = '1';
+ $IsActive = '1';
$driverlicense = $this->input->post ( 'driverlicense' );
$licenseExpiryDate = $this->input->post ( 'licenseExpiryDate' );
$VoterID = $this->input->post ( 'voterID' );
$createdby = $this->session->userdata ( 'userId' );
- $licenseExpiryDate = $this->getDateformat($licenseExpiryDate);
+ if($licenseExpiryDate != '')
+ {
+ $License_ExpiryDate = $this->getDateformat($licenseExpiryDate);
+ }
+ else
+ {
+ $License_ExpiryDate = null;
+ }
$DOB = $this->getDateformat($DateofBirth);
$DOJ = $this->getDateformat($dateofjoining);
@@ -250,7 +257,7 @@ class employeedetails extends BaseController
}
//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,'CreatedBy'=>$createdby,'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,'LicenseValidtill'=>$licenseExpiryDate,'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,'CreatedBy'=>$createdby,'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,'LicenseValidtill'=>$License_ExpiryDate,'VoterID'=>$VoterID);
//print_r($Employee);die();
$this->load->model('employeedetails_model');
$result = $this->employeedetails_model->addNewemployee($Employee);
@@ -395,7 +402,7 @@ echo "";
$data['DepartmentList'] = $this->employeedetails_model->getDepartment();
$data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID);
- $this->global['pageTitle'] = 'Siddharth : Edit Employee';
+ $this->global['pageTitle'] = 'Siddharth : View Employee';
$this->loadViews("editEmployee", $this->global, $data, NULL);
@@ -500,14 +507,14 @@ echo "";
$bankbranchname = $this->input->post('bankbranchname');
$bankaddress = $this->input->post('bankaddress');
$aadharno = $this->input->post('aadharno');
- $panno = $this->input->post('panno');
+ $panno = strtoupper($this->input->post('panno'));
$passportno = $this->input->post('passportno');
$ValidTill = $this->input->post('ValidTill');
$addinfo = $this->input->post('addinfo');
- $driverlicense = $this->input->post ( 'Driverlicense' );
+ $driverlicense = $this->input->post ( 'Driverlicense' );
$licenseExpiryDate = $this->input->post ( 'LicenseExpiryDate' );
$VoterID = $this->input->post ( 'VoterID' );
- $chked = $this->input->post('isactive');
+ $chked = $this->input->post('isactive');
// echo 'chkvalue'. $chked ;
if( $chked != '')
{
@@ -520,7 +527,7 @@ echo "";
// echo 'chkvalue'. $IsActive ;
$UpdatedBY = $this->session->userdata ( 'userId' );
- $licenseExpiryDate = $this->getDateformat($licenseExpiryDate);
+ //$licenseExpiryDate = $this->getDateformat($licenseExpiryDate);
$DOB = $this->getDateformat($DateofBirth);
$DOJ = $this->getDateformat($dateofjoining);
if($ValidTill != '')
@@ -531,9 +538,18 @@ echo "";
{
$Valid = null;
}
+
+ if($licenseExpiryDate != '')
+ {
+ $License_ExpiryDate = $this->getDateformat($licenseExpiryDate);
+ }
+ else
+ {
+ $License_ExpiryDate = null;
+ }
//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'=>$licenseExpiryDate,'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);
//print_r($Employee);die();
$result = $this->employeedetails_model->UpdateEmployee($Employee,$EmpId);
diff --git a/application/models/storerequistion_model.php b/application/models/storerequistion_model.php
index 77f19f75..abe9d9aa 100755
--- a/application/models/storerequistion_model.php
+++ b/application/models/storerequistion_model.php
@@ -303,7 +303,7 @@ class storerequistion_model extends CI_Model
// echo 'UserId: '.$UserID . 'From: '.$FromDate .'TO: '. $ToDate. 'Status: '. $Status;
- $subQuery = 'select distinct Str.StoreReqNo,Str.Requestedby,Str.ReqDate,Str.Status,Str.CreatedDate,Str.Comments,St.StatusName
+ $subQuery = 'select distinct Str.StoreReqNo,Str.Requestedby,Str.ReqDate,Str.Status,Str.CreatedDate,Str.Comments,St.StatusName,Emp.FirstName
from T_Store_Requestion_Master Str
join T_Status St on St.StatusCode = Str.Status
join T_Employee_Details Emp on Emp.Departmentcode =Str.DepartmentCode
@@ -328,7 +328,7 @@ class storerequistion_model extends CI_Model
function getRequistDetails($StoreReqNo='')
{
- $subQuery = 'select Str.StoreReqNo,Str.Requestedby,Str.ReqDate,Dept.DEPCode,Dept.DepartmentName,Cm.CostCenterCode,Cm.CostCenterName from T_Store_Requestion_Master Str
+ $subQuery = 'select Str.StoreReqNo,Str.Requestedby,Str.ReqDate,Dept.DEPCode,Dept.DepartmentName,Cm.CostCenterCode,Cm.CostCenterName,Emp.FirstName from T_Store_Requestion_Master Str
join T_DepartmentDetails Dept on Dept.DEPCode = Str.DepartmentCode
join T_CostCenter_Master Cm on Cm.CostCenterCode =Str.CostCenterCode
where StoreReqNo =? ';
diff --git a/application/views/addemployee.php b/application/views/addemployee.php
index cf153941..4f57ac2d 100755
--- a/application/views/addemployee.php
+++ b/application/views/addemployee.php
@@ -161,6 +161,26 @@ function validatecomEmail() {
}
}
+function ValidateAadhar(){
+ var reg = /(?=.*[0-9]).{12}$/;
+ var aadhar = $('aadharno').val();
+ if(aadhar != '')
+ {
+ if(reg.test()== false)
+ {
+ alert('Please Enter Valid Aadhar Number');
+ }
+ else
+ {
+ return true;
+ }
+ }
+ else
+ {
+ alert('please Enter Aadhar number');
+
+ }
+}
function validateDriverLicense() {
@@ -225,9 +245,16 @@ $(function() {
});
$("#ValidTill").datepicker({dateFormat: 'mm/dd/yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-0:+100'
});
- $("#LicenseExpiryDate").datepicker({dateFormat: 'mm/dd/yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-0:+100'
+ $("#LicenseExpiryDate").datepicker({
+ dateFormat: 'mm/dd/yy',
+ minDate :'now',
+ changeMonth: true,
+ changeYear: true,
+ yearRange: '-0:+100'
+
});
-
+ // $( ".selector" ).datepicker({
+ // dateFormat: 'yy-mm-dd' });
});
@@ -265,6 +292,17 @@ function onlyAlphabets(evt) {
return false;
return true;
}
+
+
+ $(document).ready(function(){
+ $("#gender").select2();
+ $("#bloodgroup").select2();
+ $("#MartialStatus").select2();
+ $("#desigination").select2();
+ $("#departmentname").select2();
+ $("#eduqualifaction").select2();
+ });
+