siddharth_application/application/views/Report_monthly_gst_table.php
2018-06-08 20:32:04 +05:30

324 lines
9.2 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;
}
.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>Monthly GST Summary Report</b><br><br>
</p></h3></center>
</div>
<!-- /.box-header -->
<div class="box-body">
<div>
<table class="table table-bordered table-hover" id="cc" >
<thead>
<tr>
<th style="text-align:center">Date</th>
<th style="text-align:center">Document Number</th>
<th style="text-align:center">Document Type</th>
<th style="text-align:center">HSN CODE</th>
<th style="text-align:center">Value &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center">Others &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center">SGST &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center">CGST &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center">IGST &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center">Total &nbsp;(<i class="fa fa-rupee "></i>)</th>
</tr>
</thead>
<tbody>
<?php
$tot_val = 0;
$tot_oth = 0;
$tot_sgst = 0;
$tot_cgst = 0;
$tot_igst = 0;
$tot_tot = 0;
if(!empty($monthly_gst_purchase)){
foreach($monthly_gst_purchase as $rel)
{
?>
<tr>
<td style="text-align:center"><span><?php echo $rel->date;?></span></td>
<td style="text-align:center"><span><?php echo $rel->doc_no;?></span></td>
<td style="text-align:center"><span><?php echo $rel->doc_type;?></span></td>
<td style="text-align:center"><span><?php echo $rel->hsn_code;?></span></td>
<td style="text-align:right"><span><?php
$tot_val= $tot_val + round($rel->value,2);
echo $rel->value;
?></span></td>
<td style="text-align:right"><span><?php
$tot_oth= $tot_oth + round($rel->others,2);
echo $rel->others;
?></span></td>
<td style="text-align:right"><span><?php
$tot_sgst= $tot_sgst + round($rel->sgst,2);
echo $rel->sgst;
?></span></td>
<td style="text-align:right"><span><?php
$tot_cgst= $tot_cgst + round($rel->cgst,2);
echo $rel->cgst;
?></span></td>
<td style="text-align:right"><span><?php
$tot_igst= $tot_igst + round($rel->igst,2);
echo $rel->igst;
?></span></td>
<td style="text-align:right"><span><?php
$tot_tot= $tot_tot + round($rel->total,2);
echo $rel->total;
?></span></td>
</tr>
<?php
}
}
if(!empty($monthly_gst_sales)){
foreach($monthly_gst_sales as $rel)
{
?>
<tr>
<td style="text-align:center"><span><?php echo $rel->date;?></span></td>
<td style="text-align:center"><span><?php echo $rel->doc_no;?></span></td>
<td style="text-align:center"><span><?php echo $rel->doc_type;?></span></td>
<td style="text-align:center"><span><?php echo $rel->hsn_code;?></span></td>
<td style="text-align:right"><span><?php
$tot_val= $tot_val + round($rel->value,2);
echo round($rel->value,2);
?></span></td>
<td></td>
<td style="text-align:right"><span><?php
$tot_sgst= $tot_sgst + round($rel->sgst,2);
echo round($rel->sgst,2);
?></span></td>
<td style="text-align:right"><span><?php
$tot_cgst= $tot_cgst + round($rel->cgst,2);
echo round($rel->cgst,2);
?></span></td>
<td style="text-align:right"><span><?php
$tot_igst= $tot_igst + round($rel->igst,2);
echo round($rel->igst,2);
?></span></td>
<td style="text-align:right"><span><?php
$tot_tot= $tot_tot + round($rel->total,2);
echo round($rel->total,2);
?></span></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td><strong>&nbsp</strong></td>
<td><strong>&nbsp</strong></td>
<td><strong>&nbsp</strong></td>
<td class="amount" style="text-align:right">
<strong>
<?php
{
echo number_format($tot_val,2,'.','');
}
?>
</strong></td>
<td class="amount" style="text-align:right">
<strong>
<?php
{
echo number_format($tot_oth,2,'.','');
}
?>
</strong></td>
<td class="amount" style="text-align:right">
<strong>
<?php
{
echo number_format($tot_sgst,2,'.','');
}
?>
</strong></td>
<td class="amount" style="text-align:right">
<strong>
<?php
{
echo number_format($tot_cgst,2,'.','');
}
?>
</strong></td>
<td class="amount" style="text-align:right">
<strong>
<?php
{
echo number_format($tot_igst,2,'.','');
}
?>
</strong></td>
<td class="amount" style="text-align:right">
<strong>
<?php
{
echo number_format($tot_tot,2,'.','');
}
?>
</strong></td>
</tr>
</tfoot>
</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 src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
$.fn.dataTable.moment( 'DD-MM-YYYY' );
table = $('#cc').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',
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
$( function() {
//var dateFormat = "mm/dd/yy",
from = $( "#min-date" )
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
to.datepicker("option", "minDate", getDate( this ) );
}),
to = $( "#max-date" ).datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
from.datepicker( "option", "maxDate", getDate( this ) );
});
function getDate( element ) {
var date;
try {
date = $.datepicker.parseDate( dateFormat, element.value );
} catch( error ) {
date = null;
}
return date;
}
} );
function Reset()
{
$('#mySelect').val('');
}
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>