220 lines
7.3 KiB
PHP
Executable File
220 lines
7.3 KiB
PHP
Executable File
<?php
|
|
$inrsymbol='';
|
|
$finyear ='';
|
|
$ti=0.00;
|
|
$tvt=0.00;
|
|
$in=0.00;
|
|
$payamt=0.00;
|
|
$recamt = 0.00;
|
|
$zero=0.00;
|
|
$curr_balances=0.00;
|
|
//print_r($fyears);
|
|
|
|
if(!empty($Indiancurrency))
|
|
{
|
|
foreach ($Indiancurrency as $inr)
|
|
{
|
|
$inrsymbol = $inr->FontCode2000;
|
|
}}
|
|
|
|
|
|
if(!empty($b4finyeartotal)){
|
|
foreach ($b4finyeartotal as $prevttl)
|
|
{
|
|
//$payamt = $b4finyeartotal[0]->payment_amt;
|
|
//$recamt = $b4finyeartotal[0]->receipt_amt;
|
|
$payamt = $prevttl->payment_amt;
|
|
$recamt = $prevttl->receipt_amt;
|
|
}}
|
|
|
|
|
|
?>
|
|
|
|
<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 {
|
|
font-size: 15px;
|
|
position: relative;
|
|
float: right;
|
|
|
|
}
|
|
.btn-success {
|
|
background-color: #3c8dbc;
|
|
border-color: #3c8dbc;
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
<div class="content-wrapper">
|
|
<section class="content">
|
|
<div class="box">
|
|
<div class="container-fluid">
|
|
<div class="box-header">
|
|
|
|
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Year Report <?php if(!empty ($fyears) ){
|
|
echo '('.$fyears.')'; }
|
|
else { echo ''; }//echo $finyear?></b></p></h3></center>
|
|
|
|
<!-- <center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report <?php if($monthyr != ''){ echo '('.$monthName.'-'.$yearNum.')'; } else { echo ''; }//<?php ($month=date('F');echo $month;)?></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="<?php echo base_url() ?>report/yearexpenses">
|
|
<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="yearly" name="btn_submit" value="View Report">
|
|
</div>
|
|
</form>
|
|
<!-- </div> -->
|
|
</center>
|
|
</div>
|
|
|
|
<div class="col-md-12">
|
|
<div class="box-body">
|
|
<div>
|
|
<table id="yearlypayment" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
|
<thead style="background-color:#ddf">
|
|
<tr>
|
|
<th>Month</th>
|
|
<th style="text-align:right;"> Receipt (<i class="fa fa-rupee ">)</th>
|
|
<th style="text-align:right;"> Payment (<i class="fa fa-rupee ">)</th>
|
|
<th>Current Balances (<i class="fa fa-rupee ">)</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<tr>
|
|
<td style="text-align:left;"><strong>Previous Year Balance(opening balances)</strong></td>
|
|
<?php $in = $recamt-$payamt;?>
|
|
<td style="text-align:right"><strong><?php echo number_format($in,2,'.','') ?></strong></td>
|
|
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
|
<td></td>
|
|
|
|
</tr>
|
|
<?php
|
|
if(!empty($yearlyreport)){
|
|
foreach($yearlyreport as $yr)
|
|
{
|
|
?>
|
|
<tr>
|
|
|
|
<td align="left"><a href="<?= base_url() ?>report/yearmonthwise?sid=<?php echo $yr->month;?>"><span><?php echo $yr->month?></span></a></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($in+$ti-$tvt,2,'.',''); ?></span></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
|
|
}
|
|
?>
|
|
<tr>
|
|
<td style="text-align:left;"><strong>Total</strong></td>
|
|
<td style="text-align:right"><strong> <?php echo number_format($ti,2,'.','');?> </strong> </td>
|
|
<td style="text-align:right"><strong> <?php echo number_format($tvt,2,'.','');?> </strong> </td>
|
|
<td style="text-align:right"><strong><?php $curr_balances = $in+$ti-$tvt; echo number_format($curr_balances,2,'.','');?></strong></td>
|
|
</tr>
|
|
</tbody>
|
|
<tfoot width="100%">
|
|
<tr>
|
|
<td style="text-align:left;"><strong>Current Year Closing Balances</strong></td>
|
|
<td style="text-align:right"><strong><?php echo number_format($curr_balances,2,'.','');?></strong></td>
|
|
<td style="text-align:right"><strong><?php echo number_format($zero,2,'.','');?></strong></td>
|
|
<td> </td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div><!-- content-wrapper -->
|
|
|
|
|
|
<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 = $('#yearlypayment').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>>",
|
|
"bSort": false,
|
|
buttons: [
|
|
|
|
{
|
|
extend: 'excelHtml5',
|
|
footer: 'true',
|
|
//messageTop: $('h3').text(),
|
|
title: $('h3').text(),
|
|
exportOptions: {
|
|
columns: ':visible'
|
|
|
|
}
|
|
},
|
|
|
|
'colvis'
|
|
]
|
|
|
|
} );
|
|
<?php if(!empty ($fyears) ){ ?>
|
|
$('#financialyear option[value="<?php echo $fyears ?>"]').attr("selected", "selected");
|
|
<?php } ?>
|
|
} );
|
|
|
|
$('#yearly').click(function() {
|
|
if($("option:selected", $("#financialyear")).val() == " ")
|
|
{
|
|
alert('Please Select/Choose Financial year ');
|
|
$("#financialyear").focus();
|
|
return false;
|
|
}
|
|
//alert('finished');
|
|
});
|
|
//
|
|
|
|
</script>
|
|
|