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 = '';
|
||||
$Remarks = '';
|
||||
$DepartmentName = '';
|
||||
$DOPassport = '';
|
||||
$Age = '';
|
||||
$DOB = '';
|
||||
$DOJ = '';
|
||||
if(!empty($EmpDetails))
|
||||
{
|
||||
foreach ($EmpDetails as $Emp)
|
||||
@ -47,12 +51,14 @@ if(!empty($EmpDetails))
|
||||
$from = new DateTime($DateofBirth);
|
||||
$to = new DateTime('today');
|
||||
$Age = $from->diff($to)->y;
|
||||
//echo $Age;
|
||||
$DOB = $from ->format('Y-m-d');
|
||||
$ContactNumber = $Emp->ContactNumber;
|
||||
$EmailId = $Emp->EmailId;
|
||||
$BloodGroup = $Emp->BloodGroup;
|
||||
$MartialStatus = $Emp->MartialStatus;
|
||||
$DateofJoining = $Emp->DateofJoining;
|
||||
$dtDOJ = new DateTime($DateofJoining);
|
||||
$DOJ = $dtDOJ ->format('Y-m-d');
|
||||
$PreviousYearsOfExp = $Emp->PreviousYearsOfExp;
|
||||
$Designation = $Emp->Designation;
|
||||
$Departmentcode = $Emp->Departmentcode;
|
||||
@ -71,6 +77,11 @@ if(!empty($EmpDetails))
|
||||
$BankAddress = $Emp->BankAddress;
|
||||
$PassportNo = $Emp->PassportNo;
|
||||
$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;
|
||||
$ProfilePic = $Emp->ProfilePic;
|
||||
$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>
|
||||
</div>
|
||||
<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 class="col-md-6 pad">
|
||||
@ -593,7 +604,7 @@ function ValidatePassport()
|
||||
|
||||
</div>
|
||||
<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 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">
|
||||
@ -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 ; ?>">
|
||||
</div>
|
||||
<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>
|
||||
|
||||
@ -734,7 +745,7 @@ function ValidatePassport()
|
||||
|
||||
var id = $('#emailid').val();
|
||||
if(validateEmail())
|
||||
{
|
||||
{
|
||||
$.ajax({
|
||||
data:{id:id},
|
||||
|
||||
@ -743,8 +754,9 @@ function ValidatePassport()
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
alert( data+""+" Employee already exists in the database.");
|
||||
window.location = 'Employeedetails/employeeListing';
|
||||
alert( data+""+" Employee already exists in the database.Please Change the mail id");
|
||||
return false;
|
||||
//window.location = 'Employeedetails/employeeListing';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user