siddharth_application/application/views/paysliplist.php
2018-01-09 20:41:01 +05:30

146 lines
5.1 KiB
PHP
Executable File

<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">
<?php //print_r($PayInfo);
$datefordropdown = date_create($datefordropdown);
$datefordropdown = date_format($datefordropdown,'m-Y');
date_default_timezone_set('Asia/Kolkata');
?>
<style type="text/css">
.num {
text-align:right;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center>Employee Monthly Payslip </center>
</h1>
</section>
<section class="content">
<div class="row">
<div class="col-md-2">
<?php
$attributes = array('id' => 'paylist');
echo form_open('paysliplist', $attributes);
$today = date('m-Y');
$data = array('type' => 'text','name' => 'month','id' => 'month','value' => $datefordropdown,'class' => 'form-control select2');
echo form_input($data);
?>
</div>
<div class="col-md-2">
<input id="changemonth" value="Change Month" class="btn btn-primary" title='click here to view payslip Data'>
</div>
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<div class="box-tools">
</form>
</div><!--</h3></center>-->
</div><!-- /.box-header -->
<div class="box-body">
<table id="monthlylistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color:#ddf">
<tr>
<th>Month Year</th>
<th>Employee Id</th>
<th>Employee Name</th>
<th>Paid Days</th>
<th>Salary in ₹</th>
<th>Company Contribution in ₹</th>
<th>Loan Recoverd in ₹</th>
<th>Loan Balance in ₹</th>
<th>Action</th>
</tr>
</thead>
<tbody id="tbody">
<?php
if(!empty($PayInfo))
{
foreach($PayInfo as $record)
{
?>
<tr>
<td style="text-align:right;"><?php echo $record->PayOn ?></td>
<td><?php echo $record->EmpID ?></td>
<td><?php echo $record->FName ." ". $record->Lname ?></td>
<td style="text-align:right;"><?php echo ($record->NoofDaysWorked + $record->Paid_Leave) ?></td>
<td style="text-align:right;"><?php echo $record->LessAdvance ?></td>
<td style="text-align:right;"><?php echo $record->TotalCompCon ?></td>
<td style="text-align:right;"><?php if(is_numeric($record->Advance)){echo number_format($record->Advance,2,'.','');}else {echo $record->Advance;} ?></td>
<td style="text-align:right;"><?php echo $record->BalanceAdvance ?></td>
<td>
<a href="<?php echo base_url().'payslip/editPayslip/'.$record->EmpID.'/'.$record->PayOn;?>"><i class="btn btn-primary">EDIT</i></a>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div><!-- /.box-body -->
<!-- <div class="box-footer clearfix">
<?php //echo $this->pagination->create_links(); ?>
</div> -->
</div><!-- /.box -->
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
$(function () {
$("#month").datepicker({
minViewMode: 1,
format: 'mm-yyyy'
});
var dropdown = "<?php echo $dropdownvalue; ?>";
$('#month').val(dropdown);
$('#monthlylistings').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"aaSorting": [[ 0, "desc" ]],
"info": true,
"autoWidth": true
});
});
$('#changemonth').on("click", function(){
$("#paylist").attr("method", "post");
$("#paylist").attr("action", "<?php echo base_url() ?>payslip/reload_paysliplist");
$("#paylist").submit();
});
</script>