riainvoice/application/modules/reports/views/hsn_wise.php
2021-10-01 23:34:16 +05:30

364 lines
11 KiB
PHP

<div id="headerbar">
<!-- <center> <h1><?php _trans('HSN/SAC-Report'); ?></h1> -->
<h1 class="headerbar-title"><?php _trans('HSN-Invoices'); ?></h1>
<!-- <p > <?php
if($this->input->post('financialyear')){
$ab=$this->input->post('financialyear');
echo '('.$ab.')';
echo ' ';
}
if($this->input->post('month')){
$m=$this->input->post('month');
echo '('.$m.')';
echo ' ';
}
?></p> -->
<!-- </center> -->
</div>
<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">
<div id="content">
<div class="col-xs-12 col-md-12">
<?php $this->layout->load_view('layout/alerts'); ?>
<div id="report_options" class="panel panel-default">
<a href="#" style="float:right; font-size:30px; margin-right:17px;" class="show_hide">+</a>
<div class="panel-heading">
<i class="fa fa-print"></i>
<?php _trans('report_options'); ?>
</div>
<div class="slidingDiv">
<div class="panel-body">
<form method="post" action="">
<input type="hidden" name="_ip_csrf" value="<?= $this->security->get_csrf_hash() ?>">
<div class="form-group has-feedback">
<div class="col-md-2">
<label for="to_date">
<?php _trans('Year'); ?>
</label>
<div class="input-group">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
foreach($fin as $item):
{?>
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>
<div class="col-md-2">
<label for="to_date">
<?php _trans('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" >
<label for="to_date">
<?php _trans('&nbsp;'); ?>
</label><div>
<input type="submit" class="btn btn-success" name="btn_submit"
value="View Report" onclick="JavaScript:window.location.hash = ">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6 col-md-offset-3">
<?php $this->layout->load_view('layout/alerts'); ?>
</div>
</div>
<div id="table">
<?php
if(!empty($results))
{
?>
<center><h3 class="report_title">
<?php echo trans('HSN-Invoices'); ?>
<small>&nbsp;<?php
if($this->input->post('client_name')){
$cid=$this->input->post('client_name');
echo '('.$cid.')';
}
if($this->input->post('financialyear')){
$ab=$this->input->post('financialyear');
echo '('.$ab.')';
}
if($this->input->post('month')){
$month = $this->input->post('month');
echo '('.$month.')';
}
?></small>
<small><?php
// $dmon= date('F-Y');
// echo $dmon;
if (!empty($datec))
{
$d=date("d-m-Y",strtotime($datec));
echo $d;
}?>
</small>
</h3></center>
<div class="table-responsive">
<div id="panel-recent-invoices" class="panel panel-default">
<body>
<table class="table table-striped table-condensed no-margin" id="tab">
<thead>
<tr>
<th style="text-align:center;"><?php echo trans('S.No');?></th>
<th style="text-align:center;"><?php echo trans('HSN/SAC_Code'); ?></th>
<th style="text-align:center;"><?php echo trans('Count of Invoice'); ?></th>
<th style="text-align:center;"><?php echo trans('Taxable Value'); ?></th>
<th style="text-align:center;"><?php echo trans('CGST'); ?></th>
<th style="text-align:center;"><?php echo trans('SGST'); ?></th>
<th style="text-align:center;"><?php echo trans('IGST'); ?></th>
<th style="text-align:center;"><?php echo trans('Tax Value'); ?></th>
<th style="text-align:center;"><?php echo trans('Total Invoice Value'); ?></th>
</tr>
</thead>
<tbody>
<?php
$tr0=0;
$tr1=0;
$tr2=0;
$tr3=0;
$tr4=0;
$tr5=0;
$trb=0;
$i = 0;
$ab=$this->input->post('financialyear');
$m=$this->input->post('month');
if($this->input->post('HSN_code')){
$HSN_code=$this->input->post('HSN_code');
echo '('.$HSN_code.')';
echo ' ';
}
foreach ($results as $result) { ?>
<tr>
<td style="text-align:center;"><?php echo ++$i;?></td>
<!-- <td ><?php echo ($result->HSN_code); ?></td> -->
<td style="text-align:center;">
<a href="<?= site_url() ?>/reports/hsn_san?
HSN_code=<?php echo $result->HSN_code;?> &ab=<?php echo $ab;?> &m=<?php echo $m;?> "><?php echo $result->HSN_code;?></a>
</td>
<td class="amount"><?php
$tr0= $tr0 + round($result->countofinvoice);
//echo format_currency(round($result->countofinvoice));
echo ($result->countofinvoice); ?></td>
<td class="amount"><?php
$tr1= $tr1 + round($result->item_subtotal);
echo format_currency(round($result->item_subtotal));
// echo ($result->item_subtotal); ?></td>
<td class="amount"><?php
$tr2= $tr2 + round($result->cgst);
echo format_currency(round($result->cgst));
//echo ($result->sgst); ?></td>
<td class="amount"><?php
$tr3= $tr3 + round($result->sgst);
echo format_currency(round($result->sgst));
//echo ($result->cgst); ?></td>
<td class="amount"><?php
$tr4= $tr4 + round($result->igst);
echo format_currency(round($result->igst));
//echo ($result->igst); ?></td>
<td class="amount"><?php
$tr5= $tr5 + round($result->tax_total);
echo format_currency(round($result->tax_total));
//echo ($result->tax_total); ?></td>
<td class="amount"><?php
$trb= $trb + round($result->total);
echo format_currency(round($result->total))
// echo ($result->total); ?></td>
</tr>
<?php } ?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td></td>
<td class="amount"><strong>
<?php
{
echo format_currency($tr0);
}
?>
</strong>
</td>
<td class="amount"><strong>
<?php
{
echo format_currency($tr1);
}
?>
</strong>
</td>
<td class="amount"><strong>
<?php
{
echo format_currency($tr2);
}
?>
</strong>
</td>
<td class="amount">
<strong>
<?php
{
echo format_currency($tr3);
}
?>
</strong>
</td>
<td class="amount">
<strong>
<?php
{
echo format_currency($tr4);
}
?>
</strong>
</td>
<td class="amount">
<strong>
<?php
{
echo format_currency($tr5);
}
?>
</strong>
</td>
<td class="amount">
<strong>
<?php
{
echo format_currency($trb);
}
?>
</strong>
</td>
</tr>
</tfoot>
</table>
<?php }
if(empty($results))
{
echo "<center><h3>No Records Found</h3></center>";
}
?>
</body>
</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>
$(document).ready(function() {
$('#tab').DataTable( {
"pageLength": 30,
dom: 'Bfrtip',
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
title: $('center').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
$(document).ready(function () {
$(".slidingDiv").show();
$('.show_hide').click(function (e) {
$(".slidingDiv").slideToggle("fast");
var val = $(this).text() == "-" ? "+" : "-";
$(this).hide().text(val).fadeIn("fast");
e.preventDefault();
});
});
</script>