MERGE_ with Gowtham code
This commit is contained in:
parent
a2ea33299a
commit
e285771a5d
@ -80,6 +80,7 @@ $routes->get('exportasset', 'Assetdetails::exportasset');
|
|||||||
// Employee Detail Routes
|
// Employee Detail Routes
|
||||||
$routes->add('addemployee', 'Employeedetails::addemployee');
|
$routes->add('addemployee', 'Employeedetails::addemployee');
|
||||||
$routes->post('addNewEmployee', 'Employeedetails::AddNewEmployee');
|
$routes->post('addNewEmployee', 'Employeedetails::AddNewEmployee');
|
||||||
|
$routes->post('deleteEmployeeFile', 'Employeedetails::deleteEmployeeFile');
|
||||||
$routes->get('employeeListing', 'Employeedetails::index');
|
$routes->get('employeeListing', 'Employeedetails::index');
|
||||||
$routes->get('employeedetails/ViewEmployee', 'Employeedetails::ViewEmployee');
|
$routes->get('employeedetails/ViewEmployee', 'Employeedetails::ViewEmployee');
|
||||||
$routes->post('employeedetails/UpdateEmployee', 'Employeedetails::UpdateEmployee');
|
$routes->post('employeedetails/UpdateEmployee', 'Employeedetails::UpdateEmployee');
|
||||||
|
|||||||
@ -15,7 +15,9 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
|||||||
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
||||||
|
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
||||||
|
use App\Models\EmpFilesModel;
|
||||||
|
use App\Models\AppConfigModel;
|
||||||
|
use App\Models\Emppaydate_model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module : Employee
|
* Module : Employee
|
||||||
@ -29,8 +31,12 @@ class Employeedetails extends BaseController
|
|||||||
{
|
{
|
||||||
protected $companydetailsmodel;
|
protected $companydetailsmodel;
|
||||||
protected $employeedetails_model;
|
protected $employeedetails_model;
|
||||||
|
protected $empFiles;
|
||||||
|
protected $appConfig;
|
||||||
|
protected $emppaydate_model;
|
||||||
protected $session;
|
protected $session;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is default constructor of the class
|
* This is default constructor of the class
|
||||||
*/
|
*/
|
||||||
@ -39,6 +45,9 @@ class Employeedetails extends BaseController
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->employeedetails_model = new Employeedetails_model();
|
$this->employeedetails_model = new Employeedetails_model();
|
||||||
$this->companydetailsmodel = new Companydetails_model();
|
$this->companydetailsmodel = new Companydetails_model();
|
||||||
|
$this->empFiles = new EmpFilesModel();
|
||||||
|
$this->appConfig = new AppConfigModel();
|
||||||
|
$this->emppaydate_model = new Emppaydate_model();
|
||||||
$this->session = session();
|
$this->session = session();
|
||||||
helper('form'); //$this->load->library('form_validation');
|
helper('form'); //$this->load->library('form_validation');
|
||||||
$this->isLoggedIn();
|
$this->isLoggedIn();
|
||||||
@ -199,6 +208,8 @@ class Employeedetails extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// $this->validator->setRules([
|
// $this->validator->setRules([
|
||||||
// 'ContactNumber'=> 'trim|required|min_length[10]|max_length[10]',
|
// 'ContactNumber'=> 'trim|required|min_length[10]|max_length[10]',
|
||||||
// 'emailid'=> 'trim|required|valid_email',
|
// 'emailid'=> 'trim|required|valid_email',
|
||||||
@ -236,7 +247,6 @@ class Employeedetails extends BaseController
|
|||||||
}
|
}
|
||||||
// $Profile = $this->request->getPost('photo');
|
// $Profile = $this->request->getPost('photo');
|
||||||
$FirstName = $this->request->getPost('FirstName');
|
$FirstName = $this->request->getPost('FirstName');
|
||||||
$LastName = $this->request->getPost('LastName');
|
|
||||||
$FatherName = $this->request->getPost('FatherName');
|
$FatherName = $this->request->getPost('FatherName');
|
||||||
$DateofBirth = $this->request->getPost('DateofBirth');
|
$DateofBirth = $this->request->getPost('DateofBirth');
|
||||||
$ContactNumber = $this->request->getPost('ContactNumber');
|
$ContactNumber = $this->request->getPost('ContactNumber');
|
||||||
@ -285,6 +295,10 @@ class Employeedetails extends BaseController
|
|||||||
$ESIno = $this->request->getPost('esino');
|
$ESIno = $this->request->getPost('esino');
|
||||||
$Nominee = $this->request->getPost('nomineename');
|
$Nominee = $this->request->getPost('nomineename');
|
||||||
$createdby = $this->session->get('userId');
|
$createdby = $this->session->get('userId');
|
||||||
|
$is_management_team = $this->request->getPost('is_management_team');
|
||||||
|
$esi_applicable = $this->request->getPost('esi_applicable');
|
||||||
|
$pf_applicable = $this->request->getPost('pf_applicable');
|
||||||
|
$work_location = $this->request->getPost('work_location');
|
||||||
|
|
||||||
if ($licenseExpiryDate != '') {
|
if ($licenseExpiryDate != '') {
|
||||||
//$License_ExpiryDate = get_date_format($licenseExpiryDate);
|
//$License_ExpiryDate = get_date_format($licenseExpiryDate);
|
||||||
@ -305,7 +319,7 @@ class Employeedetails extends BaseController
|
|||||||
|
|
||||||
//echo $DOB;
|
//echo $DOB;
|
||||||
$Employee = array(
|
$Employee = array(
|
||||||
'FirstName' => $FirstName, 'LastName' => $LastName, 'FatherName' => $FatherName,
|
'FirstName' => $FirstName, 'FatherName' => $FatherName,
|
||||||
'Gender' => $Gender, 'DateofBirth' => $DOB, 'ContactNumber' => $ContactNumber, 'EmailId' => $EmailId,
|
'Gender' => $Gender, 'DateofBirth' => $DOB, 'ContactNumber' => $ContactNumber, 'EmailId' => $EmailId,
|
||||||
'BloodGroup' => $BloodGroup, 'MartialStatus' => $MartialStatus, 'DateofJoining' => $DOJ,
|
'BloodGroup' => $BloodGroup, 'MartialStatus' => $MartialStatus, 'DateofJoining' => $DOJ,
|
||||||
'PreviousYearsOfExp' => $Previousexperience, 'Designation' => $desigination,
|
'PreviousYearsOfExp' => $Previousexperience, 'Designation' => $desigination,
|
||||||
@ -319,13 +333,56 @@ class Employeedetails extends BaseController
|
|||||||
'Reference_ContactNumber' => $referrercontno, 'Remarks' => $addinfo, 'CreatedBy' => $createdby,
|
'Reference_ContactNumber' => $referrercontno, 'Remarks' => $addinfo, 'CreatedBy' => $createdby,
|
||||||
'personalEmailId' => $comEmailId, 'DriverLicense' => $driverlicense,
|
'personalEmailId' => $comEmailId, 'DriverLicense' => $driverlicense,
|
||||||
'LicenseValidtill' => $License_ExpiryDate, 'VoterID' => $VoterID, 'PFNO' => $PFno, 'ESI' => $ESIno,
|
'LicenseValidtill' => $License_ExpiryDate, 'VoterID' => $VoterID, 'PFNO' => $PFno, 'ESI' => $ESIno,
|
||||||
'NomineeDetails' => $Nominee
|
'NomineeDetails' => $Nominee , 'is_management_team' => $is_management_team , 'esi_applicable'=>$esi_applicable,
|
||||||
|
'pf_applicable'=>$pf_applicable,'work_location'=>$work_location
|
||||||
);
|
);
|
||||||
|
|
||||||
//print_r($Employee);die();
|
//print_r($Employee);die();
|
||||||
$result = $this->employeedetails_model->addNewemployee($Employee);
|
$result = $this->employeedetails_model->addNewemployee($Employee);
|
||||||
|
|
||||||
if ($result > 0) {
|
if ($result) {
|
||||||
|
|
||||||
|
// Get the uploaded files
|
||||||
|
$files = $this->request->getFiles();
|
||||||
|
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
|
||||||
|
if(isset($files['emp_file']))
|
||||||
|
{
|
||||||
|
foreach ($files['emp_file'] as $index => $file) {
|
||||||
|
if ($file->isValid() && !$file->hasMoved()) {
|
||||||
|
// Move the file to the desired directory
|
||||||
|
$newName = $file->getRandomName();
|
||||||
|
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
|
||||||
|
$path = ROOTPATH . 'public/uploads/images/emp_files/'.$newName;
|
||||||
|
// Store the file information in the database
|
||||||
|
$this->empFiles->save([
|
||||||
|
'file_name' => $fileNames[$index], // User-entered file name
|
||||||
|
'emp_file' => $newName, // New file name
|
||||||
|
'emp_id' => $result,
|
||||||
|
'path' => $path
|
||||||
|
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$EmpID = $result;
|
||||||
|
$Total_Salary = $this->request->getPost('Total_salary');
|
||||||
|
$Basic_Pay = $this->request->getPost('Basic_Pay');
|
||||||
|
$HRA_Rate = $this->request->getPost('HRA_Rate');
|
||||||
|
$HRA_Amount = $this->request->getPost('HRA_Amount');
|
||||||
|
|
||||||
|
$Allowances = $this->request->getPost('Allowances');
|
||||||
|
$PF_Rate = $this->request->getPost('PF_Rate');
|
||||||
|
$ESI_Rate = $this->request->getPost('ESI_Rate');
|
||||||
|
$Food_Allowances = $this->request->getPost('Food_Allowances');
|
||||||
|
$Incentives = $this->request->getPost('Incentives');
|
||||||
|
$CreateBy = $this->session->get('userId');
|
||||||
|
|
||||||
|
$emppay = array('EmpID' => $EmpID, 'TotalSalary' => $Total_Salary, 'Basic_Pay' => $Basic_Pay, 'HRA_Rate' => $HRA_Rate, 'HRA_Amount' => $HRA_Amount, 'Allowances' => $Allowances, 'PF_Rate' => $PF_Rate, 'ESI_Rate' => $ESI_Rate, 'Food_Allowances' => $Food_Allowances, 'Incentives' => $Incentives, 'Created_By' => $CreateBy);
|
||||||
|
|
||||||
|
|
||||||
|
$this->emppaydate_model->addNewemppay($emppay);
|
||||||
|
|
||||||
// $this->session->set_flashdata('Success', 'New Employee created successfully!');
|
// $this->session->set_flashdata('Success', 'New Employee created successfully!');
|
||||||
$this->session->setFlashdata('success', 'New Employee created successfully!');
|
$this->session->setFlashdata('success', 'New Employee created successfully!');
|
||||||
@ -341,6 +398,16 @@ class Employeedetails extends BaseController
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function deleteEmployeeFile(){
|
||||||
|
$id = $this->request->getPost('id');
|
||||||
|
$update = $this->empFiles->set(['is_active' => 0])->where('id',$id)->update();
|
||||||
|
if($update){
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* This function is used to load the add new Employee form with dropdown values */
|
* This function is used to load the add new Employee form with dropdown values */
|
||||||
function addemployee()
|
function addemployee()
|
||||||
@ -352,6 +419,7 @@ class Employeedetails extends BaseController
|
|||||||
$QualificationConfigID = 'C014';
|
$QualificationConfigID = 'C014';
|
||||||
$DesignationConfigID = 'C010';
|
$DesignationConfigID = 'C010';
|
||||||
$BloodGroupConfigID = 'C011';
|
$BloodGroupConfigID = 'C011';
|
||||||
|
$LocationConfigID = 'C031';
|
||||||
|
|
||||||
$data['Gender'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
|
$data['Gender'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
|
||||||
$data['Martial'] = $this->employeedetails_model->getConfigValue($MartialConfigID);
|
$data['Martial'] = $this->employeedetails_model->getConfigValue($MartialConfigID);
|
||||||
@ -359,8 +427,11 @@ class Employeedetails extends BaseController
|
|||||||
$data['Qualification'] = $this->employeedetails_model->getConfigValue($QualificationConfigID);
|
$data['Qualification'] = $this->employeedetails_model->getConfigValue($QualificationConfigID);
|
||||||
$data['Designation'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
|
$data['Designation'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
|
||||||
$data['BloodGroup'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
|
$data['BloodGroup'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
|
||||||
|
$data['Location'] = $this->employeedetails_model->getConfigValue($LocationConfigID);
|
||||||
$data['Department'] = $this->employeedetails_model->getDepartment();
|
$data['Department'] = $this->employeedetails_model->getDepartment();
|
||||||
|
$data['hra_rate'] = $this->appConfig->where('key',1)->get()->getRow()->value;
|
||||||
|
$data['pf_rate'] = $this->appConfig->where('key',2)->get()->getRow()->value;
|
||||||
|
$data['esi_rate'] = $this->appConfig->where('key',3)->get()->getRow()->value;
|
||||||
$this->global['pageTitle'] = 'Add New Employee';
|
$this->global['pageTitle'] = 'Add New Employee';
|
||||||
|
|
||||||
// if($this->role == ROLE_ADMIN || $this->DEPCode == HR)
|
// if($this->role == ROLE_ADMIN || $this->DEPCode == HR)
|
||||||
@ -494,6 +565,7 @@ class Employeedetails extends BaseController
|
|||||||
$QualificationConfigID = 'C014';
|
$QualificationConfigID = 'C014';
|
||||||
$DesignationConfigID = 'C010';
|
$DesignationConfigID = 'C010';
|
||||||
$BloodGroupConfigID = 'C011';
|
$BloodGroupConfigID = 'C011';
|
||||||
|
$LocationConfigID = 'C031';
|
||||||
|
|
||||||
//print_r('hai');
|
//print_r('hai');
|
||||||
$data['GenderList'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
|
$data['GenderList'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
|
||||||
@ -502,8 +574,12 @@ class Employeedetails extends BaseController
|
|||||||
$data['DesignationList'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
|
$data['DesignationList'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
|
||||||
$data['BloodGroupList'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
|
$data['BloodGroupList'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
|
||||||
$data['bankdetails'] = $this->employeedetails_model->getBankDetails();
|
$data['bankdetails'] = $this->employeedetails_model->getBankDetails();
|
||||||
|
$data['Location'] = $this->employeedetails_model->getConfigValue($LocationConfigID);
|
||||||
$data['DepartmentList'] = $this->employeedetails_model->getDepartment();
|
$data['DepartmentList'] = $this->employeedetails_model->getDepartment();
|
||||||
$data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID);
|
$data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID);
|
||||||
|
$data['emp_data'] = $this->empFiles->where('emp_id',$EmpID)->where('is_active',1)->findAll();
|
||||||
|
$data['empPay'] = $this->emppaydate_model->getEmpPayData($EmpID);
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'View Employee';
|
$this->global['pageTitle'] = 'View Employee';
|
||||||
|
|
||||||
$this->loadViews("editEmployee", $this->global, $data, NULL);
|
$this->loadViews("editEmployee", $this->global, $data, NULL);
|
||||||
@ -649,6 +725,10 @@ class Employeedetails extends BaseController
|
|||||||
$esino = $this->request->getPost('esino');
|
$esino = $this->request->getPost('esino');
|
||||||
$Nominee = $this->request->getPost('nomineename');
|
$Nominee = $this->request->getPost('nomineename');
|
||||||
$chked = $this->request->getPost('isactive');
|
$chked = $this->request->getPost('isactive');
|
||||||
|
$is_management_team = $this->request->getPost('is_management_team');
|
||||||
|
$esi_applicable = $this->request->getPost('esi_applicable');
|
||||||
|
$pf_applicable = $this->request->getPost('pf_applicable');
|
||||||
|
$work_location = $this->request->getPost('work_location');
|
||||||
// echo 'chkvalue'. $chked ;
|
// echo 'chkvalue'. $chked ;
|
||||||
if ($chked != '') {
|
if ($chked != '') {
|
||||||
$IsActive = '1';
|
$IsActive = '1';
|
||||||
@ -688,12 +768,54 @@ class Employeedetails extends BaseController
|
|||||||
'IsActive' => $IsActive, 'ProfilePic' => $Picture, 'Reference_Name' => $referredby,
|
'IsActive' => $IsActive, 'ProfilePic' => $Picture, 'Reference_Name' => $referredby,
|
||||||
'Reference_ContactNumber' => $referrercontno, 'Remarks' => $addinfo, 'UpdatedBY' => $UpdatedBY,
|
'Reference_ContactNumber' => $referrercontno, 'Remarks' => $addinfo, 'UpdatedBY' => $UpdatedBY,
|
||||||
'personalEmailId' => $comEmailId, 'DriverLicense' => $driverlicense, 'LicenseValidtill' => $License_ExpiryDate,
|
'personalEmailId' => $comEmailId, 'DriverLicense' => $driverlicense, 'LicenseValidtill' => $License_ExpiryDate,
|
||||||
'VoterID' => $VoterID, 'PFNO' => $pfno, 'ESI' => $esino, 'NomineeDetails' => $Nominee
|
'VoterID' => $VoterID, 'PFNO' => $pfno, 'ESI' => $esino, 'NomineeDetails' => $Nominee,'is_management_team' => $is_management_team ,
|
||||||
|
'esi_applicable'=>$esi_applicable,'pf_applicable'=>$pf_applicable,'work_location'=>$work_location
|
||||||
);
|
);
|
||||||
//print_r($Employee);die();
|
//print_r($Employee);die();
|
||||||
$result = $this->employeedetails_model->UpdateEmployee($Employee, $EmpId);
|
$result = $this->employeedetails_model->UpdateEmployee($Employee, $EmpId);
|
||||||
|
|
||||||
if ($result > 0) {
|
// Get the uploaded files
|
||||||
|
$files = $this->request->getFiles();
|
||||||
|
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
|
||||||
|
if(isset($files['emp_file']))
|
||||||
|
{
|
||||||
|
foreach ($files['emp_file'] as $index => $file) {
|
||||||
|
if ($file->isValid() && !$file->hasMoved()) {
|
||||||
|
// Move the file to the desired directory
|
||||||
|
$newName = $file->getRandomName();
|
||||||
|
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
|
||||||
|
$path = ROOTPATH . 'public/uploads/images/emp_files/'.$newName;
|
||||||
|
// Store the file information in the database
|
||||||
|
$this->empFiles->save([
|
||||||
|
'file_name' => $fileNames[$index], // User-entered file name
|
||||||
|
'emp_file' => $newName, // New file name
|
||||||
|
'emp_id' => $EmpId,
|
||||||
|
'path' => $path
|
||||||
|
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$Total_Salary = $this->request->getPost('Total_salary');
|
||||||
|
$Basic_Pay = $this->request->getPost('Basic_Pay');
|
||||||
|
$HRA_Rate = $this->request->getPost('HRA_Rate');
|
||||||
|
$HRA_Amount = $this->request->getPost('HRA_Amount');
|
||||||
|
$Allowances = $this->request->getPost('Allowances');
|
||||||
|
$PF_Rate = $this->request->getPost('PF_Rate');
|
||||||
|
$ESI_Rate = $this->request->getPost('ESI_Rate');
|
||||||
|
$Food_Allowances = $this->request->getPost('Food_Allowances');
|
||||||
|
$Incentives = $this->request->getPost('Incentives');
|
||||||
|
$CreateBy = $this->session->get('userId');
|
||||||
|
$emppay = array('EmpID' => $EmpId, 'TotalSalary' => $Total_Salary, 'Basic_Pay' => $Basic_Pay, 'HRA_Rate' => $HRA_Rate, 'HRA_Amount' => $HRA_Amount, 'Allowances' => $Allowances, 'PF_Rate' => $PF_Rate, 'ESI_Rate' => $ESI_Rate, 'Food_Allowances' => $Food_Allowances, 'Incentives' => $Incentives, 'Created_By' => $CreateBy);
|
||||||
|
|
||||||
|
|
||||||
|
$empPayUpdate = $this->emppaydate_model->editemppay($emppay);
|
||||||
|
|
||||||
|
if ($result + $empPayUpdate > 0) {
|
||||||
|
|
||||||
|
|
||||||
// $this->session->set_flashdata('Success', $EmpId.'Employee Updated successfully!');
|
// $this->session->set_flashdata('Success', $EmpId.'Employee Updated successfully!');
|
||||||
$this->session->setFlashdata('success', 'You Have Successfully updated the Employee Record!');
|
$this->session->setFlashdata('success', 'You Have Successfully updated the Employee Record!');
|
||||||
|
|||||||
23
app/Models/AppConfigModel.php
Normal file
23
app/Models/AppConfigModel.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
|
|
||||||
|
class AppConfigModel extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'app_config';
|
||||||
|
protected $primaryKey = 'id';
|
||||||
|
protected $allowedFields = [
|
||||||
|
"id",
|
||||||
|
"key",
|
||||||
|
"config",
|
||||||
|
"value",
|
||||||
|
"is_active",
|
||||||
|
"createdDate",
|
||||||
|
"uploadedby",
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
24
app/Models/EmpFilesModel.php
Normal file
24
app/Models/EmpFilesModel.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
|
|
||||||
|
class EmpFilesModel extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'emp_file';
|
||||||
|
protected $primaryKey = 'id';
|
||||||
|
protected $allowedFields = [
|
||||||
|
"id",
|
||||||
|
"emp_file",
|
||||||
|
"file_name",
|
||||||
|
"emp_id",
|
||||||
|
"path",
|
||||||
|
"is_active",
|
||||||
|
"createdDate",
|
||||||
|
"uploadedby",
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
@ -19,7 +19,7 @@ class Employeedetails_model extends Model
|
|||||||
$builder = $this->db->table('t_employee_details Emp')
|
$builder = $this->db->table('t_employee_details Emp')
|
||||||
->select(' Emp.*,Dep.DepartmentName as DepartmentName')
|
->select(' Emp.*,Dep.DepartmentName as DepartmentName')
|
||||||
->join('t_departmentdetails Dep', 'Emp.Departmentcode = Dep.DEPCode', 'left')
|
->join('t_departmentdetails Dep', 'Emp.Departmentcode = Dep.DEPCode', 'left')
|
||||||
->orderBy("Emp.EmpID", "asc");
|
->orderBy("Emp.EmpID", "desc");
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
@ -79,9 +79,18 @@ class Employeedetails_model extends Model
|
|||||||
$builder = $this->db->table('t_employee_details');
|
$builder = $this->db->table('t_employee_details');
|
||||||
$builder->insert($Employee);
|
$builder->insert($Employee);
|
||||||
|
|
||||||
$EmpID = $this->db->affectedRows();
|
if ($this->db->affectedRows() > 0) {
|
||||||
|
$builder->select('*');
|
||||||
|
$builder->orderBy('created_date', 'DESC');
|
||||||
|
$builder->limit(1);
|
||||||
|
|
||||||
return $EmpID;
|
$query = $builder->get();
|
||||||
|
$result = $query->getRowArray();
|
||||||
|
return $result['EmpID'];
|
||||||
|
} else {
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -78,15 +78,25 @@ class Emppaydate_model extends Model
|
|||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getEmpPayData($EmpID)
|
||||||
|
{
|
||||||
|
$sql = 'select t_emp_pay_data.Pay_Data_ID,t_emp_pay_data.EmpID,t_emp_pay_data.Basic_Pay,t_emp_pay_data.HRA_Rate,t_emp_pay_data.Allowances,t_emp_pay_data.Food_Allowances,t_emp_pay_data.Incentives,t_emp_pay_data.PF_Rate,t_emp_pay_data.ESI_Rate,t_emp_pay_data.HRA_Amount,t_emp_pay_data.TotalSalary from t_emp_pay_data
|
||||||
|
|
||||||
|
where t_emp_pay_data.EmpID = ?;';
|
||||||
|
$query = $this->db->query($sql,array($EmpID));
|
||||||
|
|
||||||
|
return $query->getRow();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function editemppay($emppaydatas)
|
function editemppay($emppaydatas)
|
||||||
{
|
{
|
||||||
|
|
||||||
$paydateid=$emppaydatas['Pay_Data_ID'];
|
$EmpID=$emppaydatas['EmpID'];
|
||||||
//echo $paydateid;
|
//echo $paydateid;
|
||||||
//print_r($emppaydatas);die();
|
//print_r($emppaydatas);die();
|
||||||
$this->db->table('t_emp_pay_data')
|
$this->db->table('t_emp_pay_data')
|
||||||
->where('Pay_Data_ID', $paydateid)
|
->where('EmpID', $EmpID)
|
||||||
->update($emppaydatas);
|
->update($emppaydatas);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|||||||
@ -1,12 +1,68 @@
|
|||||||
|
<style>
|
||||||
|
.content {
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.switch {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: 60px;
|
||||||
|
height: 31px;
|
||||||
|
vertical-align: sub;
|
||||||
|
}
|
||||||
|
|
||||||
|
.switch input {
|
||||||
|
opacity: 0;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider {
|
||||||
|
position: absolute;
|
||||||
|
cursor: pointer;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: #ccc;
|
||||||
|
transition: .4s;
|
||||||
|
border-radius: 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider:before {
|
||||||
|
position: absolute;
|
||||||
|
content: "";
|
||||||
|
height: 23px;
|
||||||
|
width: 23px;
|
||||||
|
border-radius: 50%;
|
||||||
|
left: 4px;
|
||||||
|
bottom: 4px;
|
||||||
|
background-color: white;
|
||||||
|
transition: .4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:checked+.slider {
|
||||||
|
background-color: #2196F3;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:checked+.slider:before {
|
||||||
|
transform: translateX(26px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-text {
|
||||||
|
margin-left: 70px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#gender").select2();
|
$("#gender").select2();
|
||||||
$("#bloodgroup").select2();
|
$("#bloodgroup").select2();
|
||||||
$("#MartialStatus").select2();
|
$("#MartialStatus").select2();
|
||||||
$("#desigination").select2();
|
$("#desigination").select2();
|
||||||
|
$("#work_location").select2();
|
||||||
$("#departmentname").select2();
|
$("#departmentname").select2();
|
||||||
$("#eduqualifaction").select2();
|
$("#eduqualifaction").select2();
|
||||||
$("#bankbranchname").select2();
|
|
||||||
|
|
||||||
document.getElementById('aadharno').addEventListener('input', function(e) {
|
document.getElementById('aadharno').addEventListener('input', function(e) {
|
||||||
e.target.value = e.target.value.replace(/[^\d]/g, '').replace(/(.{4})/g, '$1 ').trim();
|
e.target.value = e.target.value.replace(/[^\d]/g, '').replace(/(.{4})/g, '$1 ').trim();
|
||||||
@ -404,7 +460,9 @@ legend {
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-1"></div>
|
<div class="col-md-1"></div>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<b><h3>Add Employee</h3></b>
|
<b>
|
||||||
|
<h3>Add Employee</h3>
|
||||||
|
</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5" style="margin-top: 20px;margin-bottom: 10px;text-align:right;">
|
<div class="col-md-5" style="margin-top: 20px;margin-bottom: 10px;text-align:right;">
|
||||||
<a href="<?php echo base_url() ?>employeeListing" class="btn btn-cancel" value="Back">Back</a>
|
<a href="<?php echo base_url() ?>employeeListing" class="btn btn-cancel" value="Back">Back</a>
|
||||||
@ -432,7 +490,7 @@ legend {
|
|||||||
<form class="form-horizontal" role="form">
|
<form class="form-horizontal" role="form">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
||||||
<!-- Form Name -->
|
|
||||||
<legend>Personal Information</legend>
|
<legend>Personal Information</legend>
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -470,10 +528,6 @@ legend {
|
|||||||
onkeypress="return onlyAlphabets(event);" id="FatherName"
|
onkeypress="return onlyAlphabets(event);" id="FatherName"
|
||||||
maxlength="200" class="form-control" required>
|
maxlength="200" class="form-control" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="col-md-6 pad"><span>Last Name</span><span class="badge">*</span>
|
|
||||||
<input type="text" name="LastName" onkeypress="return onlyAlphabets(event);" maxlength="100" id="LastName" class="form-control" required>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
@ -586,10 +640,9 @@ legend {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Address Section -->
|
|
||||||
<!-- Form Name -->
|
|
||||||
<legend>Address Details</legend>
|
<legend>Address Details</legend>
|
||||||
<!-- Text input-->
|
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-12"><span>Current Address</span><span
|
<div class="col-md-12"><span>Current Address</span><span
|
||||||
class="badge">*</span>
|
class="badge">*</span>
|
||||||
@ -603,7 +656,7 @@ legend {
|
|||||||
onclick="CheckClick"> Current address same as permanent address
|
onclick="CheckClick"> Current address same as permanent address
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Text input-->
|
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-12"><span>Permanent Address</span><span
|
<div class="col-md-12"><span>Permanent Address</span><span
|
||||||
class="badge">*</span>
|
class="badge">*</span>
|
||||||
@ -612,14 +665,13 @@ legend {
|
|||||||
class="form-control">
|
class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Text input-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Emergency Contact Section -->
|
|
||||||
<!-- Form Name -->
|
|
||||||
<legend>Emergency Contact Information</legend>
|
|
||||||
<!-- Text input-->
|
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-6"><span>Emergency Contact Name</span>
|
<div class="col-md-6"><span>Emergency Contact Name</span>
|
||||||
<input type="text" id="emergencycontactname"
|
<input type="text" id="emergencycontactname"
|
||||||
@ -637,10 +689,9 @@ legend {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- profile Section -->
|
|
||||||
<!-- Form Name -->
|
|
||||||
<legend>Work Profile</legend>
|
<legend>Work Profile</legend>
|
||||||
<!-- Text input-->
|
|
||||||
|
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-3"><span>Designation</span><span class="badge">*</span>
|
<div class="col-md-3"><span>Designation</span><span class="badge">*</span>
|
||||||
@ -728,53 +779,266 @@ legend {
|
|||||||
onchange=" return getValidReferNumber();" maxlength="10"
|
onchange=" return getValidReferNumber();" maxlength="10"
|
||||||
onkeypress="return isNumberKey(event)" class="form-control">
|
onkeypress="return isNumberKey(event)" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<legend>Bank Details</legend>
|
|
||||||
<!-- Text input-->
|
|
||||||
|
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-3"><span>Bank Name</span><span class="badge">*</span>
|
|
||||||
<select type="text" id="bankbranchname" name="bankbranchname"
|
|
||||||
class="form-control select2" required>
|
<div class="col-md-3"><span>Work Location</span><span class="badge">*</span>
|
||||||
<option value="">Select Bank Name</option>
|
<select type="text" id="work_location" name="work_location" required
|
||||||
|
class="form-control select2">
|
||||||
|
<option value="">Select Work Location</option>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($bankdetails))
|
if(!empty($Location))
|
||||||
{
|
{
|
||||||
foreach ($bankdetails as $bank)
|
foreach ($Location as $rl)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $bank->Bank_name ?>">
|
<option value="<?php echo $rl->ConfigValue ?>">
|
||||||
<?php echo $bank->Bank_name ?></option>
|
<?php echo $rl->ConfigValue ?></option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- <input type="text" id="bankbranchname" onkeypress="return alpha(event);" maxlength="200" name="bankbranchname" class="form-control"> -->
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span
|
||||||
|
style="display: inline-block; vertical-align: bottom; margin-right: 10px; margin-bottom: 10px;">Management
|
||||||
|
Team</span>
|
||||||
|
<label class="switch">
|
||||||
|
<input type="checkbox" name="is_management_team" value="0"
|
||||||
|
onchange="updateSwitchValue(this)" />
|
||||||
|
<span class="slider"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<legend>Bank Details</legend>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12 pad">
|
||||||
|
<div class="col-md-3"><span>Bank Name</span><span class="badge">*</span>
|
||||||
|
<input type="text" id="bankbranchname" name="bankbranchname"
|
||||||
|
class="form-control" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"><span>Account Number</span><span
|
<div class="col-md-3"><span>Account Number</span><span
|
||||||
class="badge">*</span>
|
class="badge">*</span>
|
||||||
<input type="text" id="accountno" onkeypress="return isNumberKey(event)"
|
<input type="text" id="accountno" onkeypress="return isNumberKey(event)"
|
||||||
maxlength="20" name="accountno" class="form-control" required>
|
maxlength="20" name="accountno" class="form-control" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"><span>IFSC Code</span>
|
<div class="col-md-3"><span>IFSC Code</span></span><span
|
||||||
|
class="badge">*</span>
|
||||||
<input type="text" id="ifsccode" name="ifsccode" placeholder="IFSC Code"
|
<input type="text" id="ifsccode" name="ifsccode" placeholder="IFSC Code"
|
||||||
class="form-control" onkeypress="return alpha(event);"
|
class="form-control" onkeypress="return alpha(event);"
|
||||||
style="text-transform: uppercase" readonly>
|
style="text-transform: uppercase" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"><span>Bank Address</span>
|
<div class="col-md-3"><span>Bank Address</span>
|
||||||
<input type="text" id="bankaddress" name="bankaddress"
|
<input type="text" id="bankaddress" name="bankaddress"
|
||||||
placeholder="Bank Address" maxlength="200" class="form-control"
|
placeholder="Bank Address" maxlength="200" class="form-control">
|
||||||
readonly>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<legend>Employee benefits</legend>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12 pad">
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span for="Basic_Pay">Total Salary</span>
|
||||||
|
<font color="Red">*</font>
|
||||||
|
|
||||||
|
<input type="text" name="Total_salary" id="Total_salary"
|
||||||
|
value="<?php echo set_value('Total_salary'); ?>"
|
||||||
|
pattern="([0-9]{1,8}([.][0-9]{1,2})?)"
|
||||||
|
class="form-control num" style="text-transform:uppercase;"
|
||||||
|
title="Enter Valid Total salary Amount, Minimum Four Digit Positive Number"
|
||||||
|
onchange="calculalteHRA();" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span for="Basic_Pay">Basic Pay</span>
|
||||||
|
<font color="Red">*</font>
|
||||||
|
<input type="text" name="Basic_Pay" id="Basic_Pay"
|
||||||
|
value="<?php echo set_value('Basic_Pay'); ?>"
|
||||||
|
pattern="[0-9]{4,6}" class="form-control num"
|
||||||
|
style="text-transform:uppercase;"
|
||||||
|
title="Enter Valid Basic Pay Amount, Minimum Four Digit Positive Number"
|
||||||
|
readonly />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span for="HRA_Rate">HRA Rate(%)</span>
|
||||||
|
<font color="Red">*</font>
|
||||||
|
|
||||||
|
<input type="text" name="HRA_Rate" id="HRA_Rate"
|
||||||
|
value="<?= $hra_rate; ?>" class="form-control num"
|
||||||
|
style="text-transform:uppercase;"
|
||||||
|
pattern="([0-9]{1,2}([.][0-9]{1,2})?)"
|
||||||
|
title="Enter the Valid HRA Rate, Minimum 1 digit, Maximum 2 digit"
|
||||||
|
readonly />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span for="HRA_Rate">HRA Amount</span>
|
||||||
|
<font color="Red">*</font>
|
||||||
|
<input type="text" name="HRA_Amount" id="HRA_Amount"
|
||||||
|
class="form-control num" style="text-transform:uppercase;"
|
||||||
|
readonly />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span for="Allowances">Allowances</span>
|
||||||
|
<input type="text" name="Allowances"
|
||||||
|
value="<?php echo set_value('Allowances'); ?>"
|
||||||
|
class="form-control num" style="text-transform:uppercase;"
|
||||||
|
pattern="([0-9]{1,5}([.][0-9]{1,2})?)"
|
||||||
|
title="Enter the Valid Allowances, Minimum 1 digit, Maximum 5 digits" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span for="Food_Allowances">Food Allowances(Per Day)</span>
|
||||||
|
<input type="text" name="Food_Allowances"
|
||||||
|
value="<?php echo set_value('Food_Allowances'); ?>"
|
||||||
|
class="form-control num"
|
||||||
|
pattern="([0-9]{1,3}([.][0-9]{1,2})?)"
|
||||||
|
onfocusout="validateFood();"
|
||||||
|
title="Enter the Valid Food Allowances, Minimum 1 Digit, Maximum 3 Digits" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span for="Incentives">Incentives</span>
|
||||||
|
<input type="text" name="Incentives"
|
||||||
|
value="<?php echo set_value('Incentives'); ?>"
|
||||||
|
class="form-control num" style="text-transform:uppercase;"
|
||||||
|
pattern="([0-9]{1,5}([.][0-9]{1,2})?)"
|
||||||
|
title="Enter the Valid Allowances, Minimum 1 digit, Maximum 5 digits" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span
|
||||||
|
style="display: inline-block; vertical-align: bottom; margin-right: 10px; margin-bottom: 10px;">ESI
|
||||||
|
Applicable</span>
|
||||||
|
<label class="switch">
|
||||||
|
<input type="checkbox" name="esi_applicable" value="0"
|
||||||
|
onchange="updateSwitchValue(this)" />
|
||||||
|
<span class="slider"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group"><span>ESI Number</span>
|
||||||
|
<input type="text" id="esino" name="esino" maxlength="10"
|
||||||
|
onchange="validateESI();" class="form-control"
|
||||||
|
title=" 10 digit number"
|
||||||
|
onkeypress="return isNumberKey(event)">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span for="ESI_Rate">ESI Rate(%)</span>
|
||||||
|
<font color="Red">*</font>
|
||||||
|
<input type="text" name="ESI_Rate" value="<?= $esi_rate; ?>"
|
||||||
|
class="form-control num" style="text-transform:uppercase;"
|
||||||
|
pattern="([0-9]{1,2}([.][0-9]{1,2})?)"
|
||||||
|
title="Enter the Valid ESI Rate, Minimum 1 digit, Maximum 2 digits"
|
||||||
|
readonly />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span
|
||||||
|
style="display: inline-block; vertical-align: bottom; margin-right: 10px; margin-bottom: 10px;">PF
|
||||||
|
Applicable</span>
|
||||||
|
<label class="switch">
|
||||||
|
<input type="checkbox" name="pf_applicable" value="0"
|
||||||
|
onchange="updateSwitchValue(this)" />
|
||||||
|
<span class="slider"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group"><span>PF Number</span>
|
||||||
|
<input type="text" id="pfno" name="pfno" maxlength="22"
|
||||||
|
onchange="validatePF();" class="form-control"
|
||||||
|
style="text-transform:uppercase"
|
||||||
|
pattern="([a-zA-Z]){5}([0-9]){17}"
|
||||||
|
title=" 5 Character and 17 Digit number (ex:ABCDE12345678901234567)"
|
||||||
|
onkeypress="return alpha(event);">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span for="PF_Rate">PF Rate(%)</span>
|
||||||
|
<font color="Red">*</font>
|
||||||
|
<input type="text" name="PF_Rate" value="<?= $pf_rate; ?>"
|
||||||
|
class="form-control num" style="text-transform:uppercase;"
|
||||||
|
pattern="([0-9]{1,2}([.][0-9]{1,2})?)"
|
||||||
|
title="Enter the valid PF Rate, Minimum 1 digit, Maximum 2 digits"
|
||||||
|
readonly />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<legend>ID Proof</legend>
|
<legend>ID Proof</legend>
|
||||||
<!-- Text input-->
|
|
||||||
|
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-3"><span>Aadhar Number</span> <span
|
<div class="col-md-3"><span>Aadhar Number</span> <span
|
||||||
@ -824,39 +1088,43 @@ legend {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<legend>Employee benefits</legend>
|
|
||||||
<!-- Text input-->
|
|
||||||
|
|
||||||
<div class="col-md-12 pad">
|
|
||||||
<div class="col-md-6"><span>PF Number</span>
|
|
||||||
<input type="text" id="pfno" name="pfno" maxlength="22"
|
|
||||||
onchange="validatePF();" class="form-control"
|
|
||||||
style="text-transform:uppercase" pattern="([a-zA-Z]){5}([0-9]){17}"
|
|
||||||
title=" 5 Character and 17 Digit number (ex:ABCDE12345678901234567)"
|
|
||||||
onkeypress="return alpha(event);">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6"><span>ESI Number</span>
|
|
||||||
<input type="text" id="esino" name="esino" maxlength="10"
|
|
||||||
onchange="validateESI();" class="form-control"
|
|
||||||
title=" 10 digit number" onkeypress="return isNumberKey(event)">
|
|
||||||
</div>
|
|
||||||
<!-- <div class="col-md-4"><span>UA Number</span>
|
|
||||||
<input type="text" id="uano" maxlength="12" name="uano" class="form-control">
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<legend>Nominee Details</legend>
|
<legend>Nominee Details</legend>
|
||||||
<!-- Text input-->
|
|
||||||
|
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-12"><span>Nominee reference</span>
|
<div class="col-md-12"><span>Nominee reference</span>
|
||||||
<input type="text" id="nomineename" name="nomineename" maxlength="255"
|
<input type="text" id="nomineename" name="nomineename" maxlength="255"
|
||||||
class="form-control">
|
class="form-control">
|
||||||
<!-- <textarea id="nomineename" name="nomineename" maxlength="255" class="form-control" rows="3" cols="50"></textarea> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<legend>Files</legend>
|
||||||
|
|
||||||
|
<div class="files">
|
||||||
|
<div class="col-md-12 pad ">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span>File Name</span>
|
||||||
|
<input type="text" id="file_name" name="file_name[]" maxlength="255"
|
||||||
|
class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span>File</span>
|
||||||
|
<input type="file" name="emp_file[]" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4" style="margin-top: 23px;">
|
||||||
|
<button type="button" class="btn btn-primary btn-sm a1"
|
||||||
|
onclick="appendFilesFileds()" id="day">
|
||||||
|
Add
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="filesContainer"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="padding: 70px;"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Command -->
|
<!-- Command -->
|
||||||
|
|
||||||
@ -914,6 +1182,65 @@ legend {
|
|||||||
|
|
||||||
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
|
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
|
||||||
<script>
|
<script>
|
||||||
|
function updateSwitchValue(checkbox) {
|
||||||
|
checkbox.value = checkbox.checked ? "1" : "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculalteHRA() {
|
||||||
|
//var empid=document.getElementById('emp').value;
|
||||||
|
//alert(empid);
|
||||||
|
var Totalsalary = document.getElementById('Total_salary').value;
|
||||||
|
var HRA = document.getElementById('HRA_Rate').value;
|
||||||
|
//if(EmpID == -1){alert("Select Employee ID..!");}
|
||||||
|
if (HRA == '') {
|
||||||
|
alert("Please Enter HRA RATE..");
|
||||||
|
document.getElementById('HRA_Rate').focus();
|
||||||
|
} else if (Totalsalary == '') {
|
||||||
|
alert("Please Enter Total Salary..");
|
||||||
|
document.getElementById('total_salary').focus();
|
||||||
|
} else {
|
||||||
|
var temp = (Totalsalary * (HRA / 100));
|
||||||
|
var basic = Totalsalary - temp;
|
||||||
|
document.getElementById('Basic_Pay').value = basic;
|
||||||
|
document.getElementById('HRA_Amount').value = temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function appendFilesFileds(data) {
|
||||||
|
var newRowHtml = `
|
||||||
|
<div class="col-md-12 pad">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span for="file_name">File name</span>
|
||||||
|
<input type="text" id="file_name" name="file_name[]" maxlength="255" class="form-control" value="${data != null && data != '' ? data.file_name : ''}">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span for="emp_file">File</span>
|
||||||
|
<input type="file" name="emp_file[]" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4" style="margin-top: 23px;">
|
||||||
|
<button type="button" class="btn btn-danger btn-sm" onclick="removeContact(this)">Remove</button>
|
||||||
|
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()">Add</button>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
$('#filesContainer').append(newRowHtml);
|
||||||
|
$('.a1').hide();
|
||||||
|
$('#filesContainer .pad:last .a1').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeContact(button) {
|
||||||
|
$(button).closest('.pad').remove();
|
||||||
|
$('#filesContainer .a1').hide();
|
||||||
|
$('#filesContainer .pad:last .a1').show();
|
||||||
|
var len = $('#filesContainer .pad:last .a1')
|
||||||
|
var length = len.length;
|
||||||
|
if (length == 0) {
|
||||||
|
$('#day').show()
|
||||||
|
} else {
|
||||||
|
$('#day').hide()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Validate() {
|
function Validate() {
|
||||||
if ($("#FirstName").val().length < 1) {
|
if ($("#FirstName").val().length < 1) {
|
||||||
alert('Please Enter FirstName');
|
alert('Please Enter FirstName');
|
||||||
@ -1139,27 +1466,5 @@ $('#aadharno').change(function() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#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>
|
</script>
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,26 @@
|
|||||||
|
<style>
|
||||||
|
#datatable_filter{
|
||||||
|
float: inline-end;
|
||||||
|
}
|
||||||
|
#datatable_wrapper .row .col-sm-4{
|
||||||
|
flex-basis: 50%;
|
||||||
|
float: inline-end;
|
||||||
|
}
|
||||||
|
#datatable_paginate .pagination {
|
||||||
|
flex-basis: 50%;
|
||||||
|
float: inline-end;
|
||||||
|
margin:0 0 15px;
|
||||||
|
}
|
||||||
|
#datatable_wrapper .row:nth-child(3), #datatable_wrapper .row:nth-child(1){
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
#datatable_info{
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
.dataTables_wrapper{
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
@ -47,7 +69,6 @@
|
|||||||
<th>Emp ID</th>
|
<th>Emp ID</th>
|
||||||
<th>Employee Name</th>
|
<th>Employee Name</th>
|
||||||
<th>Contact Number</th>
|
<th>Contact Number</th>
|
||||||
<th>Email ID</th>
|
|
||||||
<th>Designation</th>
|
<th>Designation</th>
|
||||||
<th>Department</th>
|
<th>Department</th>
|
||||||
<th>Active</th>
|
<th>Active</th>
|
||||||
@ -62,9 +83,8 @@
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><u><a class="a_tag_link" href="<?php echo base_url().'employeedetails/ViewEmployee/?EmpID='.$record->EmpID; ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee details"><?php echo $record->EmpID ?> </a></u></td>
|
<td><u><a class="a_tag_link" href="<?php echo base_url().'employeedetails/ViewEmployee/?EmpID='.$record->EmpID; ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee details"><?php echo $record->EmpID ?> </a></u></td>
|
||||||
<td><?php echo $record->FirstName .' , '. $record->LastName; ?></td>
|
<td><?php echo $record->FirstName; ?></td>
|
||||||
<td><?php echo $record->ContactNumber ?></td>
|
<td><?php echo $record->ContactNumber ?></td>
|
||||||
<td><?php echo $record->EmailId ?></td>
|
|
||||||
<td><?php echo $record->Designation ?></td>
|
<td><?php echo $record->Designation ?></td>
|
||||||
<td><?php echo $record->DepartmentName ?></td>
|
<td><?php echo $record->DepartmentName ?></td>
|
||||||
<td><?php echo ($record->IsActive == 1)? ' Active ' : ' In Active ' ; ?></td>
|
<td><?php echo ($record->IsActive == 1)? ' Active ' : ' In Active ' ; ?></td>
|
||||||
@ -96,7 +116,9 @@
|
|||||||
"searching": true,
|
"searching": true,
|
||||||
"ordering": true,
|
"ordering": true,
|
||||||
"info": true,
|
"info": true,
|
||||||
"autoWidth": true
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100]
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -776,9 +776,26 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if($DEPCode == ADMIN || $DEPCode == HR) { ?>
|
||||||
|
<p class="menu-heading"><i class="fa fa-angle-right" aria-hidden="true"></i> HR</p>
|
||||||
|
<?php } ?>
|
||||||
|
<li class="treeview">
|
||||||
|
<a href="#">
|
||||||
|
<i class="fa fa-user-circle"></i>
|
||||||
|
<span>Employee</span>
|
||||||
|
<span class="pull-right-container">
|
||||||
|
<i class="fa fa-angle-down pull-right"></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<ul class="treeview-menu">
|
||||||
|
<?php if ($DEPCode == ADMIN || $DEPCode == HR) { ?>
|
||||||
|
<li><a href="<?php echo base_url(); ?>employeeListing" >
|
||||||
|
<i class="fa fa-user-circle"></i>
|
||||||
|
<span class="nav-label">Employee Details</span>
|
||||||
|
</a></li>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1211,12 +1228,7 @@
|
|||||||
<span class="nav-label">Asset Details</span>
|
<span class="nav-label">Asset Details</span>
|
||||||
</a></li>
|
</a></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($DEPCode == HR) { ?>
|
|
||||||
<li><a href="<?php echo base_url(); ?>employeeListing" >
|
|
||||||
<i class="fa fa-user-circle"></i>
|
|
||||||
<span class="nav-label">Employee Details</span>
|
|
||||||
</a></li>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php if ($DEPCode == SALES || $DEPCode == ADMIN) { ?>
|
<?php if ($DEPCode == SALES || $DEPCode == ADMIN) { ?>
|
||||||
<li><a href="<?php echo base_url(); ?>supplierlisting" >
|
<li><a href="<?php echo base_url(); ?>supplierlisting" >
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user