338 lines
11 KiB
PHP
338 lines
11 KiB
PHP
<div id="headerbar">
|
|
<center> <h1><?php _trans('GSTIN-Invoices'); ?></h1>
|
|
<p align="center"> <?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(' '); ?>
|
|
</label><div>
|
|
<input type="submit" class="btn btn-success" name="btn_submit"
|
|
value="View Report" onclick="JavaScript:window.location.hash = '#table'">
|
|
</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 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><p align="center"> <?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>
|
|
<th style="text-align:center;"><?php echo trans('S.No');?></th>
|
|
<th style="text-align:center;"><?php echo trans('Invoice_No'); ?></th>
|
|
<th style="text-align:center;"><?php echo trans('Receiver Detail');?></th>
|
|
<!-- <th><?php echo trans('Customer Name'); ?></th> -->
|
|
|
|
<th style="text-align:center;"><?php echo trans('Percentage');?></th>
|
|
<th style="text-align:center;"><?php echo trans('Item Quantity'); ?></th>
|
|
<th style="text-align:center;"><?php echo trans('Item Prices'); ?></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
|
|
|
|
$tr1=0;
|
|
$tr2=0;
|
|
$tr3=0;
|
|
$tr4=0;
|
|
$tr5=0;
|
|
$trb=0;
|
|
|
|
|
|
$i = 0;
|
|
foreach ($customerized as $result) { ?>
|
|
<tr>
|
|
|
|
<td><?php echo ++$i;?></td>
|
|
|
|
<td style="text-align:right;"><?php echo ($result->invoice_number)?></td>
|
|
<td><?php echo ($result->client_tax_code);?></td>
|
|
<!-- <td ><?php echo ($result->client_name); ?></td> -->
|
|
|
|
<td style="text-align:right;"><?php echo ($result->percentage.'%');?></td>
|
|
<td style="text-align:right;"><?php echo ($result->item_quantity); ?></td>
|
|
<td style="text-align:right;"><?php echo ($result->item_price); ?></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->item_tax_total);
|
|
echo format_currency(round($result->item_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></td>
|
|
<!-- <td class="amount"><strong>
|
|
<?php
|
|
{
|
|
echo format_currency($tr0);
|
|
|
|
}
|
|
?>
|
|
</strong>
|
|
</td> -->
|
|
<!-- <td></td> -->
|
|
<td></td>
|
|
<td></td>
|
|
<td></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>
|
|
</body>
|
|
</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: 'GSTIN-Invoices',
|
|
exportOptions: {
|
|
columns: ':visible'
|
|
}
|
|
},
|
|
|
|
'colvis'
|
|
]
|
|
} );
|
|
} );
|
|
|
|
</script>
|