siddharth_application/application/controllers/cashbookyearlyexpenses.php
2021-04-23 12:07:34 +05:30

178 lines
5.4 KiB
PHP

<?php
$inrsymbol='';
$finyear ='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<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">
<div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>YEAR REPORTS(<?php echo $finyear?>)</b></p></h3></center>
</div>
<div class="col-xs-12 col-md-6 col-md-offset-6">
<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 Year</option>
<?php
foreach($financialyear 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 class="btn-group btn-group-justified no-margin">
<table class="table table-bordered table-hover" id="req"style="font-size:13px;">
<thead>
<tr>
<th>Month</th>
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Total <?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php
$ti=0.00;
$tvt=0.00;
if(!empty($yearlyreport)){
foreach($yearlyreport as $yr)
{
?>
<tr>
<!--<td><span><?php echo $yr->date?></span></td>-->
<td align="left"><a href="<?= base_url() ?>report/yearmonthwise?sid=<?php echo $yr->month;?>"><span><?php echo $yr->month?></span></a></td>
<!--<td align="left"><span><?php echo $yr->type?></span></td>-->
<td align="right"><span><?php
$ti= $ti + number_format($yr->inc,2,'.','');
echo number_format($yr->inc,2,'.','');?></span></td>
<td align="right"><span><?php
$tvt= $tvt + number_format($yr->exp,2,'.','');
echo number_format($yr->exp,2,'.','');?></span></td>
<td align="right"><span><?php echo number_format($yr->total,2,'.','');?></span></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<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 = $('#req').DataTable( {
"dom": "<'row'<'col-md-3'l><'col-md-9'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: 'CASHBOOK REPORT- YEAR(2017-2018)',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>