siddharth_application/application/views/Report_costcenter.php
2023-05-30 18:45:55 +05:30

192 lines
5.4 KiB
PHP

<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
.buttons-text {
background-color: blue;
color: white;
}
select {
width: 100%;
padding: 3%;
}
.btn-success {
background-color: #3c8dbc;
border-color: #3c8dbc;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="row" style="min-height: 600px;">
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<div class="box-header with-border">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cost Center</b><br><br>
<?php
if($this->input->post('financialyear')){
$ab=$this->input->post('financialyear');
echo '('.$ab.')';
}
?></p></h3></center>
<div class="col-xs-12 col-md-4 col-md-offset-4">
<center>
<div class="panel-body">
<form method="post" action=" ">
<div class="col-md-8">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Budget Year</option>
<?php
foreach($finyear as $item):
{?>
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
<?php } endforeach; ?>
</select>
</div>
<div class="col-md-2">
<input type="submit" class="btn btn-success" id="year" name="btn_submit"
value="View Report">
</div>
</form>
</div>
</center>
</div>
</div>
<!-- /.box-header -->
<div class="box-body">
<div>
<table class="table table-bordered table-hover" id="cc" style="font-size:12px;">
<thead>
<tr>
<th>Cost Center Code</th>
<th>Cost Center Name </th>
<th>Department</th>
<th>Budget Type</th>
<th>Budget Year</th>
<th>Utilized Amount &nbsp;(&#8377;)</th>
<th>Balance Amount &nbsp;(&#8377;)</th>
</tr>
</thead>
<tbody>
<?php if(!empty($ccrpt)){
foreach($ccrpt as $rel)
{
?>
<tr>
<td><span><?php echo $rel->Cost_Center_Code?></span></td>
<td><span><?php echo $rel->Cost_Center_Name?></span></td>
<td><span><?php echo $rel->Dept_Name?></span></td>
<td><span><?php echo $rel->BudgetType?></span></td>
<td><span><?php echo $rel->BudgetYear?></span></td>
<td align="right"><span><?php echo number_format($rel->Util_Amount,2,'.','')?></span></td>
<td align="right"><span><?php echo number_format($rel->Avlbl_Amt,2,'.','')?></span></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#cc').DataTable( {
"language": {
"emptyTable":"<center> Data Not Found ! </center>"
},
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
function Reset()
{
$('#mySelect').val('');
}
</script>