188 lines
8.7 KiB
PHP
Executable File
188 lines
8.7 KiB
PHP
Executable File
<script src="<?php echo base_url() ?>public/assets/tabletoexport/jquery.tableexport.v2.js"></script>
|
|
<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></center>
|
|
</h1>
|
|
</section>
|
|
<section class="content" id="content">
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<div class="box">
|
|
<div class="box-body">
|
|
<table id="" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
|
<thead style="background-color: #ddd;">
|
|
<tr>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div><!-- /.box-body -->
|
|
</div><!-- /.box -->
|
|
</div><!-- /. col-xs-12 -->
|
|
</div><!-- /.inital row -->
|
|
</section><!-- /.content section closed -->
|
|
</div><!-- /.content wrapper -->
|
|
|
|
|
|
<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">
|
|
<h4 class="page-title">
|
|
<center><strong>" <?php echo $MonthwiseReport[0]->EmpID ?> - <?php echo $MonthwiseReport[0]->FullName ?> "</strong> - Monthwise Leave Reports <?= ' ( ' . $finyear . ' )' ?></center>
|
|
</h4>
|
|
</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">
|
|
|
|
</div>
|
|
</form>
|
|
<div class="card-body">
|
|
<table id="leavelistingss" class="table dt-responsive nowrap w-100 ria_data_table">
|
|
<thead>
|
|
<tr>
|
|
<th>S.No</th>
|
|
<th>Employee Id</th>
|
|
<th>Employee Name</th>
|
|
<th>Month Year</th>
|
|
<!-- <th>Total Work in Days</th> -->
|
|
<th>Leave Taken</th>
|
|
<th>Paid Leave Taken</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$index = 0;
|
|
if (!empty($MonthwiseReport)) {
|
|
foreach ($MonthwiseReport as $record) {
|
|
$index++;
|
|
?>
|
|
<tr>
|
|
|
|
<td style="text-align:left;"><?php echo $index; ?></td>
|
|
<td style="text-align:left;"><?php echo $record->EmpID ?></td>
|
|
<td><?php echo $record->FullName ?></td>
|
|
<td><?php
|
|
$split_val = explode('-', $record->Month_Year);
|
|
$year_val = $split_val[0];
|
|
$month_val = $split_val[1];
|
|
$monthName = date("M", mktime(0, 0, 0, $month_val, 10));
|
|
echo $monthName . " , " . $year_val
|
|
?></td>
|
|
<!-- <td style="text-align:right;"><?php // if (!empty($record->NoofWorkedDays)) { echo number_format((int)$record->NoofWorkedDays, 0, '.', ''); } else { echo "0"; }
|
|
?></td> -->
|
|
<td style="text-align:left;"><?php if (!empty($record->NoofAbsentDays)) {
|
|
echo number_format((int)$record->NoofAbsentDays, 0, '.', '');
|
|
} else {
|
|
echo "0";
|
|
} ?></td>
|
|
<td style="text-align:left;"><?php if (!empty($record->NoofPaidLeaveDays)) {
|
|
echo number_format((int)$record->NoofPaidLeaveDays, 0, '.', '');
|
|
} else {
|
|
echo "0";
|
|
} ?></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">
|
|
/*-----------------on ready function ------------------------------- */
|
|
$(function() {
|
|
/*-----------------for data table ------------------------------ */
|
|
var t = $('#leavelistings').DataTable({
|
|
"columnDefs": [{
|
|
"searchable": false,
|
|
"orderable": false,
|
|
"targets": 0
|
|
}],
|
|
"searching": true,
|
|
"lengthChange": true,
|
|
"info": true,
|
|
"paging": true,
|
|
"autoWidth": true,
|
|
"language": {
|
|
"emptyTable": "No data found"
|
|
},
|
|
"order": [
|
|
[0, 'asc']
|
|
]
|
|
});
|
|
/**---------------for table index value using datatable -------- */
|
|
t.on('order.dt search.dt', function() {
|
|
t.column(0, {
|
|
search: 'applied',
|
|
order: 'applied'
|
|
}).nodes().each(function(cell, i) {
|
|
cell.innerHTML = i + 1;
|
|
});
|
|
}).draw();
|
|
});
|
|
|
|
$("#report").click(function() {
|
|
|
|
$("#formid").attr("method", "post");
|
|
|
|
$("#formid").attr("action", "<?php echo base_url() ?>payslip/Bonusreport");
|
|
|
|
$('#formid').submit();
|
|
|
|
|
|
});
|
|
|
|
/*-----------------for export execl button------------------------------- */
|
|
var employee = "<?php echo $MonthwiseReport[0]->EmpID ?> - <?php echo $MonthwiseReport[0]->FullName ?>";
|
|
var fin_year = "<?php echo $finyear ?>";
|
|
var name = "<?php echo 'Leave Month Report for ' . $MonthwiseReport[0]->EmpID . '' . $MonthwiseReport[0]->FullName . ' ( ' . $finyear . ' )' ?>";
|
|
$("#leavelistings").tableExport({
|
|
bootstrap: true,
|
|
separator: ",",
|
|
headings: true,
|
|
buttonContent: "Export",
|
|
addClass: "",
|
|
defaultClass: "btn",
|
|
defaultTheme: "btn-default",
|
|
type: "csv",
|
|
fileName: name,
|
|
position: "bottom",
|
|
stripQuotes: true
|
|
});
|
|
</script>
|