352 lines
12 KiB
PHP
352 lines
12 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;
|
|
}
|
|
th, td { white-space: nowrap; }
|
|
.dataTable > thead > tr > th[class*="sort"]:after{
|
|
content: "" !important;
|
|
}
|
|
|
|
table.dataTable thead > tr > th.sorting_asc,
|
|
table.dataTable thead > tr > th.sorting_desc,
|
|
table.dataTable thead > tr > th.sorting,
|
|
table.dataTable thead > tr > td.sorting_asc,
|
|
table.dataTable thead > tr > td.sorting_desc,
|
|
table.dataTable thead > tr > td.sorting {
|
|
padding-right: inherit;
|
|
}
|
|
|
|
|
|
</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 - Monthly GST</b>
|
|
<br><br>
|
|
<?php
|
|
|
|
if($this->input->post('month')){
|
|
$m=$this->input->post('month');
|
|
echo '('.$m.')';
|
|
echo ' ';
|
|
}
|
|
if($this->input->post('from_date') && $this->input->post('to_date')){
|
|
$frm = $this->input->post('from_date');
|
|
$t = $this->input->post('to_date');
|
|
echo $frm.'-to-'.$t;
|
|
}
|
|
|
|
?>
|
|
</p></h3></center>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
|
|
<div class="panel-body">
|
|
|
|
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
|
|
|
<div class="form-group has-feedback">
|
|
<div class="col-md-4">
|
|
<label for="from_date">
|
|
<?php echo 'From Date'; ?>
|
|
</label>
|
|
<div class="input-group">
|
|
<input name="from_date" id="max-date" class="form-control datepicker">
|
|
<span class="input-group-addon">
|
|
<i class="fa fa-calendar fa-fw"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-md-4">
|
|
<label for="to_date">
|
|
<?php echo 'To Date'; ?>
|
|
</label>
|
|
<div class="input-group">
|
|
<input name="to_date" id="min-date" class="form-control datepicker">
|
|
<span class="input-group-addon">
|
|
<i class="fa fa-calendar fa-fw"></i>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label for="to_date">
|
|
<?php echo 'Month'; ?>
|
|
</label>
|
|
<div class="input-group">
|
|
<select class="form-control" id="month" name="month">
|
|
<option value="">Select Month</option>
|
|
<option value="January">January</option>
|
|
<option value="February">February</option>
|
|
<option value="March">March</option>
|
|
<option value="April">April</option>
|
|
<option value="May">May</option>
|
|
<option value="June">June</option>
|
|
<option value="July">July</option>
|
|
<option value="August">August</option>
|
|
<option value="September">September</option>
|
|
<option value="October">October</option>
|
|
<option value="November">November</option>
|
|
<option value="December">December</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2"><br><br>
|
|
<input type="submit" class="btn btn-success" name="btn_submit" style="margin-top: -14px;margin-bottom: 28px;"
|
|
value="View Report">
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="box-body">
|
|
<div class = "table-responsive">
|
|
<center><table class="table table-bordered" id="cc" width="70%" style="font-size:12px !important;">
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align:center">Name</th>
|
|
<th style="text-align:center">Sales (<i class="fa fa-rupee " ></i>)</th>
|
|
<th style="text-align:center">Purchase (<i class="fa fa-rupee " ></i>)</th>
|
|
<th style="text-align:center">Net (<i class="fa fa-rupee "></i>)</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$m=$this->input->post('month');
|
|
$frm=$this->input->post('from_date');
|
|
$t=$this->input->post('to_date');
|
|
if(!empty($monthly_gst_purchase) and !empty($monthly_gst_sales)){ ?>
|
|
|
|
<tr>
|
|
<td style="text-align:center"><span>SGST</span></td>
|
|
<td style="text-align:right"><span><?php
|
|
echo round($monthly_gst_sales[0]->sgst,2);?></span></td>
|
|
<td style="text-align:right"><span><?php
|
|
echo round($monthly_gst_purchase[0]->sgst,2);?></span></td>
|
|
<td style="text-align:right"><span><?php
|
|
$sgst_net = $monthly_gst_sales[0]->sgst - $monthly_gst_purchase[0]->sgst;
|
|
echo round($sgst_net,2);?></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="text-align:center"><span>CGST</span></td>
|
|
<td style="text-align:right"><span><?php
|
|
echo round($monthly_gst_sales[0]->cgst,2);?></span></td>
|
|
<td style="text-align:right"><span><?php
|
|
echo round($monthly_gst_purchase[0]->cgst,2);?></span></td>
|
|
<td style="text-align:right"><span><?php
|
|
$cgst_net = $monthly_gst_sales[0]->cgst - $monthly_gst_purchase[0]->cgst;
|
|
echo round($cgst_net,2);?></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="text-align:center"><span>IGST</span></td>
|
|
<td style="text-align:right"><span><?php
|
|
echo round($monthly_gst_sales[0]->igst,2);?></span></td>
|
|
<td style="text-align:right"><span><?php
|
|
echo round($monthly_gst_purchase[0]->igst,2);?></span></td>
|
|
<td style="text-align:right"><span><?php
|
|
$igst_net = $monthly_gst_sales[0]->igst - $monthly_gst_purchase[0]->igst;
|
|
echo round($igst_net,2);?></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="text-align:center"><span>Total GST</span></td>
|
|
<td style="text-align:right"><span><?php
|
|
echo round($monthly_gst_sales[0]->total,2);?></span></td>
|
|
<td style="text-align:right"><span><?php
|
|
echo round($monthly_gst_purchase[0]->total,2);?></span></td>
|
|
<td style="text-align:right"><span><?php
|
|
$total_net = $monthly_gst_sales[0]->total - $monthly_gst_purchase[0]->total;
|
|
echo round($total_net,2);?></span></td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
<tfoot width="100%">
|
|
<!--<tr>
|
|
<td style="text-align:center;"><strong>Total</strong></td>
|
|
|
|
<td class="amount" style="text-align:right">
|
|
<strong>
|
|
// <?php
|
|
// {
|
|
// echo number_format($tot_pac,2,'.','');
|
|
|
|
// }
|
|
|
|
// ?>
|
|
</strong></td>
|
|
<td class="amount" style="text-align:right">
|
|
<strong>
|
|
// <?php
|
|
// {
|
|
// echo number_format($tot_inc,2,'.','');
|
|
|
|
// }
|
|
|
|
// ?>
|
|
</strong></td>
|
|
<td class="amount" style="text-align:right">
|
|
<strong>
|
|
// <?php
|
|
// {
|
|
// echo number_format($tot_tot,2,'.','');
|
|
|
|
// }
|
|
|
|
// ?>
|
|
</strong></td>
|
|
|
|
|
|
|
|
</tr>-->
|
|
|
|
</tfoot>
|
|
|
|
</table></center>
|
|
<div class="col-md-2" style="float: right;">
|
|
<form>
|
|
<a href="<?= base_url() ?>report/monthly_gst_table?m=<?php echo $m;?>&frm=<?php echo $frm;?>&t=<?php echo $t;?>"><input style="width: 100px; padding: 10px; cursor: pointer; box-shadow: 6px 6px 5px; #999; -webkit-box-shadow: 6px 6px 5px #999; -moz-box-shadow: 6px 6px 5px #999; font-weight: bold; background: #3c8dbc; color: #000; border-radius: 10px; border: 1px solid #999; font-size: 100%;" type="button" value="View details"/></a>
|
|
</form>
|
|
|
|
</div>
|
|
</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>>",
|
|
"paging": false,
|
|
"lengthChange": false,
|
|
"searching": false,
|
|
"ordering": false,
|
|
"info": false,
|
|
buttons: [
|
|
|
|
{
|
|
extend: 'excelHtml5',
|
|
footer: 'true',
|
|
//messageTop: 'Report Monthly GST',
|
|
title: $('h3').text(),
|
|
exportOptions: {
|
|
columns: ':visible'
|
|
|
|
}
|
|
},
|
|
|
|
'colvis'
|
|
]
|
|
} );
|
|
} );
|
|
$('#mySelect').on('change',function(){
|
|
|
|
table
|
|
.column(4)
|
|
.search(this.value)
|
|
.draw();
|
|
});
|
|
|
|
$( 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('');
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|