Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
8028fb5c26
@ -124,6 +124,7 @@ $routes->get('employeedetails/ViewEmployee', 'Employeedetails::ViewEmployee');
|
||||
$routes->get('employeedetails/downloadEmployeeDetails', 'Employeedetails::downloadEmployeeDetails');
|
||||
$routes->post('employeedetails/UpdateEmployee', 'Employeedetails::UpdateEmployee');
|
||||
$routes->get('exportemployee', 'Employeedetails::exportemployee');
|
||||
$routes->post('employeeHistory', 'Employeedetails::employeeHistory');
|
||||
|
||||
|
||||
$routes->post('employeeEmailExist', 'Employeedetails::CheckEmail');
|
||||
@ -199,6 +200,7 @@ $routes->post('monthlypay/deletePublicHoliday', 'Monthlypay::deletePublicHoliday
|
||||
$routes->get('leaveApplicationForm', 'Monthlypay::leaveApplicationForm');
|
||||
$routes->post('fetchLeaveApplicationForm', 'Monthlypay::fetchLeaveApplicationForm');
|
||||
$routes->get('deleteLeaveApplicationForm', 'Monthlypay::deleteLeaveApplicationForm');
|
||||
$routes->match(['GET', 'POST'], 'leaveApplicationPDF/(:any)', 'Monthlypay::leaveApplicationPDF/$1');
|
||||
$routes->match(['GET', 'POST'], 'overTimeDetails', 'Monthlypay::overTimeDetails');
|
||||
|
||||
$routes->get('emppaydate/addemppaydate', 'Emppaydate::addemppaydate');
|
||||
|
||||
@ -64,6 +64,12 @@ class Employeedetails extends BaseController
|
||||
$this->loadViews("employeeListing", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
function employeeHistory()
|
||||
{
|
||||
$Emp = $this->request->getPost('emp');
|
||||
$result = $this->employeedetails_model->employeeHistory($Emp);
|
||||
return $this->response->setJSON($result);
|
||||
}
|
||||
/*
|
||||
Validation for Gender status Dropdown
|
||||
*/
|
||||
@ -757,7 +763,7 @@ class Employeedetails extends BaseController
|
||||
$ValidTill = $this->request->getPost('ValidTill');
|
||||
$addinfo = $this->request->getPost('addinfo');
|
||||
$driverlicense = $this->request->getPost('driverlicense');
|
||||
|
||||
$reason = $this->request->getPost('reason');
|
||||
|
||||
// dd($driverlicense);
|
||||
|
||||
@ -851,7 +857,8 @@ class Employeedetails extends BaseController
|
||||
'is_driver' => $is_driver,
|
||||
'esi_applicable' => $esi_applicable,
|
||||
'pf_applicable' => $pf_applicable,
|
||||
'work_location' => $work_location
|
||||
'work_location' => $work_location,
|
||||
'reason' => $reason
|
||||
);
|
||||
//print_r($Employee);die();
|
||||
$result = $this->employeedetails_model->UpdateEmployee($Employee, $EmpId);
|
||||
|
||||
@ -990,6 +990,22 @@ class Monthlypay extends BaseController
|
||||
|
||||
}
|
||||
|
||||
public function leaveApplicationPDF($leave_application_id){
|
||||
|
||||
|
||||
$data['leave_info'] = $this->monthlypay_model->getheringleaveApplicationForm($leave_application_id);
|
||||
$data['company_info'] = $this->monthlypay_model->getCompanyInformation();
|
||||
|
||||
$html = view('leaveApplicationPDF', $data);
|
||||
// echo $html;die;
|
||||
$mpdf = new Mpdf();
|
||||
$mpdf->WriteHTML($html);
|
||||
|
||||
$fName = $data['leave_info'][0]['emp_id'].'-LeaveApplicationForm.pdf';
|
||||
return $mpdf->Output($fName, "D");
|
||||
|
||||
}
|
||||
|
||||
public function overTimeDetails()
|
||||
{
|
||||
$current = $this->request->getPost('monthyear') ? $this->request->getPost('monthyear') :date("m-Y");
|
||||
|
||||
@ -938,7 +938,7 @@ class User extends BaseController
|
||||
// {
|
||||
$data['EmpList'] = $this->user_model->rolesNotAllotedEmployees();
|
||||
$data['roles'] = $this->user_model->getUserRoles();
|
||||
$data['Department'] = json_decode(json_encode($this->department_model->departmentListing()), true);
|
||||
$data['Department'] = json_decode(json_encode($this->department_model->departmentListing(1)), true);
|
||||
|
||||
// echo "<pre>";
|
||||
// print_r($data['Department']);
|
||||
|
||||
@ -27,6 +27,18 @@ class Employeedetails_model extends Model
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function employeeHistory($emp)
|
||||
{
|
||||
$builder = $this->db->table('t_employee_history as h')
|
||||
->select('h.old_value,h.new_value,h.column_name,DATE_FORMAT(h.created_at, "%d-%m-%Y") AS indian_date, DATE_FORMAT(h.created_at, "%h:%i:%s %p") AS indian_time, CONCAT_WS(" ", ed.FirstName, ed.LastName) AS updater_name')
|
||||
->join('tbl_users as u', 'u.userId = h.updated_by', 'left')
|
||||
->join('t_employee_details as ed', 'ed on u.EmpID = ed.EmpID', 'left')
|
||||
->where('h.empcode ', $emp)
|
||||
->orderBy('h.created_at', 'asc');
|
||||
$query = $builder->get();
|
||||
$result = $query->getResult();
|
||||
return $result;
|
||||
}
|
||||
|
||||
function getUserRoles()
|
||||
{
|
||||
|
||||
@ -518,30 +518,46 @@ where Month_Year = ? and att.EmpID in (select EmpID from t_attendance)";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->getResult();
|
||||
}
|
||||
public function getheringleaveApplicationForm(){
|
||||
$sql = "select leavetable.* ,Dep.DepartmentName as department,Emp.Designation as designation,
|
||||
CONCAT_WS(' ', Emp.FirstName, Emp.LastName) AS employeeFullName ,
|
||||
CONCAT_WS(' ', Emp2.FirstName, Emp2.LastName) AS creatorFullName
|
||||
from t_employee_leave_application_form as leavetable
|
||||
left join tbl_users as user on user.userId = leavetable.created_by
|
||||
left join t_employee_details as Emp2 on Emp2.EmpID = user.EmpID
|
||||
left join t_employee_details as Emp on Emp.EmpID = leavetable.emp_id
|
||||
left join t_departmentdetails as Dep on Emp.Departmentcode = Dep.DEPCode
|
||||
where leavetable.isactive = 1";
|
||||
$query = $this->db->query($sql);
|
||||
public function getheringleaveApplicationForm($leave_id = null ){
|
||||
|
||||
$builder = $this->db->table("t_employee_leave_application_form as leavetable")
|
||||
->select("leavetable.* ,Dep.DepartmentName as department,Emp.Designation as designation")
|
||||
->select("CONCAT_WS(' ', Emp.FirstName, Emp.LastName) AS employeeFullName")
|
||||
->select("CONCAT_WS(' ', Emp2.FirstName, Emp2.LastName) AS creatorFullName")
|
||||
->join("tbl_users as user", "user.userId = leavetable.created_by", "left")
|
||||
->join("t_employee_details as Emp", "Emp.EmpID = leavetable.emp_id", "left")
|
||||
->join("t_employee_details as Emp2", "Emp2.EmpID = user.EmpID", "left")
|
||||
->join("t_departmentdetails as Dep", "Emp.Departmentcode = Dep.DEPCode", "left");
|
||||
if (!empty($leave_id)) {
|
||||
$builder->where('leavetable.leave_application_id', $leave_id);
|
||||
}
|
||||
$builder->where('leavetable.isactive', 1);
|
||||
$query = $builder->get();
|
||||
return $query->getResultArray();
|
||||
}
|
||||
public function getheringemployeeinformation(){
|
||||
}
|
||||
public function getheringemployeeinformation(){ //active employee only no driver also.
|
||||
$builder = $this->db->table("t_employee_details as Emp")
|
||||
->select("Emp.EmpID,Emp.Designation,Emp.Departmentcode,Dep.DEPCode,Emp.Designation,Emp.Departmentcode,Dep.DEPCode,Dep.DepartmentName as DepartmentNamee,Dep.DepartmentName as DepartmentName")
|
||||
->select("CONCAT_WS(' ', Emp.FirstName, Emp.LastName) AS FullName")
|
||||
->join("t_departmentdetails as Dep", "Emp.Departmentcode = Dep.DEPCode", "left")
|
||||
->where('Emp.is_driver != ', 1)
|
||||
->where('Emp.IsActive', 1)
|
||||
->orderBy("Emp.EmpID", "asc");
|
||||
|
||||
$query = $builder->get();
|
||||
|
||||
$result = $query->getResult();
|
||||
return $result;
|
||||
}
|
||||
function getCompanyInformation()
|
||||
{
|
||||
|
||||
$subQuery = "select CompanyName,replace(Address,'<br>','') as Address,GSTNO,PAN,ContactNumber,EmailAddress,AlternateContactNumber,companyWebsite,StateCode
|
||||
from t_company_details ";
|
||||
|
||||
$query = $this->db->query($subQuery);
|
||||
return $query->getResult();
|
||||
|
||||
}
|
||||
public function saveleaveApplicationForm($data,$id){
|
||||
if ($id == 0) {
|
||||
|
||||
@ -1622,8 +1622,8 @@ if (!empty($getlogpodtl)) {
|
||||
<?php if ($PrePOFile) { ?>
|
||||
<div id="deletePreviousPurchaseOrderFileDiv">
|
||||
<div class="form-group col-md-12 px-4">
|
||||
<label for="deletePreviousPurchaseOrderFile"><a title="previously uploaded PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded purchase order file- </span><small><?= $PrePOFile; ?></small></a></label>
|
||||
<label for="deletePreviousPurchaseOrderFile"><a title="Previous Upload PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>Previous Upload - </span><small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete </button>
|
||||
</div>
|
||||
|
||||
@ -767,9 +767,9 @@
|
||||
if (typeof item.MasterFile == 'string') {
|
||||
if (item.MasterFile !== null && item.MasterFile !== undefined && item.MasterFile.trim() !== "") {
|
||||
modal.find('#MasterFileLabel a').attr('href', '<?php echo base_url() ?>' + 'public/uploads/Igrfiles/' + item.MasterFile);
|
||||
modal.find('#MasterFileLabel a').attr('title', 'previously uploaded IGR Master File');
|
||||
modal.find('#MasterFileLabel a').attr('title', 'Previous Upload IGR Master File');
|
||||
modal.find('#MasterFileLabel a').attr('target', '_blank');
|
||||
modal.find('#MasterFileLabel a span').text('previously uploaded - ');
|
||||
modal.find('#MasterFileLabel a span').text('Previous Upload - ');
|
||||
modal.find('#MasterFileLabel a small').text(item.MasterFile);
|
||||
modal.find('#MasterFileLabel').show();
|
||||
}
|
||||
@ -1294,10 +1294,10 @@
|
||||
modal.find('#WeightFileLabel').hide();
|
||||
console.log(typeof fileName);
|
||||
if (fileName !== 'null' && fileName !== undefined && fileName.trim() !== "") {
|
||||
modal.find('#WeightFileLabel a').attr('title', 'previously uploaded IGR Weight File');
|
||||
modal.find('#WeightFileLabel a').attr('title', 'Previous Upload IGR Weight File');
|
||||
modal.find('#WeightFileLabel a').attr('href', '<?php echo base_url() ?>' + 'public/uploads/Igrfiles/' + fileName);
|
||||
modal.find('#WeightFileLabel a').attr('target', '_blank');
|
||||
modal.find('#WeightFileLabel a span').text('previously uploaded - ');
|
||||
modal.find('#WeightFileLabel a span').text('Previous Upload - ');
|
||||
modal.find('#WeightFileLabel a small').text(fileName);
|
||||
modal.find('#WeightFileLabel').show();
|
||||
}
|
||||
|
||||
@ -554,7 +554,7 @@
|
||||
<input type="text" id="currentaddress" required name="currentaddress"
|
||||
pattern=".{0,500}" maxlength="500" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-4 pad" style="margin-top: 18px;">
|
||||
<div class="col-md-4 pad" style="margin-top: 36px;">
|
||||
|
||||
<input type="checkbox" id="checksame" name="sameaddress"
|
||||
>
|
||||
@ -732,7 +732,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="margin-top: 18px;">
|
||||
<div class="col-md-3" style="margin-top: 36px;">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="switch">
|
||||
@ -746,7 +746,7 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-top: 18px;">
|
||||
<div class="col-md-3" style="margin-top: 36px;">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="switch">
|
||||
|
||||
@ -1679,9 +1679,9 @@ if (!empty($POItem) && $CapitalRange == '1') {
|
||||
<div class="form-group col-md-12" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<br />
|
||||
|
||||
<label><a title="previously uploaded PO File"
|
||||
<label><a title="Previous Upload PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>">
|
||||
<span>previously uploaded purchase order file- </span>
|
||||
<span>Previous Upload - </span>
|
||||
<small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete</button>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -68,7 +68,7 @@ $pf_applicable = 0;
|
||||
$TDS_Rate = '';
|
||||
$tds_apllicable = 0;
|
||||
$is_driver = 0;
|
||||
|
||||
$reason = '';
|
||||
if (!empty($EmpDetails)) {
|
||||
foreach ($EmpDetails as $Emp) {
|
||||
$EmpID = $Emp->EmpID;
|
||||
@ -153,6 +153,7 @@ if (!empty($EmpDetails)) {
|
||||
$is_management_team = $Emp->is_management_team;
|
||||
$esi_applicable = $Emp->esi_applicable;
|
||||
$pf_applicable = $Emp->pf_applicable;
|
||||
$reason = $Emp->reason;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -246,7 +247,7 @@ if (!empty($EmpDetails)) {
|
||||
|
||||
<?php if($Emp->ProfilePic){ ?>
|
||||
<br/>
|
||||
<label style="white-space: normal; word-wrap: break-word; overflow-wrap: break-word; width: 100%;"><span>previously uploaded profile picture - </span>
|
||||
<label style="white-space: normal; word-wrap: break-word; overflow-wrap: break-word; width: 100%;"><span>Previous Upload - </span>
|
||||
<small><?= $Emp->ProfilePic; ?></small></label>
|
||||
<?php } ?>
|
||||
|
||||
@ -272,14 +273,6 @@ if (!empty($EmpDetails)) {
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="form-row">
|
||||
|
||||
<input type="checkbox" id="isactive" <?php echo $IsActive; ?>
|
||||
name="isactive" value="1">
|
||||
<label style="margin-top:8px;">
|
||||
Is Active
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@ -402,7 +395,7 @@ if (!empty($EmpDetails)) {
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 pad" style="margin-top: 18px;">
|
||||
<div class="col-md-4 pad" style="margin-top: 36px;">
|
||||
<input type="checkbox" id="checksame" name="sameaddress"
|
||||
onclick="CheckClick">
|
||||
<label> Current address same as permanent
|
||||
@ -449,6 +442,20 @@ if (!empty($EmpDetails)) {
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 pad">
|
||||
|
||||
<input type="checkbox" id="isactive" <?php echo $IsActive; ?>
|
||||
name="isactive" value="1" onchange="handleCheckboxChange()">
|
||||
<label style="margin-top:8px;">
|
||||
Is Active
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 pad" id="reasonContainer" style="display: none;">
|
||||
<label>Reason</label>
|
||||
<textarea class="form-control" id="reason" name="reason" style="display: none;"><?php echo $reason ?></textarea>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-4 pad">
|
||||
<label>Emergency Contact Name</label>
|
||||
<input type="text" id="emergencycontactname" maxlength="100"
|
||||
@ -645,7 +652,7 @@ if (!empty($EmpDetails)) {
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="margin-top: 18px;">
|
||||
<div class="col-md-3" style="margin-top: 36px;">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="switch">
|
||||
@ -661,7 +668,7 @@ if (!empty($EmpDetails)) {
|
||||
Team</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-top: 18px;">
|
||||
<div class="col-md-3" style="margin-top: 36px;">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="switch">
|
||||
@ -1798,6 +1805,31 @@ if (!empty($EmpDetails)) {
|
||||
$('#Total_salary').prop('readonly', false);
|
||||
}
|
||||
}
|
||||
function handleCheckboxChange() {
|
||||
let checkbox = document.getElementById("isactive");
|
||||
let reasonContainer = document.getElementById("reasonContainer");
|
||||
let reasonTextarea = document.getElementById("reason");
|
||||
reasonTextarea.value = "";
|
||||
reasonContainer.style.display = "inline-block";
|
||||
reasonTextarea.style.display = "inline-block";
|
||||
reasonTextarea.setAttribute("required", "true");
|
||||
reasonTextarea.focus(); // Auto-focus
|
||||
|
||||
alert("please Enter the reason!");
|
||||
|
||||
|
||||
|
||||
|
||||
// alert("please Enter the reason!");
|
||||
// document.getElementById('reason').focus();
|
||||
// reasonInput.setAttribute("required", "true");
|
||||
// reasonInput.focus();
|
||||
// if (checkbox.checked) {
|
||||
// alert("called");
|
||||
// } else {
|
||||
// alert("called2");
|
||||
// }
|
||||
}
|
||||
|
||||
function calculalteHRA() {
|
||||
//var empid=document.getElementById('emp').value;
|
||||
|
||||
@ -1586,9 +1586,9 @@ if (!empty($RequistionDetails)) {
|
||||
<div class="form-group col-md-12" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<br />
|
||||
|
||||
<label><a title="previously uploaded PO File"
|
||||
<label><a title="Previous Upload PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>">
|
||||
<span>previously uploaded purchase order file- </span>
|
||||
<span>Previous Upload - </span>
|
||||
<small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<!-- <button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete </button> -->
|
||||
|
||||
@ -251,49 +251,39 @@ if (!empty($emppay)) {
|
||||
<h4 class="header-title mt-2 mb-2">Loan Documents</h4>
|
||||
<!-- Text input-->
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="d-block" for="request_letter">Request letter</label>
|
||||
<input type="file" accept=".docx,.pdf,.doc,.jpg,.png" id="request_letter" name="request_letter" style="margin-top: 5px;" />
|
||||
<input type="hidden" id="hidden_request_letter" name="hidden_request_letter" value="<?php echo $request_letter; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($request_letter) { ?>
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<?php if ($request_letter) { ?>
|
||||
<div class="mb-1">
|
||||
<a href="<?php echo base_url() . 'public/uploads/images/' . $request_letter ?>">
|
||||
<span>Previous Upload - </span><small><?= $request_letter; ?></small>
|
||||
</a>
|
||||
</div>
|
||||
<br>
|
||||
<u>
|
||||
<a href="<?php echo base_url() . 'public/uploads/images/' . $request_letter ?>">
|
||||
<span>Previously Uploaded Document - </span><small><?= $request_letter; ?></small>
|
||||
</a>
|
||||
</u>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div> <!-- 1st row div closed here -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="d-block" for="payment_statement">Payment Receipt</label>
|
||||
<input type="file" accept=".docx,.pdf,.doc,.jpg,.png" id="payment_statement" name="payment_statement" style="margin-top: 5px;" />
|
||||
<input type="hidden" id="hidden_payment_statement" name="hidden_payment_statement" value="<?php echo $payment_statement; ?>" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($payment_statement) { ?>
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<br>
|
||||
<u>
|
||||
<?php if ($request_letter) { ?>
|
||||
<span class="help-block"><small>
|
||||
<a href="<?php echo base_url() . 'public/uploads/images/' . $payment_statement ?>">
|
||||
<span>Previously Uploaded Document - </span><small><?= $payment_statement; ?></small>
|
||||
<span>Previous Upload - </span><small><?= $payment_statement; ?></small>
|
||||
</a>
|
||||
</u>
|
||||
</div>
|
||||
</small></span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div> <!-- 2nd row div closed here -->
|
||||
|
||||
|
||||
|
||||
@ -1639,9 +1639,9 @@ if (!empty($INRSYMBOL)) {
|
||||
<div class="form-group col-md-12" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<br />
|
||||
|
||||
<label><a title="previously uploaded PO File"
|
||||
<label><a title="Previous Upload PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>">
|
||||
<span>previously uploaded purchase order file- </span>
|
||||
<span>Previous Upload - </span>
|
||||
<small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete</button>
|
||||
|
||||
@ -2913,9 +2913,9 @@ if (!empty($getlogpodtl)) {
|
||||
<div class="form-group col-md-12" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<br />
|
||||
|
||||
<label><a title="previously uploaded PO File"
|
||||
<label><a title="Previous Upload PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>">
|
||||
<span>previously uploaded purchase order file- </span>
|
||||
<span>Previous Upload - </span>
|
||||
<small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete</button>
|
||||
@ -4340,7 +4340,7 @@ if (!empty($getlogpodtl)) {
|
||||
<input type="file" size="20" input accept=".docx,.pdf,.doc.JPG,.PNG,.jpg" id="billimag"
|
||||
name="images" onChange="filecheck();" />
|
||||
<br><br>
|
||||
<p><b>Previously Uploaded PO Bill <span class="text-danger"
|
||||
<p><b>Previous Upload PO Bill <span class="text-danger"
|
||||
id="showPreviousPoBill"></span></b> </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1369,9 +1369,9 @@ foreach ($PaymentTerms as $TER) {
|
||||
<div class="form-group col-md-12" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<br />
|
||||
|
||||
<label><a title="previously uploaded PO File"
|
||||
<label><a title="Previous Upload PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>">
|
||||
<span>previously uploaded purchase order file- </span>
|
||||
<span>Previous Upload - </span>
|
||||
<small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete</button>
|
||||
|
||||
@ -378,9 +378,8 @@ if (!empty($supplier)) {
|
||||
</div>
|
||||
<?php if ($hidden_Cert_GST) { ?>
|
||||
<div class="col-md-4">
|
||||
<u><a title="previously uploaded GST Document"
|
||||
href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_GST ?>"><span>previously
|
||||
uploaded GST Document - </span><small><?= $hidden_Cert_GST; ?></small></a></u>
|
||||
<u><a title="Previous Upload GST Document"
|
||||
href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_GST ?>"><span>Previous Upload - </span><small><?= $hidden_Cert_GST; ?></small></a></u>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@ -399,9 +398,8 @@ if (!empty($supplier)) {
|
||||
</div>
|
||||
<?php if ($hidden_Cert_PAN) { ?>
|
||||
<div class="col-md-4">
|
||||
<u><a title="previously uploaded PAN Document"
|
||||
href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_PAN ?>"><span>previously
|
||||
uploaded PAN Document - </span><small><?= $hidden_Cert_PAN; ?></small></a></u>
|
||||
<u><a title="Previous Upload PAN Document"
|
||||
href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_PAN ?>"><span>Previous Upload - </span><small><?= $hidden_Cert_PAN; ?></small></a></u>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@ -418,9 +416,8 @@ if (!empty($supplier)) {
|
||||
</div>
|
||||
<?php if ($hidden_Cert_MSME) { ?>
|
||||
<div class="col-md-3">
|
||||
<u><a title="previously uploaded GST Document"
|
||||
href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_MSME ?>"><span>previously
|
||||
uploaded MSME Document - </span><small><?= $hidden_Cert_MSME; ?></small></a></u>
|
||||
<u><a title="Previous Upload GST Document"
|
||||
href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_MSME ?>"><span>Previous Upload - </span><small><?= $hidden_Cert_MSME; ?></small></a></u>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@ -457,9 +454,9 @@ if (!empty($supplier)) {
|
||||
<?php if ($hidden_Cert_BANK) { ?>
|
||||
<div class="col-md-4">
|
||||
<u>
|
||||
<a title="Previously uploaded Bank Document"
|
||||
<a title="Previous Upload Bank Document"
|
||||
href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_BANK ?>">
|
||||
<span>Previously uploaded BANK Document - </span>
|
||||
<span>Previous Upload - </span>
|
||||
<small><?php echo $hidden_Cert_BANK; ?></small>
|
||||
</a>
|
||||
</u>
|
||||
|
||||
@ -1313,9 +1313,9 @@ if (!empty($getlogpodtl)) {
|
||||
<div class="form-group col-md-12" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<br />
|
||||
|
||||
<label><a title="previously uploaded PO File"
|
||||
<label><a title="Previous Upload PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>">
|
||||
<span>previously uploaded purchase order file- </span>
|
||||
<span>Previous Upload - </span>
|
||||
<small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete</button>
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
</div>
|
||||
|
||||
<a data-toggle="modal" href="#applicationModal" data-id="0" data-name=""
|
||||
class="btn btn-success">Add Leave Application Form</a>
|
||||
class="btn btn-success">Add Leave</a>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.end 1st r o w -->
|
||||
@ -79,6 +79,8 @@
|
||||
<th>Create Date</th>
|
||||
<th>Create By</th>
|
||||
<th>Employee Name</th>
|
||||
<th>From Date</th>
|
||||
<th>To Date</th>
|
||||
<th>Number Of Days</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
@ -90,24 +92,38 @@
|
||||
foreach ($leave_info as $d) {
|
||||
$createdat = new DateTime($d['created_on']);
|
||||
$crdate = $createdat->format('d-m-Y');
|
||||
$crtime = $createdat->format('h:i A');
|
||||
$crtime = $createdat->format('h:i A');
|
||||
$startat = new DateTime($d['start_date']);
|
||||
$stdate = $startat->format('d-m-Y');
|
||||
$endat = new DateTime($d['end_date']);
|
||||
$eddate = $endat->format('d-m-Y');
|
||||
?>
|
||||
<tr>
|
||||
<td><?= esc($crdate) ?></td>
|
||||
<td><?= esc($d['creatorFullName']) ?></td>
|
||||
<td><?= esc($d['employeeFullName']) ?></td>
|
||||
<td><?= esc($stdate) ?></td>
|
||||
<td><?= esc($eddate) ?></td>
|
||||
<td><?= esc($d['no_of_days']) ?></td>
|
||||
<td><?= esc($d['status']) ?></td>
|
||||
<td><?php if($d['leave_application_id']){ ?>
|
||||
<a data-toggle="modal" href="#applicationModal" data-arr='<?php echo json_encode($d); ?>' data-id='<?= esc($d['leave_application_id']) ?>'>
|
||||
<a data-toggle="modal" href="#applicationModal" data-arr='<?php echo json_encode($d); ?>' data-id='<?= esc($d['leave_application_id']) ?>' data-toggle="tooltip" title="<?php echo $d['emp_id']; ?> - Click here to view Employee Leave Details">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
|
||||
<!-- <a onclick="confirmDelete(event)" style="cursor:pointer;" href="<?php echo base_url() . 'deleteLeaveApplicationForm?leave_application_id=' . esc($d['leave_application_id']); ?>" data-toggle="tooltip" title="<?php echo $d['emp_id']; ?> - Click here to delete Employee Leave Details"> -->
|
||||
<a onclick="confirmDelete(event)" style="cursor:pointer;" href="<?php echo base_url() . 'deleteLeaveApplicationForm?leave_application_id=' . esc($d['leave_application_id']); ?>">
|
||||
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if($d['status'] == "APPROVED"){} ?>
|
||||
<!-- <a style="cursor:pointer;" href="<?php echo base_url() . 'leaveApplicationPDF/' . esc($d['leave_application_id']); ?>" data-toggle="tooltip" title="<?php echo $d['emp_id']; ?> - Click here to download Employee Leave Details"> -->
|
||||
<a style="cursor:pointer;" href="<?php echo base_url() . 'leaveApplicationPDF/' . esc($d['leave_application_id']); ?>">
|
||||
|
||||
<i class="fa fa-download"></i>
|
||||
</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@ -142,11 +158,11 @@
|
||||
<input type="hidden" class="form-control" id="leave_application_id" name="leave_application_id">
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-3" style="text-align: end; align-content: center;">
|
||||
<div class="col-md-2" style="text-align: end; align-content: center;">
|
||||
<label class="form" for="emp_name">Employee Name</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control" id="emp_name" name="emp_name" onchange="fetchemployees(this);">
|
||||
<select class="form-control searchabledropdown" id="emp_name" name="emp_name" onchange="fetchemployees(this);">
|
||||
<option value="">Select</option>
|
||||
<?php foreach ($employee_info as $key => $value) { ?>
|
||||
<option value="<?= $value->EmpID; ?>"
|
||||
@ -159,7 +175,7 @@
|
||||
</div>
|
||||
</div><!--/. r o w 1 -->
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-3" style="text-align: end; align-content: center;">
|
||||
<div class="col-md-2" style="text-align: end; align-content: center;">
|
||||
<label class="form" for="emp_id">Employee ID</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@ -167,7 +183,7 @@
|
||||
</div>
|
||||
</div><!--/. r o w 2-->
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-3" style="text-align: end; align-content: center;">
|
||||
<div class="col-md-2" style="text-align: end; align-content: center;">
|
||||
<label class="form" for="department">Department</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@ -175,7 +191,7 @@
|
||||
</div>
|
||||
</div><!--/. r o w 3 -->
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-3" style="text-align: end; align-content: center;">
|
||||
<div class="col-md-2" style="text-align: end; align-content: center;">
|
||||
<label class="form" for="designation">Designation </label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@ -183,28 +199,28 @@
|
||||
</div>
|
||||
</div><!--/. r o w 4 -->
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-3" style="text-align: end; align-content: center;">
|
||||
<label class="form" for="No. of days">No. of days </label>
|
||||
<div class="col-md-2 mt-4" style="text-align: end; align-content: center;">
|
||||
<label class="form" for="No. of days">Date Range </label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="start_date">from Date</label>
|
||||
<label class="form" for="start_date">From Date</label>
|
||||
<input type="date" class="form-control" id="start_date" name="start_date" required>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="end_date">to Date</label>
|
||||
<label class="form" for="end_date">To Date</label>
|
||||
<input type="date" class="form-control" id="end_date" name="end_date" required>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="no_of_days">No's Days </label>
|
||||
<label class="form" for="no_of_days">No Of Days </label>
|
||||
<input type="text" class="form-control" id="no_of_days" name="no_of_days">
|
||||
</div>
|
||||
</div><!--/. r o w 5 -->
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-3" style="text-align: end; align-content: center;">
|
||||
<div class="col-md-2" style="text-align: end; align-content: center;">
|
||||
<label class="form" for="status_val">Status</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control" id="status_val" name="status_val">
|
||||
<select class="form-control select2" id="status_val" name="status_val">
|
||||
<option value="">Select</option>
|
||||
<?php foreach ($status_info as $key => $value) { ?>
|
||||
<option value="<?= $value; ?>"> <?= $value; ?> </option>
|
||||
@ -213,7 +229,7 @@
|
||||
</div>
|
||||
</div><!--/. r o w 6 -->
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-3" style="text-align: end; align-content: center;">
|
||||
<div class="col-md-2" style="text-align: end; align-content: center;">
|
||||
<label class="form" for="reason">Reason</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@ -243,12 +259,19 @@
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$(".searchabledropdown").select2();
|
||||
let today = new Date().toISOString().split("T")[0]; // Format: YYYY-MM-DD
|
||||
$("#start_date").attr("min", today);
|
||||
$("#end_date").attr("min", today);
|
||||
|
||||
$('#start_date, #end_date').change(function() {
|
||||
const start = new Date($('#start_date').val());
|
||||
const end = new Date($('#end_date').val());
|
||||
|
||||
if (!isNaN(start.getTime())) {
|
||||
$('#end_date').val("");
|
||||
let minDate = start.toISOString().split("T")[0]; // Convert Date to YYYY-MM-DD format
|
||||
$("#end_date").attr("min", minDate); // Set min attribute for end_date
|
||||
}
|
||||
if (!isNaN(start) && !isNaN(end)) {
|
||||
const days = Math.floor((end - start) / 86400000) + 1;
|
||||
$('#no_of_days').val(days > 0 ? days : 1);
|
||||
@ -261,28 +284,31 @@
|
||||
$("#applicationModal").on("shown.bs.modal", function (e) {
|
||||
|
||||
var id = $(e.relatedTarget).data('id');
|
||||
let fields = ['leave_application_id','emp_id','start_date','end_date','no_of_days','reason','status_val','emp_name','department','designation'];
|
||||
let fields = ['leave_application_id','emp_name','emp_id','start_date','end_date','no_of_days','reason','status_val','department','designation'];
|
||||
|
||||
fields.forEach(function(field) {
|
||||
$("#" + field).val("");
|
||||
});
|
||||
|
||||
if (id == 0) {
|
||||
$('#applicationformTitle').html("Add Leave Application Form");
|
||||
$('#emp_name').val("").select2();
|
||||
$('#applicationformTitle').html("Apply Leave");
|
||||
$("#leave_application_id").val(0);
|
||||
} else {
|
||||
var arr = $(e.relatedTarget).data('arr');
|
||||
|
||||
fields.forEach(function(field) {
|
||||
$("#" + field).val(arr && arr[field] ? arr[field] : "");
|
||||
|
||||
if(field == 'emp_name'){
|
||||
$("#emp_name").val(arr && arr['emp_id']);
|
||||
}
|
||||
if(field == 'status_val'){
|
||||
let empID = arr && arr['emp_id'] ? arr['emp_id'] : "";
|
||||
$("#emp_name").val(empID).select2();
|
||||
}else if(field == 'status_val'){
|
||||
$("#status_val").val(arr && arr['status']);
|
||||
}else{
|
||||
$("#" + field).val(arr && arr[field] ? arr[field] : "");
|
||||
}
|
||||
});
|
||||
$('#applicationformTitle').html("Edit Leave Application Form");
|
||||
$('#applicationformTitle').html("Edit Leave");
|
||||
}
|
||||
});
|
||||
$('#tempClick').click(function () {
|
||||
|
||||
@ -136,13 +136,16 @@
|
||||
$cdate = date('d-m-Y', strtotime($record->Created_date));
|
||||
} ?>
|
||||
<td>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
|
||||
<a href="<?php echo base_url() . 'employeedetails/downloadEmployeeDetails/?EmpID=' . $record->EmpID; ?>">
|
||||
<a href="<?php echo base_url() . 'employeedetails/downloadEmployeeDetails/?EmpID=' . $record->EmpID; ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to Download Employee Details">
|
||||
<i class="fas fa-download"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="#" data-toggle="modal" data-target="#accordion-modal" data-emp="<?php echo $record->EmpID ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee History">
|
||||
<i class="fas fa-history"style="text-align: center;"></i>
|
||||
</a>
|
||||
|
||||
</td>
|
||||
<td><?php echo $record->FirstName; ?></td>
|
||||
@ -169,6 +172,44 @@
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
<div id="accordion-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content p-0">
|
||||
<div id="accordion">
|
||||
<div class="card mb-0">
|
||||
<div class="card-header" id="headingOne">
|
||||
<h5 class="m-0">
|
||||
<a href="#collapseOne" class="text-dark" data-toggle="collapse" aria-expanded="true" aria-controls="collapseOne">
|
||||
Salary History #1
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div id="HisStatement1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.c a r d 1 -->
|
||||
<div class="card mb-0">
|
||||
<div class="card-header" id="headingTwo">
|
||||
<h5 class="m-0">
|
||||
<a href="#collapseTwo" class="collapsed text-dark" data-toggle="collapse" aria-expanded="false" aria-controls="collapseTwo">
|
||||
Active and Deactivate History #2
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div id="HisStatement2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.c a r d 2 -->
|
||||
</div><!-- /.a c c o r d i o n -->
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||
|
||||
<script>
|
||||
@ -203,4 +244,80 @@
|
||||
table.draw();
|
||||
});
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$("#accordion-modal").on("shown.bs.modal", function(e) {
|
||||
var emp = $(e.relatedTarget).data('emp');
|
||||
var noData = '<p style="text-align: center;">No History Data Available</p>';
|
||||
$("#HisStatement1").empty();
|
||||
$("#HisStatement2").empty();
|
||||
|
||||
|
||||
|
||||
if (emp !== "") {
|
||||
$.ajax({
|
||||
data: {
|
||||
emp: emp
|
||||
},
|
||||
type: "POST",
|
||||
url: "<?php echo base_url() ?>employeeHistory",
|
||||
success: function(data) {
|
||||
var output1 = '';
|
||||
var output2 = '';
|
||||
|
||||
if (data && data.length > 0) {
|
||||
let salaryArr = data.filter(d => d.column_name == "TotalSalary");
|
||||
let activeArr = data.filter(d => d.column_name != "TotalSalary");
|
||||
|
||||
if (salaryArr && salaryArr.length > 0) {
|
||||
salaryArr.forEach(function(record) {
|
||||
// Declare statement inside the loop to reset for each record
|
||||
let statement1 = "Salary Changed from <b> `" + record.old_value + "` </b> to <b> `" + record.new_value + "` </b> by " + record.updater_name +
|
||||
" on " + record.indian_date + " at " + record.indian_time;
|
||||
output1 += '<p style="font-size:13px;"> • ' + statement1 + '</p>';
|
||||
});
|
||||
}else{
|
||||
output1 = noData;
|
||||
|
||||
}
|
||||
|
||||
if (activeArr && activeArr.length > 0) {
|
||||
activeArr.forEach(function(record, index) {
|
||||
if (record.column_name === "IsActive" && index % 2 === 0) { // Even index for "IsActive"
|
||||
let action = record.new_value === "0" ? "Deactivated" : "Activated";
|
||||
statement2 = "User " + action + " by " + record.updater_name +
|
||||
" on " + record.indian_date + " at " + record.indian_time;
|
||||
}
|
||||
|
||||
if (record.column_name === "reason" && index % 2 !== 0) { // Odd index for "reason"
|
||||
statement2 += " Reason " + " ( " + record.new_value + " ) ";
|
||||
output2 += '<p style="font-size:13px;"> • ' + statement2 + '</p>';
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}else{
|
||||
output2 = noData;
|
||||
}
|
||||
}else{
|
||||
output1 = noData;
|
||||
output2 = noData;
|
||||
}
|
||||
|
||||
$("#HisStatement1").html(output1);
|
||||
$("#HisStatement2").html(output2);
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
$("#HisStatement1").html(noData);
|
||||
$("#HisStatement1").html(noData);
|
||||
console.error('AJAX Error: ' + status + error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$("#HisStatement1").html(noData);
|
||||
$("#HisStatement2").html(noData);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
154
app/Views/leaveApplicationPDF.php
Normal file
154
app/Views/leaveApplicationPDF.php
Normal file
@ -0,0 +1,154 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
.text-center { text-align: center; }
|
||||
.text-right { text-align: right; }
|
||||
.text-left { text-align: left; }
|
||||
|
||||
body {
|
||||
margin: 0 auto;
|
||||
color: #3A3A3A;
|
||||
background: #FFFFFF;
|
||||
font-family: sans-serif;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.main-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
.main-table td, .main-table th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.company-header {
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
font-weight: bold;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
#leaveDetails {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
#leaveDetails td, #leaveDetails th {
|
||||
border: 1px solid #000 !important;
|
||||
}
|
||||
|
||||
.signature-section {
|
||||
padding-top: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php
|
||||
|
||||
$CompanyName = (!empty($company_info) && !empty($company_info[0]->CompanyName)) ? $company_info[0]->CompanyName : "-";
|
||||
$CompanyAddress = (!empty($company_info) && !empty($company_info[0]->Address)) ? $company_info[0]->Address : "-";
|
||||
$address = preg_replace('/SURVEY\s*:\s*[^,]+,/', '', $CompanyAddress);
|
||||
$leave_application_id = (!empty($leave_info) && !empty($leave_info[0]['leave_application_id'])) ? $leave_info[0]['leave_application_id'] : "-";
|
||||
$emp_name = (!empty($leave_info) && !empty($leave_info[0]['employeeFullName'])) ? $leave_info[0]['employeeFullName'] : "-";
|
||||
$emp_id = (!empty($leave_info) && !empty($leave_info[0]['emp_id'])) ? $leave_info[0]['emp_id'] : "-";
|
||||
$department = (!empty($leave_info) && !empty($leave_info[0]['department'])) ? $leave_info[0]['department'] : "-";
|
||||
$designation = (!empty($leave_info) && !empty($leave_info[0]['designation'])) ? $leave_info[0]['designation'] : "-";
|
||||
$start_date = (!empty($leave_info) && !empty($leave_info[0]['start_date'])) ? get_date_time_dynamical_format('Y-m-d','d-m-Y',$leave_info[0]['start_date']) : "-";
|
||||
$end_date = (!empty($leave_info) && !empty($leave_info[0]['end_date'])) ? get_date_time_dynamical_format('Y-m-d','d-m-Y',$leave_info[0]['end_date']) : "-";
|
||||
$no_of_days = (!empty($leave_info) && !empty($leave_info[0]['no_of_days'])) ? $leave_info[0]['no_of_days'] : "-";
|
||||
$reason = (!empty($leave_info) && !empty($leave_info[0]['reason'])) ? $leave_info[0]['reason'] : "-";
|
||||
$status = (!empty($leave_info) && !empty($leave_info[0]['status'])) ? $leave_info[0]['status'] : "-";
|
||||
|
||||
?>
|
||||
<header class="clearfix"></header>
|
||||
<main>
|
||||
<table class="main-table">
|
||||
<!-- Company Name & Address -->
|
||||
<tr>
|
||||
<td colspan="12" class="text-center">
|
||||
<div class="company-header"><?php echo $CompanyName ? _htmlsc($CompanyName) : ""; ?></div>
|
||||
<?php if ($CompanyAddress) {
|
||||
echo '<div>' . _htmlsc($CompanyAddress) . '</div>';
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Title -->
|
||||
<tr>
|
||||
<td colspan="12" class="text-center form-title">Leave Application Form</td>
|
||||
</tr>
|
||||
|
||||
<!-- Employee Details -->
|
||||
<tr>
|
||||
<td colspan="5" class="text-right"><?php echo trans('Employee Name'); ?></td>
|
||||
<td colspan="7" class="text-left"><?php echo _htmlsc($emp_name); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" class="text-right"><?php echo trans('Employee ID'); ?></td>
|
||||
<td colspan="7" class="text-left"><?php echo _htmlsc($emp_id); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" class="text-right"><?php echo trans('Department'); ?></td>
|
||||
<td colspan="7" class="text-left"><?php echo _htmlsc($department); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" class="text-right"><?php echo trans('Designation'); ?></td>
|
||||
<td colspan="7" class="text-left"><?php echo _htmlsc($designation); ?></td>
|
||||
</tr>
|
||||
|
||||
<!-- Leave Details Table -->
|
||||
<tr>
|
||||
<td colspan="5" class="text-right"><?php echo trans('No. of days'); ?></td>
|
||||
<td colspan="7">
|
||||
<table id="leaveDetails">
|
||||
<tr>
|
||||
<th>From Date</th>
|
||||
<th>To Date</th>
|
||||
<th>No's Days</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _htmlsc($start_date); ?></td>
|
||||
<td><?php echo _htmlsc($end_date); ?></td>
|
||||
<td><?php echo _htmlsc($no_of_days); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Status and Reason -->
|
||||
<tr>
|
||||
<td colspan="5" class="text-right"><?php echo trans('Status'); ?></td>
|
||||
<td colspan="7" class="text-left"><?php echo _htmlsc($status); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" class="text-right"><?php echo trans('Reason'); ?></td>
|
||||
<td colspan="7" class="text-left"><?php echo _htmlsc($reason); ?></td>
|
||||
</tr>
|
||||
|
||||
<!-- Signature Section -->
|
||||
<tr>
|
||||
<td colspan="6" class="text-center signature-section">
|
||||
<h6>Employee Signatory</h6>
|
||||
</td>
|
||||
<td colspan="6" class="text-center signature-section">
|
||||
<h6>Authorized Signatory</h6>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -258,7 +258,7 @@
|
||||
<td style="max-width:80px;text-align:right;">
|
||||
<?php $OT = $record->OT_Hrs_Worked;
|
||||
echo $OT;
|
||||
$totalovertimehrs[] = $record->OT_Hrs_Worked;
|
||||
$totalOThrs[] = $record->OT_Hrs_Worked;
|
||||
?>
|
||||
</td>
|
||||
|
||||
@ -275,7 +275,7 @@
|
||||
// $OTSalary = ($OT_Hrs_Worked != 0) ? $OT_Hrs_Worked * $oneHoursSalary : 0;
|
||||
$OTSalary = $OT * $perHrSalary;
|
||||
echo number_format($OTSalary, 2);
|
||||
$totalovertimeamounts[] = $OTSalary;
|
||||
$totalOTsalary[] = $OTSalary;
|
||||
|
||||
?>
|
||||
</td>
|
||||
@ -292,15 +292,21 @@
|
||||
<tr>
|
||||
<th style=" background-color: #ffffff;"></th>
|
||||
<th style=" background-color: #ffffff;"></th>
|
||||
<th style=" background-color: #ffffff;"></th>
|
||||
<th>Total</th>
|
||||
<th style=" background-color: #ffffff;"></th>
|
||||
<th style=" background-color: #ffffff;"></th>
|
||||
<th style=" background-color: #ffffff;color: #000000;">Total</th>
|
||||
<th style="text-align:right;">
|
||||
<?php echo isset($totalovertimehrs) ? number_format(array_sum($totalovertimehrs), 2) : ''; ?>
|
||||
<?php echo isset($totalsalary) ? number_format(array_sum($totalsalary), 2) : ''; ?>
|
||||
</th>
|
||||
<th style="text-align:right;">
|
||||
<?php echo isset($totalovertimeamounts) ? number_format(array_sum($totalovertimeamounts), 2) : ''; ?>
|
||||
<?php echo isset($totalperdaySalary) ? number_format(array_sum($totalperdaySalary), 2) : ''; ?>
|
||||
</th>
|
||||
<th style="text-align:right;">
|
||||
<?php echo isset($totalperhrSalary) ? number_format(array_sum($totalperhrSalary), 2) : ''; ?>
|
||||
</th>
|
||||
<th style="text-align:right;">
|
||||
<?php echo isset($totalOThrs) ? number_format(array_sum($totalOThrs), 2) : ''; ?>
|
||||
</th>
|
||||
<th style="text-align:right;">
|
||||
<?php echo isset($totalOTsalary) ? number_format(array_sum($totalOTsalary), 2) : ''; ?>
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
@ -1212,9 +1212,9 @@
|
||||
if (typeof item.MasterFile == 'string') {
|
||||
if (item.MasterFile !== null && item.MasterFile !== undefined && item.MasterFile.trim() !== "") {
|
||||
modal.find('#MasterFileLabel a').attr('href', '<?php echo base_url() ?>' + 'public/uploads/Igrfiles/' + item.MasterFile);
|
||||
modal.find('#MasterFileLabel a').attr('title', 'previously uploaded IGR Master File');
|
||||
modal.find('#MasterFileLabel a').attr('title', 'Previous Upload IGR Master File');
|
||||
modal.find('#MasterFileLabel a').attr('target', '_blank');
|
||||
modal.find('#MasterFileLabel a span').text('previously uploaded - ');
|
||||
modal.find('#MasterFileLabel a span').text('Previous Upload - ');
|
||||
modal.find('#MasterFileLabel a small').text(item.MasterFile);
|
||||
modal.find('#MasterFileLabel').show();
|
||||
}
|
||||
@ -1809,10 +1809,10 @@
|
||||
modal.find('#WeightFileLabel').hide();
|
||||
console.log(typeof fileName);
|
||||
if (fileName !== 'null' && fileName !== undefined && fileName.trim() !== "") {
|
||||
modal.find('#WeightFileLabel a').attr('title', 'previously uploaded IGR Weight File');
|
||||
modal.find('#WeightFileLabel a').attr('title', 'Previous Upload IGR Weight File');
|
||||
modal.find('#WeightFileLabel a').attr('href', '<?php echo base_url() ?>' + 'public/uploads/Igrfiles/' + fileName);
|
||||
modal.find('#WeightFileLabel a').attr('target', '_blank');
|
||||
modal.find('#WeightFileLabel a span').text('previously uploaded - ');
|
||||
modal.find('#WeightFileLabel a span').text('Previous Upload - ');
|
||||
modal.find('#WeightFileLabel a small').text(fileName);
|
||||
modal.find('#WeightFileLabel').show();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user