bankdetails added in company screen and modified in employee details
This commit is contained in:
parent
5cf33d7c88
commit
042c60b853
@ -39,10 +39,49 @@ class companycontroller extends BaseController
|
||||
$data['userRecords'] = $this->companydetailsmodel->companylisting();
|
||||
$data['payment'] = $this->companydetailsmodel->getPaymentTerms();
|
||||
$data['filenames']=$this->companydetailsmodel->filelist();
|
||||
$data['bankdetails']=$this->companydetailsmodel->getBankDetails();
|
||||
//$data['filetype']=$this->companydetailsmodel->getfilename();
|
||||
$data['filetype']=$this->companydetailsmodel->getfilename();
|
||||
$this->loadViews("companyview", $this->global,$data, NULL);
|
||||
}
|
||||
|
||||
/* this function used to add and update the bank details*/
|
||||
public function bankdtl()
|
||||
{
|
||||
|
||||
//$bankname = $this->input->post('id1');
|
||||
//$ifsccode = $this->input->post('id2');
|
||||
//$bankaddress = $this->input->post('id3');
|
||||
//$isactive = $this->input->post('');
|
||||
|
||||
$id = $this->input->post('id');
|
||||
$tablevalue = json_decode($id,true);
|
||||
|
||||
foreach($tablevalue as $tv)
|
||||
{
|
||||
$bankname = $tv['BankName'];
|
||||
$ifsccode = $tv['IFSC'];
|
||||
$bankaddress = $tv['BankAddress'];
|
||||
$bankstate = $tv['IsActive'];
|
||||
if($bankstate == 'Yes')
|
||||
{
|
||||
$isactive = 1;
|
||||
}
|
||||
else{
|
||||
$isactive = 0;
|
||||
}
|
||||
|
||||
$Bank = array('Bank_name'=>$bankname,'IFSC'=>$ifsccode,'Address'=>$bankaddress,'Is_Active'=>$isactive);
|
||||
$result = $this->companydetailsmodel->BankDetails($Bank);
|
||||
|
||||
}
|
||||
|
||||
//$Bank = array('Bank_name'=>$bankname,'IFSC'=>$ifsccode,'Address'=>$bankaddress);
|
||||
//$result = $this->companydetailsmodel->AddBankDetails($Bank);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function companyadd(){
|
||||
|
||||
@ -268,7 +307,6 @@ class companycontroller extends BaseController
|
||||
if($result > 0)
|
||||
{
|
||||
|
||||
// $this->session->set_flashdata('Success', $EmpId.'Employee Updated successfully!');
|
||||
|
||||
echo "<script>alert('You Have Successfully updated the company Record!');</script>";
|
||||
redirect('companyview','refresh');
|
||||
|
||||
@ -35,17 +35,23 @@ class employeedetails extends BaseController
|
||||
*/
|
||||
function employeeListing()
|
||||
{
|
||||
|
||||
if($this->isAdmin() == TRUE)
|
||||
{
|
||||
$this->loadThis();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$this->load->model('employeedetails_model');
|
||||
|
||||
|
||||
$data['userRecords'] = $this->employeedetails_model->employeeListing();
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Employee Listing';
|
||||
|
||||
$this->loadViews("employeeListing", $this->global, $data, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
Validation for Gender status Dropdown
|
||||
*/
|
||||
@ -196,7 +202,12 @@ class employeedetails extends BaseController
|
||||
|
||||
function AddNewEmployee()
|
||||
{
|
||||
|
||||
if($this->isAdmin() == TRUE)
|
||||
{
|
||||
$this->loadThis();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('ContactNumber', 'ContactNumber', 'trim|required|min_length[10]|max_length[10]');
|
||||
@ -336,7 +347,7 @@ echo "<script>alert('New Employee Created successfully!');</script>";redirect('e
|
||||
echo "<script>alert('Record Not Saved!');</script>";redirect('employeeListing','refresh');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -367,7 +378,12 @@ echo "<script>alert('Record Not Saved!');</script>";redirect('employeeListing','
|
||||
* This function is used to load the add new Employee form with dropdown values */
|
||||
function addemployee()
|
||||
{
|
||||
|
||||
if($this->isAdmin() == TRUE)
|
||||
{
|
||||
$this->loadThis();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->load->model('employeedetails_model');
|
||||
$GenderConfigID = 'C013';
|
||||
$MartialConfigID = 'C012';
|
||||
@ -377,6 +393,7 @@ echo "<script>alert('Record Not Saved!');</script>";redirect('employeeListing','
|
||||
|
||||
$data['Gender'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
|
||||
$data['Martial'] = $this->employeedetails_model->getConfigValue($MartialConfigID);
|
||||
$data['bankdetails']=$this->employeedetails_model->getBankDetails();
|
||||
$data['Qualification'] = $this->employeedetails_model->getConfigValue($QualificationConfigID);
|
||||
$data['Designation'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
|
||||
$data['BloodGroup'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
|
||||
@ -384,7 +401,7 @@ echo "<script>alert('Record Not Saved!');</script>";redirect('employeeListing','
|
||||
$data['Department'] = $this->employeedetails_model->getDepartment();
|
||||
$this->global['pageTitle'] = 'Siddharth : Add New Employee';
|
||||
$this->loadViews("addemployee", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This function is used to check whether the Employee is existing in the database or not */
|
||||
@ -502,7 +519,12 @@ echo "<script>alert('Record Not Saved!');</script>";redirect('employeeListing','
|
||||
|
||||
function ViewEmployee($EmpNO='')
|
||||
{
|
||||
|
||||
if($this->isAdmin() == TRUE)
|
||||
{
|
||||
$this->loadThis();
|
||||
}
|
||||
else
|
||||
{
|
||||
if($EmpNO == '')
|
||||
{
|
||||
$EmpID = $_GET['EmpID'];
|
||||
@ -524,14 +546,14 @@ echo "<script>alert('Record Not Saved!');</script>";redirect('employeeListing','
|
||||
$data['QualificationList'] = $this->employeedetails_model->getConfigValue($QualificationConfigID);
|
||||
$data['DesignationList'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
|
||||
$data['BloodGroupList'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
|
||||
|
||||
$data['DepartmentList'] = $this->employeedetails_model->getDepartment();
|
||||
$data['bankdetails']=$this->employeedetails_model->getBankDetails();
|
||||
$data['DepartmentList'] = $this->employeedetails_model->getDepartment();
|
||||
$data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID);
|
||||
$this->global['pageTitle'] = 'Siddharth : View Employee';
|
||||
|
||||
$this->loadViews("editEmployee", $this->global, $data, NULL);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/* To Check the email exists in the database or not for the employee*/
|
||||
function checkMailEmp()
|
||||
@ -555,7 +577,12 @@ echo "<script>alert('Record Not Saved!');</script>";redirect('employeeListing','
|
||||
/* To Update the employee details*/
|
||||
function UpdateEmployee()
|
||||
{
|
||||
|
||||
if($this->isAdmin() == TRUE)
|
||||
{
|
||||
$this->loadThis();
|
||||
}
|
||||
else
|
||||
{
|
||||
$EmpId = $this->input->post('employeeid');
|
||||
$this->load->library('form_validation');
|
||||
//$mail = $this->this->.post('emailid');
|
||||
@ -732,7 +759,7 @@ echo "<script>alert('Record Not Updated!');</script>"; redirect('employeeListin
|
||||
}
|
||||
|
||||
// redirect('employeeListing');
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -109,11 +109,57 @@ class companydetailsmodel extends CI_Model
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
//display the name for createdby @companydetails//
|
||||
|
||||
|
||||
// for display the bankdetails//
|
||||
function getBankDetails()
|
||||
{
|
||||
$this->db->select('*');
|
||||
$this->db->from('T_Bank_Details');
|
||||
$query = $this->db->get();
|
||||
$result = $query->result();
|
||||
return $result;
|
||||
}
|
||||
|
||||
// for add and update the bankdetails//
|
||||
function BankDetails($Bank)
|
||||
{
|
||||
$bankname=$Bank['Bank_name'];
|
||||
$bankifsc=$Bank['IFSC'];
|
||||
$count=0;
|
||||
|
||||
$this->db->select('count(*) as count');
|
||||
$this->db->from('T_Bank_Details');
|
||||
$this->db->where('Bank_name',$bankname);
|
||||
$this->db->where('IFSC',$bankifsc);
|
||||
|
||||
$isExits = $this->db->get();
|
||||
$res = $isExits->result_array();
|
||||
|
||||
|
||||
if(!empty($res))
|
||||
{
|
||||
|
||||
$count = $res[0]['count'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if($count == 0 )
|
||||
{
|
||||
$i = $this->db->insert('T_Bank_Details', $Bank);
|
||||
return $i;
|
||||
|
||||
}
|
||||
elseif($count == 1)
|
||||
{
|
||||
$this->db->where('Bank_name',$bankname);
|
||||
$this->db->where('IFSC',$bankifsc);
|
||||
$i = $this->db->update('T_Bank_Details',$Bank);
|
||||
return $i;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@ -186,6 +186,16 @@ function getEmployeeCount( )
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function getBankDetails()
|
||||
{
|
||||
$this->db->select('*');
|
||||
$this->db->from('T_Bank_Details');
|
||||
$query = $this->db->get();
|
||||
$result = $query->result();
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
function export_excel(){
|
||||
|
||||
$this->db->select(' det.*,Dep.DepartmentName as DepartmentName,det.firstname,emp1.firstname as UpdatedByName,emp1.firstname as CreatedByName');
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
// $("#gender").select2();
|
||||
// $("#bloodgroup").select2();
|
||||
// $("#MartialStatus").select2();
|
||||
// $("#desigination").select2();
|
||||
// $("#departmentname").select2();
|
||||
// $("#eduqualifaction").select2();
|
||||
$("#gender").select2();
|
||||
$("#bloodgroup").select2();
|
||||
$("#MartialStatus").select2();
|
||||
$("#desigination").select2();
|
||||
$("#departmentname").select2();
|
||||
$("#eduqualifaction").select2();
|
||||
$("#bankbranchname").select2();
|
||||
|
||||
document.getElementById('aadharno').addEventListener('input', function (e) {
|
||||
e.target.value = e.target.value.replace(/[^\d]/g, '').replace(/(.{4})/g, '$1 ').trim();
|
||||
@ -691,21 +692,38 @@ function validateESI() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<legend>Bank Details</legend>
|
||||
<legend>Bank Details</legend>
|
||||
<!-- Text input-->
|
||||
|
||||
<div class="col-md-12 pad">
|
||||
<div class="col-md-3"><span>Bank Name</span>
|
||||
<select type="text" id="bankbranchname" name="bankbranchname" class="form-control select2">
|
||||
<option value="">Select Bank Name</option>
|
||||
<?php
|
||||
if(!empty($bankdetails))
|
||||
{
|
||||
foreach ($bankdetails as $bank)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $bank->Bank_name ?>"><?php echo $bank->Bank_name ?></option>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<!-- <input type="text" id="bankbranchname" onkeypress="return alpha(event);" maxlength="200" name="bankbranchname" class="form-control"> -->
|
||||
</div>
|
||||
<div class="col-md-3"><span>Account Number</span>
|
||||
<input type="text" id="accountno" onkeypress="return isNumberKey(event)" maxlength="20" name="accountno" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3"><span>IFSC Code</span>
|
||||
<input type="text" id="ifsccode" onkeypress="return alpha(event);" style="text-transform: uppercase" name="ifsccode" maxlength="12" class="form-control">
|
||||
<input type="text" id="ifsccode" onkeypress="return alpha(event);" style="text-transform: uppercase" name="ifsccode" maxlength="12" class="form-control" readonly>
|
||||
</div>
|
||||
<div class="col-md-3"><span>Bank Branch Name</span>
|
||||
<input type="text" id="bankbranchname" onkeypress="return alpha(event);" maxlength="200" name="bankbranchname" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3"><span>Bank Address</span>
|
||||
<input type="text" id="bankaddress" maxlength="200" name="bankaddress" class="form-control">
|
||||
<div class="col-md-3"><span>Bank Address</span>
|
||||
<input type="text" id="bankaddress" maxlength="200" name="bankaddress" class="form-control" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1079,5 +1097,31 @@ function Validate()
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('#bankbranchname').change(function()
|
||||
{
|
||||
|
||||
var bank = $('#bankbranchname').val();
|
||||
|
||||
if (bank != '-1' )
|
||||
{
|
||||
|
||||
var y = <?php echo json_encode($bankdetails, JSON_PRETTY_PRINT) ?>;
|
||||
|
||||
$.each(y, function(idx, obj) {
|
||||
|
||||
if(bank == obj.Bank_name)
|
||||
{
|
||||
$("#ifsccode").val(obj.IFSC);
|
||||
$("#bankaddress").val(obj.Address);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@ -33,6 +33,10 @@ $ID='';
|
||||
$filedescription1='';
|
||||
$financialstart='';
|
||||
$financialend='';
|
||||
$bankname='';
|
||||
$bankifsc='';
|
||||
$bankaddress='';
|
||||
$bank_isactive = 1 ;
|
||||
//print_r($userRecords);die();
|
||||
if(!empty($userRecords))
|
||||
{
|
||||
@ -108,7 +112,29 @@ if(!empty($filenames))
|
||||
$createdDate=$uf->createdDate;
|
||||
}
|
||||
}
|
||||
|
||||
// if(!empty($bankdetails))
|
||||
// {
|
||||
// //print_r($bankdetails);
|
||||
// foreach ($bankdetails as $bd)
|
||||
// {
|
||||
// $bankname=$bd->Bank_name;
|
||||
// $bankifsc=$bd->IFSC;
|
||||
// $bankaddress=$bd->Address;
|
||||
// }
|
||||
// }
|
||||
|
||||
?>
|
||||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#PaymentTerms").select2();
|
||||
$("#filedescription").select2();
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function readURL(input,num) {
|
||||
|
||||
@ -603,8 +629,87 @@ function ValidateUA() {
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
|
||||
<!--bank details-->
|
||||
<legend>Bank Details</legend>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3"><span>Bank Name</span>
|
||||
<input type="text" id="BankName" name="BankName" maxlength="500" class="form-control" value="<?php echo $bankname;?>">
|
||||
</div>
|
||||
<div class="col-md-3"><span>IFSC</span>
|
||||
<input type="text" id="IFSC" name="IFSC" maxlength="500" class="form-control" value="<?php echo $bankifsc;?>">
|
||||
</div>
|
||||
<div class="col-md-3"><span>Bank Address</span>
|
||||
<input type="text" id="BankAddress" name="BankAddress" maxlength="500" class="form-control" value="<?php echo $bankaddress;?>">
|
||||
</div>
|
||||
<input type="hidden" id="BankState" name="BankState" class="form-control" value="Yes">
|
||||
<div class="col-md-3" style="padding: 19px;">
|
||||
<!-- <div class="col-md-6"><span>State</span><div>padding: 49px
|
||||
<input type="radio" name="Bankstate" id="Bankstate" value="1" checked> Active<br>
|
||||
<input type="radio" name="Bankstate" id="Bankstate" value="0">InActive<br></div>
|
||||
</div>
|
||||
<div class="col-md-6">-->
|
||||
<a class="btn btn-primary font Add" ID="Add"> <span class="bold">Add/Update Bank Detail</span></a>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="col-xs-12 pad" style="padding: 0px 30px 0px 30px;">
|
||||
<table id="banktable" class="table" border="1px black" style="font-size:12px;border-collapse: collapse;">
|
||||
|
||||
|
||||
<thead style="border: 1px solid black;">
|
||||
<tr>
|
||||
<th>BankName</th>
|
||||
<th>IFSC</th>
|
||||
<th>BankAddress</th>
|
||||
<th>IsActive</th>
|
||||
<!-- <th>Action</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- <tbody> -->
|
||||
<tbody id="databaseAppend">
|
||||
<?php if(!empty($bankdetails))
|
||||
{
|
||||
|
||||
foreach ($bankdetails as $uf)
|
||||
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td style="width: 15%;"><?php echo $uf->Bank_name ?></td>
|
||||
<td style="width: 10%;" contenteditable='true'><?php echo $uf->IFSC ?></td>
|
||||
<td style="width: 66%;" contenteditable='true'><?php echo $uf->Address ?></a></td>
|
||||
<td style="width: 10%;" contenteditable='true'>
|
||||
<?php if($uf->Is_Active == 1 )
|
||||
{
|
||||
echo 'Yes';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'No';
|
||||
}
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
<tbody id="addAppend">
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
@ -884,4 +989,112 @@ if ( $('#companywebsite').val().length < 1 )
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="addList">
|
||||
<tr id="<%=index%>">
|
||||
<td style="width: 15%;" align="left"><%=BankName%></td>
|
||||
<td style="width: 10%;" align="left" contenteditable="true"><%=IFSC%></td>
|
||||
<td style="width: 66%;" align="left" contenteditable="true"><%=BankAddress%></td>
|
||||
<td style="width: 10%;" align="left" contenteditable="true"><%=IsActive%></td>
|
||||
</tr>
|
||||
</script>
|
||||
<script>
|
||||
var index = '1';
|
||||
$('.Add').click(function(){
|
||||
//alert("addonclick");
|
||||
var temp = index;
|
||||
var bankname = $('#BankName').val();
|
||||
var ifsccode = $('#IFSC').val();
|
||||
var bankaddress = $('#BankAddress').val();
|
||||
var isactive = $('#BankState').val();
|
||||
// var isactive = <?php echo $bank_isactive ?>;
|
||||
//alert(isactive);
|
||||
|
||||
if(bankname != '' || ifsccode != '' || bankaddress != '' )
|
||||
{
|
||||
//alert('both insert and update operation evaluated');
|
||||
if(bankname == ''){
|
||||
|
||||
$("#BankName").focus();
|
||||
return false;
|
||||
|
||||
}
|
||||
else if (ifsccode == ''){
|
||||
|
||||
$('#IFSC').focus();
|
||||
return false;
|
||||
|
||||
}
|
||||
else if (bankaddress == ''){
|
||||
|
||||
$('#BankAddress').focus();
|
||||
return false;
|
||||
|
||||
}
|
||||
else{
|
||||
//alert(isactive);
|
||||
|
||||
|
||||
var template = jQuery("#addList").html();
|
||||
index = parseInt(index)+1;
|
||||
$('#addAppend').append(_.template(template,{index:temp,BankName:bankname,IFSC:ifsccode,BankAddress:bankaddress,IsActive:isactive}));
|
||||
|
||||
var tablevalue = $('#banktable').tableToJSON(); // Convert the table into a javascript object
|
||||
var value = JSON.stringify(tablevalue);
|
||||
|
||||
//if(bankname != '' || ifsccode != '' || bankaddress != '' )
|
||||
//{
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
|
||||
data:{id:value},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>companycontroller/bankdtl",
|
||||
|
||||
success:function(data){
|
||||
|
||||
$('#content').loader('hide');
|
||||
//alert(data);
|
||||
|
||||
|
||||
}//success function closed
|
||||
|
||||
});//ajax function closed
|
||||
|
||||
//}//if closed
|
||||
|
||||
}//else part closed
|
||||
$('#BankName').val('');
|
||||
$('#IFSC').val('');
|
||||
$('#BankAddress').val('');
|
||||
|
||||
}//if closed
|
||||
else {
|
||||
//alert('updated operation only evaluated');
|
||||
|
||||
var tablevalue = $('#banktable').tableToJSON(); // Convert the table into a javascript object
|
||||
var value = JSON.stringify(tablevalue);
|
||||
//alert(value);
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
|
||||
data:{id:value},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>companycontroller/bankdtl",
|
||||
|
||||
success:function(data){
|
||||
|
||||
|
||||
$('#content').loader('hide');
|
||||
// alert(data);
|
||||
|
||||
}//success function closed
|
||||
|
||||
});//ajax function closed
|
||||
|
||||
}//else closed
|
||||
});//add click function closed
|
||||
|
||||
|
||||
</script>
|
||||
@ -595,12 +595,13 @@ function ValidatePassport()
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
// $("#gender").select2();
|
||||
// $("#bloodgroup").select2();
|
||||
// $("#MartialStatus").select2();
|
||||
// $("#desigination").select2();
|
||||
// $("#departmentname").select2();
|
||||
// $("#eduqualifaction").select2();
|
||||
$("#gender").select2();
|
||||
$("#bloodgroup").select2();
|
||||
$("#MartialStatus").select2();
|
||||
$("#desigination").select2();
|
||||
$("#departmentname").select2();
|
||||
$("#eduqualifaction").select2();
|
||||
$("#bankbranchname").select2();
|
||||
document.getElementById('aadharno').addEventListener('input', function (e) {
|
||||
e.target.value = e.target.value.replace(/[^\d]/g, '').replace(/(.{4})/g, '$1 ').trim();
|
||||
});
|
||||
@ -733,12 +734,23 @@ function onlyAlphabets(evt) {
|
||||
{
|
||||
foreach ($GenderList as $rl)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||
<?php
|
||||
$rl1 = $rl->ConfigValue;
|
||||
if(trim($rl1) != trim($Gender))
|
||||
{
|
||||
if ($_POST['Gender'] == $rl1)
|
||||
{
|
||||
|
||||
echo "<option value=\"".$rl1."\" selected=\"selected\">". $rl->ConfigValue."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<option value=\"".$rl1."\">". $rl->ConfigValue ."</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -755,16 +767,26 @@ function onlyAlphabets(evt) {
|
||||
<select id="bloodgroup" name="bloodgroup" required class="form-control select2">
|
||||
<option value="<?php echo $BloodGroup ; ?>"><?php echo $BloodGroup ?></option>
|
||||
<?php
|
||||
if(!empty($BloodGroupList))
|
||||
{
|
||||
foreach ($BloodGroupList as $rl)
|
||||
if(!empty($BloodGroupList))
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||
<?php
|
||||
foreach ($BloodGroupList as $rl)
|
||||
{
|
||||
$rl1 = $rl->ConfigValue;
|
||||
if(trim($rl1) != trim($BloodGroup))
|
||||
{
|
||||
if ($_POST['BloodGroup'] == $rl1)
|
||||
{
|
||||
|
||||
echo "<option value=\"".$rl1."\" selected=\"selected\">". $rl->ConfigValue."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<option value=\"".$rl1."\">". $rl->ConfigValue ."</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@ -772,16 +794,26 @@ function onlyAlphabets(evt) {
|
||||
<select id="MartialStatus" name="MartialStatus" type="text" required placeholder="Marital status" class="form-control select2">
|
||||
<option value="<?php echo $MartialStatus?>"><?php echo $MartialStatus; ?></option>
|
||||
<?php
|
||||
if(!empty($MartialList))
|
||||
{
|
||||
foreach ($MartialList as $rl)
|
||||
if(!empty($MartialList))
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||
<?php
|
||||
foreach ($MartialList as $rl)
|
||||
{
|
||||
$rl1 = $rl->ConfigValue;
|
||||
if(trim($rl1) != trim($MartialStatus))
|
||||
{
|
||||
if ($_POST['MartialStatus'] == $rl1)
|
||||
{
|
||||
|
||||
echo "<option value=\"".$rl1."\" selected=\"selected\">". $rl->ConfigValue."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<option value=\"".$rl1."\">". $rl->ConfigValue ."</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -848,16 +880,26 @@ function onlyAlphabets(evt) {
|
||||
<select type="text" id="desigination" name="desigination" required class="form-control select2">
|
||||
<option value="<?php echo $Designation ; ?>"><?php echo $Designation; ?></option>
|
||||
<?php
|
||||
if(!empty($DesignationList))
|
||||
{
|
||||
foreach ($DesignationList as $rl)
|
||||
if(!empty($DesignationList))
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||
<?php
|
||||
foreach ($DesignationList as $rl)
|
||||
{
|
||||
$rl1 = $rl->ConfigValue;
|
||||
if(trim($rl1) != trim($Designation))
|
||||
{
|
||||
if ($_POST['Designation'] == $rl1)
|
||||
{
|
||||
|
||||
echo "<option value=\"".$rl1."\" selected=\"selected\">". $rl->ConfigValue."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<option value=\"".$rl1."\">". $rl->ConfigValue ."</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
@ -865,16 +907,26 @@ function onlyAlphabets(evt) {
|
||||
<select type="text" id="departmentname" name="departmentname" required class="form-control select2">
|
||||
<option value="<?php echo $Departmentcode; ?>"><?php echo $Departmentcode." - ".$DepartmentName ;?></option>
|
||||
<?php
|
||||
if(!empty($DepartmentList))
|
||||
{
|
||||
foreach ($DepartmentList as $rl)
|
||||
if(!empty($DepartmentList))
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->DEPCode ?>"><?php echo $rl->DEPCode." - " .$rl->DepartmentName ?></option>
|
||||
<?php
|
||||
foreach ($DepartmentList as $rl)
|
||||
{
|
||||
$rl1 = $rl->DEPCode;
|
||||
if(trim($rl1) != trim($Departmentcode))
|
||||
{
|
||||
if ($_POST['Departmentcode'] == $rl1)
|
||||
{
|
||||
|
||||
echo "<option value=\"".$rl1."\" selected=\"selected\">". $rl->DEPCode." - " .$rl->DepartmentName."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<option value=\"".$rl1."\">". $rl->DEPCode." - " .$rl->DepartmentName ."</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
@ -892,17 +944,28 @@ function onlyAlphabets(evt) {
|
||||
<div class="col-md-3"><span>Qualification</span><span class="badge">*</span>
|
||||
<select type="text" id="eduqualifaction" name="eduqualifaction" required class="form-control select2">
|
||||
<option value="<?php echo $Edu_Qualification; ?>"><?php echo $Edu_Qualification ; ?></option>
|
||||
<?php
|
||||
if(!empty($QualificationList))
|
||||
{
|
||||
foreach ($QualificationList as $rl)
|
||||
<?php
|
||||
if(!empty($QualificationList))
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||
<?php
|
||||
foreach ($QualificationList as $rl)
|
||||
{
|
||||
$rl1 = $rl->ConfigValue;
|
||||
if(trim($rl1) != trim($Edu_Qualification))
|
||||
{
|
||||
if ($_POST['Edu_Qualification'] == $rl1)
|
||||
{
|
||||
|
||||
echo "<option value=\"".$rl1."\" selected=\"selected\">". $rl->ConfigValue."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<option value=\"".$rl1."\">". $rl->ConfigValue ."</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
@ -923,20 +986,47 @@ function onlyAlphabets(evt) {
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-12 pad">
|
||||
<div class="col-md-3"><span>Bank Name</span>
|
||||
<!-- <input type="text" id="bankbranchname" onkeypress="return alpha(event);" maxlength="200" name="bankbranchname" placeholder="Bank Branch Name" class="form-control" value="<?php echo $BankBranchName ; ?>"> -->
|
||||
<select type="text" id="bankbranchname" name="bankbranchname" class="form-control select2">
|
||||
<option value="<?php echo $BankBranchName ; ?>"><?php echo $BankBranchName ; ?></option>
|
||||
|
||||
<?php
|
||||
if(!empty($bankdetails))
|
||||
{
|
||||
foreach ($bankdetails as $bank)
|
||||
{
|
||||
$bank1 = $bank->Bank_name;
|
||||
if(trim($bank1) != trim($BankBranchName))
|
||||
{
|
||||
if ($_POST['BankBranchName'] == $bank1)
|
||||
{
|
||||
|
||||
echo "<option value=\"".$bank1."\" selected=\"selected\">". $bank->Bank_name."</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<option value=\"".$bank1."\">". $bank->Bank_name ."</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3"><span>Account Number</span>
|
||||
<input type="text" id="accountno" maxlength="20" name="accountno" placeholder="Account Number" class="form-control" value="<?php echo $BankAccountNo; ?>" onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
<div class="col-md-3"><span>IFSC Code</span>
|
||||
<input type="text" id="ifsccode" onkeypress="return alpha(event);" style="text-transform: uppercase" name="ifsccode" placeholder="IFSC Code" maxlength="12" class="form-control" value="<?php echo $IFSCCode ; ?>">
|
||||
</div>
|
||||
<div class="col-md-3"><span>Bank Branch Name</span>
|
||||
<input type="text" id="bankbranchname" onkeypress="return alpha(event);" maxlength="200" name="bankbranchname" placeholder="Bank Branch Name" class="form-control" value="<?php echo $BankBranchName ; ?>">
|
||||
<input type="text" id="ifsccode" name="ifsccode" placeholder="IFSC Code" class="form-control" value="<?php echo $IFSCCode ; ?>" readonly>
|
||||
</div>
|
||||
<div class="col-md-3"><span>Bank Address</span>
|
||||
<input type="text" id="bankaddress" maxlength="200" name="bankaddress" placeholder="Bank Address" class="form-control" value="<?php echo $BankAddress ; ?>">
|
||||
<input type="text" id="bankaddress" name="bankaddress" placeholder="Bank Address" class="form-control" value="<?php echo $BankAddress ; ?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<legend>ID Proof</legend>
|
||||
<!-- Text input-->
|
||||
@ -1134,4 +1224,27 @@ function onlyAlphabets(evt) {
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('#bankbranchname').change(function()
|
||||
{
|
||||
|
||||
var bank = $('#bankbranchname').val();
|
||||
|
||||
if (bank != '-1' )
|
||||
{
|
||||
|
||||
var y = <?php echo json_encode($bankdetails, JSON_PRETTY_PRINT) ?>;
|
||||
|
||||
$.each(y, function(idx, obj) {
|
||||
|
||||
if(bank == obj.Bank_name)
|
||||
{
|
||||
$("#ifsccode").val(obj.IFSC);
|
||||
$("#bankaddress").val(obj.Address);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user