142 lines
5.0 KiB
PHP
142 lines
5.0 KiB
PHP
|
|
<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-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<section class="content-header">
|
|
<h1>
|
|
<center>Leave Report <?php if(!empty($selectedfiscalyears)) {echo " ( ". $selectedfiscalyears." )";} ?></center>
|
|
</h1>
|
|
</section>
|
|
<section class="content">
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<div class="box">
|
|
<div class="box-header">
|
|
<div class="row">
|
|
<form action="<?php echo base_url() ?>leavereports" method="POST" id="searchList">
|
|
|
|
<div class="col-md-3">
|
|
<?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>
|
|
</form>
|
|
<br>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="box-body">
|
|
<table id="leavelistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
|
<thead style="background-color: #ddd;">
|
|
<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:right;"><?php if (!empty($rec->NoofAbsentDays)) { echo number_format((int)$rec->NoofAbsentDays, 0, '.', ''); } else { echo "0"; } ?></td>
|
|
<td style="text-align:right;"><?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><!-- /.box-body -->
|
|
</div><!-- /.box -->
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</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();
|
|
});
|
|
</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>
|
|
|