168 lines
5.9 KiB
PHP
Executable File
168 lines
5.9 KiB
PHP
Executable File
<script src="<?php echo base_url() ?>public/assets/tabletoexport/jquery.tableexport.v2.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
|
|
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
|
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
|
<style type="text/css">
|
|
.num {
|
|
text-align: right;
|
|
}
|
|
</style>
|
|
<style>
|
|
.dataTables_empty {
|
|
text-align: center !important;
|
|
}
|
|
</style>
|
|
|
|
<div class="content-page">
|
|
<div class="content">
|
|
<!-- Start Content-->
|
|
<div class="container-fluid">
|
|
<!-- start page title -->
|
|
<div>
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<div class="page-title-box page-title-box-alt">
|
|
<div class="page-title-right">
|
|
<ol class="breadcrumb mt-2 mb-2.5">
|
|
<li class="breadcrumb-item"><a href="javascript: void(0);">HR</a></li>
|
|
<li class="breadcrumb-item"><a href="javascript: void(0);">Leave</a></li>
|
|
<li class="breadcrumb-item active">
|
|
<h4 class="page-title">
|
|
<center>Leave Report <?php if (!empty($selectedfiscalyears)) {
|
|
echo " ( " . $selectedfiscalyears . " )";
|
|
} ?></center>
|
|
</h4>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<form action="<?php echo base_url() ?>leavereports" method="POST" id="searchList">
|
|
<div class="row" style="padding: 18px 26px;">
|
|
<div class="col-md-3" style="margin: 10px 0px;">
|
|
<?php if (!empty($fiscalyears)) {
|
|
foreach ($fiscalyears as $fy):
|
|
$options[$fy] = $fy;
|
|
endforeach;
|
|
}
|
|
echo form_dropdown('fyr', $options, set_value('fyr', $selectedfiscalyears), 'id="fyr"', 'class="form-control select2"'); ?>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<input type="button" value="View Report" class="btn btn-success" id="report">
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<div class="card-body">
|
|
<table id="leavelistings" class="table dt-responsive nowrap w-100">
|
|
<thead>
|
|
<tr>
|
|
<th>S.No</th>
|
|
<th>Employee Name</th>
|
|
<!-- <th>Total Work in Days</th> -->
|
|
<th>Leave Taken</th>
|
|
<th>Paid Leave Taken</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$base = base_url();
|
|
if (!empty($leaverecords)) {
|
|
$index = 0;
|
|
foreach ($leaverecords as $rec) {
|
|
$index++;
|
|
?>
|
|
<tr>
|
|
<td><?php echo $index; ?></td>
|
|
<?php if ((int)$rec->NoofAbsentDays != 0) { ?>
|
|
<td><?php echo '<a title="View Monthwise Details" href="' . $base . 'leavemonthlyreports/' . $rec->EmpID . '/' . $selectedfiscalyears . '">' . $rec->EmpID . '-' . $rec->FullName . '</a>'; ?></td>
|
|
<?php } else { ?>
|
|
<td><?php echo $rec->EmpID . '-' . $rec->FullName; ?></td>
|
|
<?php } ?>
|
|
|
|
<!-- <td style="text-align:right;"><?php // if (!empty($rec->NoofWorkedDays)) { echo number_format((int)$rec->NoofWorkedDays, 0, '.', ''); } else { echo "0"; }
|
|
?></td> -->
|
|
<td style="text-align:left;"><?php if (!empty($rec->NoofAbsentDays)) {
|
|
echo number_format((int)$rec->NoofAbsentDays, 0, '.', '');
|
|
} else {
|
|
echo "0";
|
|
} ?></td>
|
|
<td style="text-align:left;"><?php if (!empty($rec->NoofPaidLeaveDays)) {
|
|
echo number_format((int)$rec->NoofPaidLeaveDays, 0, '.', '');
|
|
} else {
|
|
echo "0";
|
|
} ?></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
} // else {
|
|
?>
|
|
<!-- <tr>
|
|
<td colspan="4" style="text-align:center;">No data found</td>
|
|
</tr> -->
|
|
<?php
|
|
// }
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div> <!-- end card body-->
|
|
</div> <!-- end card -->
|
|
</div><!-- end col-->
|
|
</div>
|
|
</div>
|
|
</div> <!-- container -->
|
|
</div> <!-- content -->
|
|
</div>
|
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
$('#leavelistings').DataTable({
|
|
"paging": true,
|
|
"lengthChange": true,
|
|
"searching": true,
|
|
"ordering": true,
|
|
"aaSorting": [
|
|
[0, "asc"]
|
|
],
|
|
"info": true,
|
|
"autoWidth": true,
|
|
"language": {
|
|
"emptyTable": "No data found"
|
|
}
|
|
});
|
|
});
|
|
$('#report').click(function() {
|
|
$("#searchList").submit();
|
|
});
|
|
|
|
$(document).ready(function() {
|
|
$('#fyr').addClass('form-control');
|
|
})
|
|
|
|
</script>
|
|
<script type="text/javascript">
|
|
// var name = "<?php // echo 'Leave Report for ' . $selectedfiscalyears;
|
|
?>";
|
|
// $("#leavelistings").tableExport({
|
|
// bootstrap: true,
|
|
// separator: ",",
|
|
// headings: true,
|
|
// buttonContent: "Export",
|
|
// addClass: "",
|
|
// defaultClass: "btn",
|
|
// defaultTheme: "btn-default",
|
|
// type: "csv",
|
|
// fileName: name,
|
|
// position: "bottom",
|
|
// stripQuotes: true
|
|
// });
|
|
</script>
|