siddharth_application/application/views/cashbook_cumulative_report.php
venbatechnologies@gmail.com 2079a7598b cashbook issues fixes
2018-05-15 13:10:39 +05:30

158 lines
6.2 KiB
PHP
Executable File

<?php //print_r($datas);
if (date('m') >= 4) {
$yearl = date('Y').'-'.(date('Y')+1);
} else {
$yearl = (date('Y')-1).'-'.date('Y');
}
$ab=$yearl;
$fa=substr($ab,0,-5);
$aa=substr($ab,5,5);
?>
<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;
}
.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>Cashbook - Cumulative Report ( <?php echo $fa.'-'.$aa; ?> )</b></p></h3></center>
</div>
<!-- /.box-header -->
<div class="box-body">
<table class="table table-bordered table-hover" id="ccr" style="font-size:14px;">
<thead>
<tr>
<th style="text-align:center" rowspan="2">Account Name</th>
<th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th>
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
<th style="text-align:center" colspan="2"><?php echo $ab; ?></th>
</tr>
<tr>
<th style="text-align:center">Receipt &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center">Payment &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center">Receipt &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center">Payment &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center">Recepit &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center">Payment &nbsp;(<i class="fa fa-rupee "></i>)</th>
</tr>
</thead>
<?php
if(!empty($datas)){
$incdayttl = 0.00;
$expdayttl = 0.00;
$incmthttl = 0.00;
$expmthttl = 0.00;
$incyrttl = 0.00;
$expyrttl = 0.00;
?>
<tbody>
<?php
foreach($datas as $d)
{
?>
<tr>
<td><?php echo $d->name; ?></td>
<td><?php if(empty($d->tinc)){ echo '0';}else{$incdayttl = $incdayttl + round($d->tinc); echo number_format($d->tinc,2,'.','');} ?></td>
<td><?php if(empty($d->texp)){ echo '0';}else{$expdayttl = $expdayttl + round($d->texp); echo number_format($d->texp,2,'.','');} ?></td>
<td><?php $incmthttl = $incmthttl + round($d->minc); echo number_format($d->minc,2,'.',''); ?></td>
<td><?php $expmthttl = $expmthttl + round($d->mexp); echo number_format($d->mexp,2,'.',''); ?></td>
<td><?php $incyrttl = $incyrttl + round($d->yinc); echo number_format($d->yinc,2,'.',''); ?></td>
<td><?php $expyrttl = $expyrttl + round($d->yexp); echo number_format($d->yexp,2,'.',''); ?></td>
</tr>
<?php } ?>
</tbody>
<tfoot width="100%">
<tr>
<td><b><?php echo "TOTAL" ?></b></td>
<td><b><?php echo number_format($incdayttl,2,'.',''); ?></b></td>
<td><b><?php echo number_format($expdayttl,2,'.',''); ?></b></td>
<td><b><?php echo number_format($incmthttl,2,'.',''); ?></b></td>
<td><b><?php echo number_format($expmthttl,2,'.',''); ?></b></td>
<td><b><?php echo number_format($incyrttl,2,'.',''); ?></b></td>
<td><b><?php echo number_format($expyrttl,2,'.',''); ?></b></td>
</tr>
</tfoot>
<?php } ?>
</table>
</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 = $('#ccr').DataTable( {
"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();
});
</script>