99 lines
3.8 KiB
PHP
99 lines
3.8 KiB
PHP
|
|
<div class="content-wrapper">
|
|
|
|
<section class="content">
|
|
<div class="box">
|
|
<div class="box-header">
|
|
<CENTER><h3 class="box-title"> Cost Details</h3></CENTER>
|
|
</div>
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-xs-12 text-right">
|
|
<div class="form-group">
|
|
<a class="btn btn-success" href="<?php echo base_url(); ?>addCostCenter">Add New Cost List</a>
|
|
<a class="btn btn-success" href="<?php echo base_url(); ?>exportcost">Export Cost Details <i class="fa fa-download"aira-hidden="true"></i></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
|
|
<thead style="background-color: #ddd;">
|
|
<tr>
|
|
<th>Cost Center Code</th>
|
|
<th>Cost Center Name</th>
|
|
<th>Created By</th>
|
|
<th>Create Date</th>
|
|
<th>Active</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
if(!empty($userRecords))
|
|
{
|
|
foreach($userRecords as $record)
|
|
{
|
|
?>
|
|
<tr>
|
|
<td><?php echo $record->code ?></td>
|
|
<td><?php echo $record->CostCenterName ?></td>
|
|
<!-- <td><?php echo $record->ApprovedBy ?></td> -->
|
|
<td><?php echo $record->FirstName ?></td>
|
|
<td align="right"><?php
|
|
$date = new DateTime($record->CreatedDate);
|
|
echo $date->format('d-m-Y'); ?></td>
|
|
|
|
<td><?php
|
|
$R='';
|
|
$record->IsActive == 1?$R='ACTIVE':$R='INACTIVE';
|
|
echo $R;
|
|
?></td>
|
|
<td>
|
|
<?php
|
|
if($record->DeletedBy == ''){
|
|
?>
|
|
<a href="<?php echo base_url().'editCostCenter?CostCode='.$record->code; ?>"><i class="fa fa-pencil"></i> </a>
|
|
<a href="<?php echo base_url().'deleteCostCenter?CostCode='.$record->code; ?>"><i class="fa fa-trash"></i> </a>
|
|
|
|
<!-- <a href="<?php echo base_url().'CostCenter/viewcost?CostCode='.$record->code; ?>"><i class="fa fa-eye"></i> </a> -->
|
|
<?php } ?>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
|
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
|
$('#datatable').DataTable({
|
|
"paging": true,
|
|
"lengthChange": true,
|
|
"searching": true,
|
|
"ordering": true,
|
|
// "columnDefs" : [{"targets":3, "type":"date-eu"}],
|
|
"aaSorting": [[ 3, "desc" ]],
|
|
"info": true,
|
|
"autoWidth": true
|
|
|
|
});
|
|
});
|
|
|
|
</script>
|
|
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->
|
|
|