add and Edit screen issue fixed
This commit is contained in:
parent
5a66adfee3
commit
838c37af9f
File diff suppressed because it is too large
Load Diff
@ -34,6 +34,10 @@
|
|||||||
$Reference_ContactNumber = '';
|
$Reference_ContactNumber = '';
|
||||||
$Remarks = '';
|
$Remarks = '';
|
||||||
$DepartmentName = '';
|
$DepartmentName = '';
|
||||||
|
$DOPassport = '';
|
||||||
|
$Age = '';
|
||||||
|
$DOB = '';
|
||||||
|
$DOJ = '';
|
||||||
if(!empty($EmpDetails))
|
if(!empty($EmpDetails))
|
||||||
{
|
{
|
||||||
foreach ($EmpDetails as $Emp)
|
foreach ($EmpDetails as $Emp)
|
||||||
@ -47,12 +51,14 @@ if(!empty($EmpDetails))
|
|||||||
$from = new DateTime($DateofBirth);
|
$from = new DateTime($DateofBirth);
|
||||||
$to = new DateTime('today');
|
$to = new DateTime('today');
|
||||||
$Age = $from->diff($to)->y;
|
$Age = $from->diff($to)->y;
|
||||||
//echo $Age;
|
$DOB = $from ->format('Y-m-d');
|
||||||
$ContactNumber = $Emp->ContactNumber;
|
$ContactNumber = $Emp->ContactNumber;
|
||||||
$EmailId = $Emp->EmailId;
|
$EmailId = $Emp->EmailId;
|
||||||
$BloodGroup = $Emp->BloodGroup;
|
$BloodGroup = $Emp->BloodGroup;
|
||||||
$MartialStatus = $Emp->MartialStatus;
|
$MartialStatus = $Emp->MartialStatus;
|
||||||
$DateofJoining = $Emp->DateofJoining;
|
$DateofJoining = $Emp->DateofJoining;
|
||||||
|
$dtDOJ = new DateTime($DateofJoining);
|
||||||
|
$DOJ = $dtDOJ ->format('Y-m-d');
|
||||||
$PreviousYearsOfExp = $Emp->PreviousYearsOfExp;
|
$PreviousYearsOfExp = $Emp->PreviousYearsOfExp;
|
||||||
$Designation = $Emp->Designation;
|
$Designation = $Emp->Designation;
|
||||||
$Departmentcode = $Emp->Departmentcode;
|
$Departmentcode = $Emp->Departmentcode;
|
||||||
@ -71,6 +77,11 @@ if(!empty($EmpDetails))
|
|||||||
$BankAddress = $Emp->BankAddress;
|
$BankAddress = $Emp->BankAddress;
|
||||||
$PassportNo = $Emp->PassportNo;
|
$PassportNo = $Emp->PassportNo;
|
||||||
$Passport_Valid_till = $Emp->Passport_Valid_till;
|
$Passport_Valid_till = $Emp->Passport_Valid_till;
|
||||||
|
if($Passport_Valid_till != '')
|
||||||
|
{
|
||||||
|
$dtpassport = new DateTime($Passport_Valid_till);
|
||||||
|
$DOPassport = $dtpassport ->format('Y-m-d');
|
||||||
|
}
|
||||||
$IsActive = $Emp->IsActive;
|
$IsActive = $Emp->IsActive;
|
||||||
$ProfilePic = $Emp->ProfilePic;
|
$ProfilePic = $Emp->ProfilePic;
|
||||||
$Reference_Name = $Emp->Reference_Name;
|
$Reference_Name = $Emp->Reference_Name;
|
||||||
@ -444,7 +455,7 @@ function ValidatePassport()
|
|||||||
<input type="text" name="FatherName" id="FatherName" maxlength="200" value="<?php echo $FatherName ; ?>" placeholder="Father / Husband Name" class="form-control" required>
|
<input type="text" name="FatherName" id="FatherName" maxlength="200" value="<?php echo $FatherName ; ?>" placeholder="Father / Husband Name" class="form-control" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 pad"><span class="badge">*</span>
|
<div class="col-md-6 pad"><span class="badge">*</span>
|
||||||
<input id="DateofBirth" required name="DateofBirth" value="<?php echo $DateofBirth ; ?>" maxlength="10" placeholder="Date Of Birth" onchange="getAge();" class="form-control">
|
<input id="DateofBirth" required name="DateofBirth" value="<?php echo $DOB ; ?>" maxlength="10" placeholder="Date Of Birth" onchange="getAge();" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6 pad">
|
<div class="col-md-6 pad">
|
||||||
@ -593,7 +604,7 @@ function ValidatePassport()
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input id="dateofjoining" name="dateofjoining" value="<?php echo $DateofJoining; ?>" maxlength="10" required placeholder="Date Of Joining" class="form-control">
|
<input id="dateofjoining" name="dateofjoining" value="<?php echo $DOJ; ?>" maxlength="10" required placeholder="Date Of Joining" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input type="text" id="Previousexperience" value="<?php echo $PreviousYearsOfExp ; ?>" name="Previousexperience" maxlength="4" onkeypress="return isNumberKey(event)" placeholder="Previous Years of Experience" class="form-control">
|
<input type="text" id="Previousexperience" value="<?php echo $PreviousYearsOfExp ; ?>" name="Previousexperience" maxlength="4" onkeypress="return isNumberKey(event)" placeholder="Previous Years of Experience" class="form-control">
|
||||||
@ -661,7 +672,7 @@ function ValidatePassport()
|
|||||||
<input type="text" id="passportno" maxlength="8" onchange="ValidatePassport();" name="passportno" placeholder="Passport Number" class="form-control" value="<?php echo $PassportNo ; ?>">
|
<input type="text" id="passportno" maxlength="8" onchange="ValidatePassport();" name="passportno" placeholder="Passport Number" class="form-control" value="<?php echo $PassportNo ; ?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input id="ValidTill" name="ValidTill" maxlength="10" placeholder="ValidTill" class="form-control" value="<?php echo $Passport_Valid_till ; ?>">
|
<input id="ValidTill" name="ValidTill" maxlength="10" placeholder="ValidTill" class="form-control" value="<?php echo $DOPassport ; ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -734,7 +745,7 @@ function ValidatePassport()
|
|||||||
|
|
||||||
var id = $('#emailid').val();
|
var id = $('#emailid').val();
|
||||||
if(validateEmail())
|
if(validateEmail())
|
||||||
{
|
{
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{id:id},
|
data:{id:id},
|
||||||
|
|
||||||
@ -743,8 +754,9 @@ function ValidatePassport()
|
|||||||
success:function(data) {
|
success:function(data) {
|
||||||
if(data)
|
if(data)
|
||||||
{
|
{
|
||||||
alert( data+""+" Employee already exists in the database.");
|
alert( data+""+" Employee already exists in the database.Please Change the mail id");
|
||||||
window.location = 'Employeedetails/employeeListing';
|
return false;
|
||||||
|
//window.location = 'Employeedetails/employeeListing';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user