This commit is contained in:
Sanjeev 2021-06-28 23:49:33 +05:30
commit a81c507839
1680 changed files with 327799 additions and 112178 deletions

2
application/config/autoload.php Executable file → Normal file
View File

@ -64,7 +64,7 @@ $autoload['libraries'] = array('database', 'session');
| $autoload['helper'] = array('url', 'file');
*/
$autoload['helper'] = array('url', 'file','cias_helper');
$autoload['helper'] = array('url', 'file','cias_helper','cookie');
/*

5
application/config/database.php Executable file → Normal file
View File

@ -48,7 +48,10 @@
$active_group = 'default';
$active_record = TRUE;
$db['default']['hostname'] = 'sidharthindustries.com';
$db['default']['hostname'] = '35.213.153.5';
// $db['default']['username'] = 'kasiram9_prod';
// $db['default']['password'] = 'sia!1234';
// $db['default']['database'] = 'kasiram9_SIAPROD';
$db['default']['username'] = 'kasiram9_Siddh';
$db['default']['password'] = 'sidh@1234';
$db['default']['database'] = 'kasiram9_SIADEV';

View File

@ -0,0 +1,718 @@
<script>
$(document).ready(function () {
$("#client_name").select2();
});
</script>
<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">
<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="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 - Consolidate</b><br><br>
<?php
if($this->input->post('client_name')){
$cl=$this->input->post('client_name');
echo $cl;
}
if($this->input->post('financialyear')){
$ab=$this->input->post('financialyear');
echo '('.$ab.')';
}
?>
</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="client_name">
<?php echo 'Supplier'; ?>
</label>
<div class="input-group">
<select class="form-control" id="client_name" name="client_name">
<option value="">Select Supplier</option>
<?php
foreach($cust as $item):
{?>
<option value="<?php echo $item->SupplierName;?>"><?php echo $item->SupplierName ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>
<div class="col-md-2">
<label for="to_date">
<?php echo 'year'; ?>
</label>
<div class="input-group">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
foreach($finyear 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">
<br>
<label><input type="radio" name="colorRadio" id="value" onclick="toggleTables('2')" value="tab"> Value</label>
<label><input type="radio" name="colorRadio" id="qty" onclick="toggleTables('1')" value="ta" checked> Quantity</label>
</div>
<div class="col-md-2 "><br>
<input type="submit" class="btn btn-success" name="btn_submit"
value="View Report">
</div>
</div>
</form>
</div>
<div class="box-body" style="display:block" id="a">
<table class="table table-bordered table-hover" id="tab" style="font-size:14px;">
<thead>
<tr>
<th style="text-align:center;">Supplier Name</th>
<th style="text-align:center;">Material Name</th>
<th style="text-align:center;">Apr</th>
<th style="text-align:center;">May</th>
<th style="text-align:center;">Jun</th>
<th style="text-align:center;">Jul</th>
<th style="text-align:center;">Aug</th>
<th style="text-align:center;">Sep</th>
<th style="text-align:center;">Oct</th>
<th style="text-align:center;">Nov</th>
<th style="text-align:center;">Dec</th>
<th style="text-align:center;">Jan</th>
<th style="text-align: center;">Feb</th>
<th style="text-align: center;">Mar</th>
<th style="text-align: center;">Total</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($spurchse)){
$apr = 0;
$may = 0;
$jun = 0;
$jul = 0;
$aug = 0;
$sep = 0;
$oct = 0;
$nov = 0;
$dec = 0;
$jan = 0;
$feb = 0;
$mar = 0;
$tot = 0;
$ab=$this->input->post('financialyear');
foreach ($spurchse as $result) { ?>
<tr>
<td style="text-align:left;">
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $result->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>"><?php echo $result->supplier_name;?> </a>
</td>
<td style="text-align:left;"><?php
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$apr= $apr + round($result->April);
if(!empty($result->April)) { echo round($result->April); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$may= $may + round($result->May);
if(!empty($result->May)) { echo round($result->May); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$jun= $jun + round($result->June);
if(!empty($result->June)) { echo round($result->June); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$jul= $jul + round($result->July);
if(!empty($result->July)) { echo round($result->July); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$aug= $aug + round($result->August);
if(!empty($result->August)) { echo round($result->August); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$sep= $sep + $result->September;
if(!empty($result->September)) { echo round($result->September); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$oct= $oct + round($result->October);
if(!empty($result->October)) { echo round($result->October); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$nov= $nov + round($result->November);
if(!empty($result->November)) { echo round($result->November); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$dec= $dec + round($result->December);
if(!empty($result->December)) { echo round($result->December); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$jan= $jan + round($result->January);
if(!empty($result->January)) { echo round($result->January); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$feb= $feb + round($result->February);
if(!empty($result->February)) { echo round($result->February); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$mar= $mar + round($result->March);
if(!empty($result->March)) { echo round($result->March); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$tot= $tot + round($result->qtotal);
if(!empty($result->qtotal)) { echo round($result->qtotal); } else {echo "-";}
?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right;"><strong><?php
{
echo '';
}
?>
</strong></td>
<td style="text-align:right;"><strong><?php
{
echo $apr;
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo $may;
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo $jun;
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo $jul;
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo $aug;
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo $sep;
}
?>
</strong>
</td>
<td style="text-align:right;"><strong>
<?php
{
echo $oct;
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo $nov;
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo $dec;
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo $jan;
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo $feb;
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo $mar;
}
?>
</strong></td>
<td style="text-align:right;">
<strong>
<?php
{
echo $tot;
}
?>
</strong></td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
<div class="box-body" id="b" style="display:none">
<table class="table table-bordered table-hover" style="font-size:14px;" id="ta">
<thead>
<tr>
<th style="text-align:center;">Supplier Name</th>
<th style="text-align:center;">Material Name</th>
<th style="text-align:center;">Apr &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">May &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">Jun &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center;">Jul &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">Aug &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center;">Sep &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">Oct &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">Nov &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">Dec &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">Jan &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align: center;">Feb &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align: center;">Mar &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
if(!empty($spurchse)){
$apr = 0;
$may = 0;
$jun = 0;
$jul = 0;
$aug = 0;
$sep = 0;
$oct = 0;
$nov = 0;
$dec = 0;
$jan = 0;
$feb = 0;
$mar = 0;
$tot = 0;
foreach ($spurchse as $result) { ?>
<tr>
<td style="text-align:left;"><a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $result->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>"><?php echo $result->supplier_name;?> </a></td>
<td style="text-align:left;"><?php
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$apr= $apr + round($result->vApril);
if(!empty($result->vApril)) { echo number_format($result->vApril,2,'.',''); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$may= $may + round($result->vMay);
if(!empty($result->vMay)) { echo number_format($result->vMay,2,'.',''); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$jun= $jun + round($result->vJune);
if(!empty($result->vJune)) { echo number_format($result->vJune,2,'.',''); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$jul= $jul + round($result->vJuly);
if(!empty($result->vJuly)) { echo number_format($result->vJuly,2,'.',''); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$aug= $aug + round($result->vAugust);
if(!empty($result->vAugust)) { echo number_format($result->vAugust,2,'.',''); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$sep= $sep + $result->vSeptember;
if(!empty($result->vSeptember)) { echo number_format($result->vSeptember,2,'.',''); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$oct= $oct + round($result->vOctober);
if(!empty($result->vOctober)) { echo number_format($result->vOctober,2,'.',''); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$nov= $nov + round($result->vNovember);
if(!empty($result->vNovember)) { echo number_format($result->vNovember,2,'.',''); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$dec= $dec + round($result->vDecember);
if(!empty($result->vDecember)) { echo number_format($result->vDecember,2,'.',''); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$jan= $jan + round($result->vJanuary);
if(!empty($result->vJanuary)) { echo number_format($result->vJanuary,2,'.',''); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$feb= $feb + round($result->vFebruary);
if(!empty($result->vFebruary)) { echo number_format($result->vFebruary,2,'.',''); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$mar= $mar + round($result->vMarch);
if(!empty($result->vMarch)) { echo number_format($result->vMarch,2,'.',''); } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
$tot= $tot + round($result->vtotal);
if(!empty($result->vtotal)) { echo number_format($result->vtotal,2,'.',''); } else {echo "-";}
?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td><strong><?php
{
echo '';
}
?>
</strong></td>
<td style="text-align:right;"><strong><?php
{
echo number_format($apr,2,'.','');
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo number_format($may,2,'.','');
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo number_format($jun,2,'.','');
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo number_format($jul,2,'.','');
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo number_format($aug,2,'.','');
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo number_format($sep,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right;"><strong>
<?php
{
echo number_format($oct,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo number_format($nov,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo number_format($dec,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo number_format($jan,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo number_format($feb,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo number_format($mar,2,'.','');
}
?>
</strong></td>
<td style="text-align:right;">
<strong>
<?php
{
echo number_format($tot,2,'.','');
}
?>
</strong></td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</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>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#tab').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',
messageTop: $('h3').text(),
title: 'REPORT-Consolidate(Quantity)',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
$(document).ready(function() {
table = $('#ta').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',
messageTop: $('h3').text(),
title: 'REPORT-Consolidate(Value)',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
function toggleTables(which)
{
if(which == "1") {
document.getElementById('a').style.display = "block";
document.getElementById('b').style.display = "none";
}
if(which == "2") {
document.getElementById('b').style.display = "block";
document.getElementById('a').style.display = "none";
}
}
</script>

View File

@ -0,0 +1,199 @@
<?php
if(!empty($mms))
{
}
?>
<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">
<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="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 - Consolidate-Inward(<?php
$m = $this->input->get('m');
echo $m;
?>)</b></p></h3></center>
</div>
<!-- /.box-header -->
<div class="box-body">
<div>
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
<thead>
<tr>
<th style="text-align:center" rowspan="2">Supplier Name</th>
<th style="text-align:center" rowspan="2">Material Name</th>
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
</tr>
<tr>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Value &nbsp;(<i class="fa fa-rupee "></i>)</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($spurchse)){
$tqt=0;
$tvt=0;
$ab=$this->input->get('ab');
$month=date('F');
$m = $this->input->get('m');
//echo $month;
foreach($spurchse as $rel)
{
?>
<tr>
<td><span>
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&cname=<?php echo $rel->supplier_name;?>&prod=<?php echo $rel->material_name;?>&month=<?php echo $m;?>"><?php echo $rel->supplier_name;?> </a>
</span></td>
<td><span><?php echo $rel->material_name;?></span></td>
<td style="text-align:right"><span><?php
$tqt= $tqt + round($rel->quantity);
echo round($rel->quantity);?></span></td>
<td style="text-align:right"><span><?php
$tvt= $tvt + number_format($rel->total,2,'.','');
echo number_format($rel->total,2,'.','');?></span></td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right"><strong>
<?php
{
echo '';
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo $tqt;
}
?>
</strong>
</td>
<td style="text-align:right">
<strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</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>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
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',
messageTop: $('h3').text(),
title: 'REPORT-Consolidate Category-Wise',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
$('#mySelect').on('change',function(){
table
.column(4)
.search(this.value)
.draw();
});
</script>

View File

@ -0,0 +1,748 @@
<script>
$(document).ready(function () {
$("#client_name").select2();
});
</script>
<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">
<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="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 - Consolidate (Category-Wise)</b><br><br>
<?php
if($this->input->post('client_name')){
$cl=$this->input->post('client_name');
echo $cl;
}
if($this->input->post('financialyear')){
$ab=$this->input->post('financialyear');
echo '('.$ab.')';
}
?></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="client_name">
<?php echo 'Category'; ?>
</label>
<div class="input-group">
<select class="form-control" id="client_name" name="client_name">
<option value="">Select Category</option>
<?php
foreach($material as $item):
{?>
<option value="<?php echo $item->Category;?>"><?php echo $item->Category ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>
<div class="col-md-2">
<label for="to_date">
<?php echo 'year'; ?>
</label>
<div class="input-group">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
foreach($finyear 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">
<br>
<label><input type="radio" name="colorRadio" id="value" onclick="toggleTables('2')" value="tab"> Value</label>
<label><input type="radio" name="colorRadio" id="qty" onclick="toggleTables('1')" value="ta" checked> Quantity</label>
</div>
<div class="col-md-2 "><br>
<input type="submit" class="btn btn-success" name="btn_submit"
value="View Report">
</div>
</div>
</form>
</div>
<div class="box-body" style="display:block" id="a">
<table class="table table-bordered table-hover" id="tab" style="font-size:14px;">
<thead>
<tr>
<th style="text-align:center;">Category</th>
<th style="text-align:center;">Apr</th>
<th style="text-align:center;">May</th>
<th style="text-align:center;">Jun</th>
<th style="text-align:center;">Jul</th>
<th style="text-align:center;">Aug</th>
<th style="text-align:center;">Sep</th>
<th style="text-align:center;">Oct</th>
<th style="text-align:center;">Nov</th>
<th style="text-align:center;">Dec</th>
<th style="text-align:center;">Jan</th>
<th style="text-align: center;">Feb</th>
<th style="text-align: center;">Mar</th>
<th style="text-align: center;">Total</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($spurchse)){
$apr = 0;
$may = 0;
$jun = 0;
$jul = 0;
$aug = 0;
$sep = 0;
$oct = 0;
$nov = 0;
$dec = 0;
$jan = 0;
$feb = 0;
$mar = 0;
$tot = 0;
$ab=$this->input->post('financialyear');
foreach ($spurchse as $result) { ?>
<tr>
<td style="text-align:left;">
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo $result->category;?> </a>
</td>
<td style="text-align:right;">
<?php
$apr= $apr + round($result->April);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'April';?>"><?php echo round($result->April);?> </a>
</td>
<td style="text-align:right;">
<?php
$may= $may + round($result->May);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'May';?>"><?php echo round($result->May);?> </a>
</td>
<td style="text-align:right;">
<?php
$jun= $jun + round($result->June);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'June';?>"><?php echo round($result->June);?> </a>
</td>
<td style="text-align:right;">
<?php
$jul= $jul + round($result->July);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'July';?>"><?php echo round($result->July);?> </a>
</td>
<td style="text-align:right;">
<?php
$aug= $aug + round($result->August);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'August';?>"><?php echo round($result->August);?> </a>
</td>
<td style="text-align:right;">
<?php
$sep= $sep + $result->September;
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'September';?>"><?php echo round($result->September);?> </a>
</td>
<td style="text-align:right;">
<?php
$oct= $oct + round($result->October);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'October';?>"><?php echo round($result->October);?> </a>
</td>
<td style="text-align:right;">
<?php
$nov= $nov + round($result->November);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'November';?>"><?php echo round($result->November);?> </a>
</td>
<td style="text-align:right;">
<?php
$dec= $dec + round($result->December);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'December';?>"><?php echo round($result->December);?> </a>
</td>
<td style="text-align:right;">
<?php
$jan= $jan + round($result->January);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'January';?>"><?php echo round($result->January);?> </a>
</td>
<td style="text-align:right;">
<?php
$feb= $feb + round($result->February);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'February';?>"><?php echo round($result->February);?> </a>
</td>
<td style="text-align:right;">
<?php
$mar= $mar + round($result->March);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'March';?>"><?php echo round($result->March);?> </a>
</td>
<td style="text-align:right;">
<?php
$tot= $tot + round($result->qtotal);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_year?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo round($result->qtotal);?> </a>
</td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right;"><strong><?php
{
echo $apr;
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo $may;
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo $jun;
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo $jul;
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo $aug;
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo $sep;
}
?>
</strong>
</td>
<td style="text-align:right;"><strong>
<?php
{
echo $oct;
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo $nov;
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo $dec;
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo $jan;
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo $feb;
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo $mar;
}
?>
</strong></td>
<td style="text-align:right;">
<strong>
<?php
{
echo $tot;
}
?>
</strong></td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
<div class="box-body" id="b" style="display:none">
<table class="table table-bordered table-hover" style="font-size:13px!important;" id="ta">
<thead>
<tr>
<th style="text-align:center;">Category</th>
<th style="text-align:center;">Apr &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">May &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">Jun &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center;">Jul &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">Aug &nbsp;(<i class="fa fa-rupee "></i>)</th>
<th style="text-align:center;">Sep &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">Oct &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">Nov &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">Dec &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align:center;">Jan &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align: center;">Feb &nbsp;(<i class="fa fa-rupee " ></i>)</th>
<th style="text-align: center;">Mar &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
if(!empty($spurchse)){
$apr = 0;
$may = 0;
$jun = 0;
$jul = 0;
$aug = 0;
$sep = 0;
$oct = 0;
$nov = 0;
$dec = 0;
$jan = 0;
$feb = 0;
$mar = 0;
$tot = 0;
foreach ($spurchse as $result) { ?>
<tr>
<td style="text-align:left;">
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo $result->category;?> </a>
</td>
<td style="text-align:right;">
<?php
$apr= $apr + number_format($result->vApril,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'April';?>"><?php echo number_format($result->vApril,2,'.','');?> </a>
</td>
<td style="text-align:right;">
<?php
$may= $may + number_format($result->vMay,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'May';?>"><?php echo number_format($result->vMay,2,'.','');?> </a>
</td>
<td style="text-align:right;">
<?php
$jun= $jun + number_format($result->vJune,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'June';?>"><?php echo number_format($result->vJune,2,'.','');?> </a>
</td>
<td style="text-align:right;">
<?php
$jul= $jul + number_format($result->vJuly,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'July';?>"><?php echo number_format($result->vJuly,2,'.','');?> </a>
</td>
<td style="text-align:right;">
<?php
$aug= $aug + number_format($result->vAugust,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'August';?>"><?php echo number_format($result->vAugust,2,'.','');?> </a>
</td>
<td style="text-align:right;">
<?php
$sep= $sep + number_format($result->vSeptember,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'September';?>"><?php echo number_format($result->vSeptember,2,'.','');?> </a>
</td>
<td style="text-align:right;">
<?php
$oct= $oct + number_format($result->vOctober,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'October';?>"><?php echo number_format($result->vOctober,2,'.','');?> </a>
</td>
<td style="text-align:right;">
<?php
$nov= $nov + number_format($result->vNovember,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'November';?>"><?php echo number_format($result->vNovember,2,'.','');?> </a>
</td>
<td style="text-align:right;">
<?php
$dec= $dec + number_format($result->vDecember,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'December';?>"><?php echo number_format($result->vDecember,2,'.','');?> </a>
</td>
<td style="text-align:right;">
<?php
$jan= $jan + number_format($result->vJanuary,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'January';?>"><?php echo number_format($result->vJanuary,2,'.','');?> </a>
</td>
<td style="text-align:right;">
<?php
$feb= $feb + number_format($result->vFebruary,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'February';?>"><?php echo number_format($result->vFebruary,2,'.','');?> </a>
</td>
<td style="text-align:right;">
<?php
$mar= $mar + number_format($result->vMarch,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'March';?>"><?php echo number_format($result->vMarch,2,'.','');?> </a>
</td>
<td style="text-align:right;">
<?php
$tot= $tot + number_format($result->vtotal,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_year?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo number_format($result->vtotal,2,'.','');?> </a>
</td>
</tr>
<?php
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right;"><strong><?php
{
echo number_format($apr,2,'.','');
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo number_format($may,2,'.','');
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo number_format($jun,2,'.','');
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo number_format($jul,2,'.','');
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo number_format($aug,2,'.','');
}
?>
</strong></td>
<td style="text-align:right;"><strong>
<?php
{
echo number_format($sep,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right;"><strong>
<?php
{
echo number_format($oct,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo number_format($nov,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo number_format($dec,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo number_format($jan,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo number_format($feb,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right;">
<strong>
<?php
{
echo number_format($mar,2,'.','');
}
?>
</strong></td>
<td style="text-align:right;">
<strong>
<?php
{
echo number_format($tot,2,'.','');
}
?>
</strong></td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</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>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#tab').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',
messageTop: $('h3').text(),
title: 'REPORT-Consolidate-Category(Quantity)',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
$(document).ready(function() {
table = $('#ta').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',
messageTop: $('h3').text(),
title: 'REPORT-Consolidate-Category(Quantity)',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
function toggleTables(which)
{
if(which == "1") {
document.getElementById('a').style.display = "block";
document.getElementById('b').style.display = "none";
}
if(which == "2") {
document.getElementById('b').style.display = "block";
document.getElementById('a').style.display = "none";
}
}
</script>

View File

@ -225,6 +225,7 @@ class cashbook extends BaseController
$data['clearedcreditbalance'] = $this->cashbook_model->clearedcreditbalance();
$this->loadViews("bankingfile", $this->global, $data , NULL);
}
<<<<<<< HEAD
function bankfileupload(){
//document => default NULL
$document = NULL;
@ -233,6 +234,56 @@ class cashbook extends BaseController
$openingbalance=0;
$closingbalance=0;
$created_by = $this->session->userdata('userId');
=======
function bankfileupload()
{
//document => default NULL
$document = null;
// fs => File Name default 0
$fs = 0;
if(!empty($_FILES['userfile']['name']))
{
//echo "FILE AVAILABLE";
$config['file_name'] = $_FILES['userfile']['name']; // This Also FileName with format.
$myFIle = $config['file_name']; // This Also FileName with format.
// xls File destination folder Given Below.
$config['upload_path'] = 'uploads/banking/';
$path = $config['upload_path'];
//Destionation Path => uploads/banking.
$filename = $config['file_name'];// This Also FileName with format.
$document = $path.$filename;
$fs = $this->uploadFile1();
// $this->function_alert($fs);
// echo "uploadFile1()".$fs;die();
$document = $path.$fs;
$created_by = $this->session->userdata('userId');
$openingbalance=0;
$closingbalance=0;
$inputFileName = $_FILES['userfile']['tmp_name'];
require_once APPPATH .'third_party/PHPExcel/IOFactory.php';
$objTpl = PHPExcel_IOFactory::load($inputFileName);
$sheet = $objTpl->getActiveSheet();//->toArray(null, true,true,true);
$highestRow = $sheet->getHighestRow();
$highestColumn = $sheet->getHighestColumn();
$highestRow4=$highestRow-4;
$bank = $this->input->post('bankbranchname');
$fileupload= array('Bankname'=>$bank,'document'=>$document);
$res = $this->cashbook_model->bankfile($fileupload);
for($x=21;$x<=$highestRow4;$x++){
if($x == 21){
$openingbalance=$sheet->getCell('H'.$x)->getValue();
>>>>>>> 0d28edf40121fbec168662126246805f8d7bb939
if(!empty($_FILES['userfile']['name']))
{
@ -308,6 +359,7 @@ class cashbook extends BaseController
$filedata_response = $this->cashbook_model->bankfiledata($filedataupload);
// echo "response ".$res;
}
<<<<<<< HEAD
$balance= array('filename'=>$filename,'created_by'=>$created_by,'openingbalance'=>$openingbalance,'closingbalance'=>$closingbalance);
$balancedata_reponse = $this->cashbook_model->balance($balance);
echo "<script>alert('file upload successfully!');window.location.href='Bankingstatement';</script>";
@ -320,6 +372,85 @@ class cashbook extends BaseController
else{
echo "<script>alert('there is no file.retry again!');window.location.href='Bankingview';</script>";
}
=======
$t=$sheet->getCell('A'.$x)->getValue();
$dat= str_replace('/','-',$t);
if (empty($dat))
{
$Date1 = NULL;
}
else
{
$Date1 = strtotime( $dat);
$Date1 = date("Y-m-d ", $Date1);
}
$s=$sheet->getCell('B'.$x)->getValue();
$dat1= str_replace('/','-',$s);
if (empty($dat1))
{
$Date2 = NULL;
}
else
{
$Date2 = date('Y-m-d',strtotime($dat1));
}
$chqno = $sheet->getCell('C'.$x)->getValue();
$narration = $sheet->getCell('D'.$x)->getValue();
$cod =$sheet->getCell('E'.$x)->getValue();
$debit =$sheet->getCell('F'.$x)->getValue();
$credit=$sheet->getCell('G'.$x)->getValue();
$balance=$sheet->getCell('H'.$x)->getValue();
if($debit==0)
{
$Status='';
}
else
{
$Status='OPEN';
}
if ($credit==0)
{
$cstatus='';
}
else
{
$cstatus='OPEN';
}
// $IsActive=0;
$filedataupload= array('reportdate'=>$Date1,'valuedate'=>$Date2,'chequeNo'=>$cod,'Narration'=>$narration,'Cod'=> $chqno,'Debit'=>$debit,'Credit'=>$credit,'cbalancetocleared'=>$credit,'Balance'=>$balance,'Bankname'=>$bank,'Status'=>$Status,'cstatus'=>$cstatus);
// print_r($filedataupload);
$res = $this->cashbook_model->bankfiledata($filedataupload);
// echo "response ".$res;
}
// die();
$balance= array('filename'=>$config['file_name'],'created_by'=>$created_by,'openingbalance'=>$openingbalance,'closingbalance'=>$closingbalance);
$bal = $this->cashbook_model->balance($balance);
if( $res == 1 ){
echo "<script>alert('Saved Successfully!');window.location.href='Bankingstatement';</script>";
}
else
{
echo "<script>alert('Saved unsuccessfully!');window.location.href='Bankingstatement';</script>";
}
>>>>>>> 0d28edf40121fbec168662126246805f8d7bb939
}
function excelLibExcerise(){
echo "i am in excelLibExcerise Fns";
@ -581,6 +712,44 @@ class cashbook extends BaseController
}
}
<<<<<<< HEAD
=======
function uploadFile1()
{
// echo "I am Here INSIDE UPLOAD";
// die();
//$this->load->library('upload')
$pathinfo = pathinfo($_FILES['userfile']['name']);
$config['upload_path'] = 'uploads/banking/';
// $config['allowed_types'] = 'png|jpg|jpeg|xlsx';
$config['allowed_types'] = 'xlsx|csv|xls';
$config['file_name'] = $_FILES['userfile']['name'];
$config['overwrite'] = true;
//Load upload library and initialize configuration
$this->load->library('upload',$config);
$this->upload->initialize($config);
if($this->upload->do_upload('userfile'))
{
$uploadData = $this->upload->data();
$uploadfilename = $uploadData['file_name'];
return $uploadfilename;
}
else
{
$error = array('error' => $this->upload->display_errors());
$uploadfilename = '';
// print_r($error);
return 0;
}
}
>>>>>>> 0d28edf40121fbec168662126246805f8d7bb939
function viewIE()
{

View File

@ -0,0 +1,178 @@
<?php
$inrsymbol='';
$finyear ='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<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">
<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">
<div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>YEAR REPORTS(<?php echo $finyear?>)</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=" ">
<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="year" name="btn_submit" value="View Report">
</div>
</form>
</div>
</center>
</div>
<div class="btn-group btn-group-justified no-margin">
<table class="table table-bordered table-hover" id="req"style="font-size:13px;">
<thead>
<tr>
<th>Month</th>
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Total <?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php
$ti=0.00;
$tvt=0.00;
if(!empty($yearlyreport)){
foreach($yearlyreport as $yr)
{
?>
<tr>
<!--<td><span><?php echo $yr->date?></span></td>-->
<td align="left"><a href="<?= base_url() ?>report/yearmonthwise?sid=<?php echo $yr->month;?>"><span><?php echo $yr->month?></span></a></td>
<!--<td align="left"><span><?php echo $yr->type?></span></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($yr->total,2,'.','');?></span></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</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>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#req').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>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'CASHBOOK REPORT- YEAR(2017-2018)',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

View File

@ -0,0 +1,183 @@
<?php
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
?>
<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">
<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;
}
</style>
<div class="content-wrapper">
<div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report(<?php $month=date('F');echo $month;?>)</b></p></h3></center>
</div>
<div class="btn-group btn-group-justified no-margin">
<div>
<table class="table table-bordered table-hover" id="req" style="font-size:13px;">
<thead>
<tr>
<!--<th>Date</th>-->
<th>Account Name</th>
<!--<th>month</th>-->
<!--<th>Paid To</th>-->
<th>Paid Type</th>
<!--<th>Received From</th>
<th>Paid To</th>-->
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
<!--<th>Description</th>-->
</tr>
</thead>
<tbody>
<?php
$ti=0.00;
$tvt=0.00;
if(!empty($yearmonthwise)){
foreach($yearmonthwise as $ym)
{
?>
<tr>
<!--<td align="right"><span><a href="<?= base_url() ?>report/yearmonthwise"><?php echo $ym->month?></a></span></td>-->
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $ym->account_code;?>&d=<?php echo $ym->month?>&c=<?php echo $ym->type?>"><span><?php echo $ym->name?></span></a></td>
<!--<td align="right"><span><?php echo $ym->towhom?></span></td>-->
<td align="left"><span><?php echo $ym->type?></span></td>
<!--<td align="left"><span><?php echo $ym->receiptname?></span></td>
<td align="left"><span><?php echo $ym->paymentname?></span></td>-->
<!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
<td align="right"><span><?php
$ti= $ti + number_format($ym->income,2,'.','');
echo number_format($ym->income,2,'.','');?></span></td>
<td align="right"><span><?php
$tvt= $tvt + number_format($ym->expense,2,'.','');
echo number_format($ym->expense,2,'.','');?></span></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</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>
</tr>
</tfoot>
</table>
</div>
</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>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#req').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>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'DEPARTMENT WISE CASHBOOK REPORT',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

4
application/controllers/login.php Executable file → Normal file
View File

@ -35,6 +35,9 @@ class Login extends CI_Controller
if(!isset($isLoggedIn) || $isLoggedIn != TRUE)
{
// print_r($this->session->all_userdata());
// echo '<br> current CI version : ' . CI_VERSION;
// echo '<br> Current PHP version : ' . phpversion();
$this->load->view('login');
}
@ -77,6 +80,7 @@ class Login extends CI_Controller
foreach ($result as $res)
{
log_message('ERROR','#####loggin_name : ' . $res->FirstName);
$sessionArray = array('userId'=>$res->userId,
// 'role'=>$res->roleId,
'roleText'=>$res->role,

View File

@ -1761,6 +1761,7 @@ public function importpoprint($PONO)
$Depcode='';
$Currencycode='';
$PoStatus='';
$PaiseVal='';
$data['AmendmentPDF'] = $this->purchaseorder_model->amendpdf($PONO);
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformationforPDF();
$data['GetPoFormat'] = $this->purchaseorder_model->GetPoFormat($PONO);
@ -1818,7 +1819,7 @@ public function importpoprint($PONO)
if(!empty($data['POItem'])){
$CurrencyType=$data['POItem'][0]->CurrencyType;
}
//echo $CurrencyType;
// echo $CurrencyType;
if($CurrencyType=='')
{
@ -1834,10 +1835,12 @@ public function importpoprint($PONO)
$totalAmt=sprintf("%.2f", $TotalOrderValue);
$data['TotalAmountInWords']= $this->convertNumber($totalAmt);
// $data['TotalAmountInWords']= $this->convertNumber($totalAmt);
$SymbolCurrency = '';
$SymbolCurrencyName ='';
@ -1852,7 +1855,7 @@ public function importpoprint($PONO)
$totalAmt=sprintf("%.2f", $TotaltoPay);
// $data['TotalAmountInWords']= $this->convertNumberSymbol($totalAmt,$SymbolCurrency,$SymbolCurrencyName,$PaiseVal);
$data['TotalAmountInWords']= $this->convertNumberSymbol($totalAmt,$SymbolCurrency,$SymbolCurrencyName,$PaiseVal);
// $this->load->View("importpopdf", $data);

6
application/controllers/quality.php Executable file → Normal file
View File

@ -1,6 +1,7 @@
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
require APPPATH . '/libraries/BaseController.php';
require APPPATH . '/third_party/mpdf/mpdf.php';
/**
* Class : purchaseorder (PurchaseorderController)
@ -191,7 +192,6 @@ class quality extends BaseController
function printReportPDF()
{
$type = '';
$html = '';
$filename = '';
@ -212,7 +212,7 @@ class quality extends BaseController
$filename = 'INWARD MATERIAL INSPECTION REPORT'.$reportid;
$html = $this->load->View("viewindinwardreportpdf",$data,true);
}
require APPPATH . '/third_party/mpdf/mpdf.php';
ob_end_clean();
$mpdf=new mPDF('utf-8','A4-P',7,10,10, 10, 10, 24, 4, 6);
$mpdf->SetDisplayMode('fullpage');
@ -534,4 +534,4 @@ class quality extends BaseController
}
}
?>
?>

3142
application/controllers/user.php Executable file → Normal file

File diff suppressed because it is too large Load Diff

13
application/libraries/BaseController.php Executable file → Normal file
View File

@ -41,6 +41,9 @@ class BaseController extends CI_Controller {
redirect ( 'login' );
} else {
//$this->role = $this->session->userdata ( 'role' );
// session_start();
log_message('ERROR','#####In BaseController - isLoggedIn function ci session : ' . $this->session->userdata ( 'name' ));
// log_message('ERR?OR','#####In BaseController - isLoggedIn function session super global methid : ' . $_SESSION['name']);
$this->vendorId = $this->session->userdata ( 'userId' );
$this->name = $this->session->userdata ( 'name' );
$this->roleText = $this->session->userdata ( 'roleText' );
@ -96,8 +99,14 @@ class BaseController extends CI_Controller {
* This function is used to logged out user from system
*/
function logout() {
$this->session->sess_destroy ();
ob_start();
$this->load->driver('cache');
$this->session->set_userdata();
delete_cookie('ci_session');
//$this->session->userdata = array('test' => 'tst');
$this->session->sess_destroy();
$this->cache->clean();
ob_clean();
redirect ( 'login' );
}

4
application/models/payroll_model.php Executable file → Normal file
View File

@ -218,8 +218,8 @@ class Payroll_model extends CI_Model
$this->db->from('T_Payroll Pay');
$this->db->join('T_Employee_Details Emp', 'Pay.EmpID = Emp.EmpID');
$this->db->where('Pay.PayOn',$payon);
$this->db->where('Pay.EmployeeESI > 0 ');
$this->db->where('Pay.CompanyESI > 0');
// $this->db->where('Pay.EmployeeESI > 0 ');
// $this->db->where('Pay.CompanyESI > 0');
$this->db->order_by("Pay.EmpID", "asc");
$query = $this->db->get();
return $query->result();

3
application/models/quality_model.php Executable file → Normal file
View File

@ -586,5 +586,4 @@ class Quality_model extends CI_Model
return $res->result();
}
}
?>
?>

0
application/third_party/PHPExcel/Autoloader.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/CachedObjectStorage/APC.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/CachedObjectStorage/CacheBase.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/CachedObjectStorage/DiscISAM.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/CachedObjectStorage/ICache.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/CachedObjectStorage/Igbinary.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/CachedObjectStorage/Memcache.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/CachedObjectStorage/Memory.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/CachedObjectStorage/MemoryGZip.php vendored Executable file → Normal file
View File

View File

0
application/third_party/PHPExcel/CachedObjectStorage/PHPTemp.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/CachedObjectStorage/SQLite.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/CachedObjectStorage/SQLite3.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/CachedObjectStorage/Wincache.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/CachedObjectStorageFactory.php vendored Executable file → Normal file
View File

View File

0
application/third_party/PHPExcel/CalcEngine/Logger.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/Database.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/DateTime.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/Engineering.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/Exception.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/ExceptionHandler.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/Financial.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/FormulaParser.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/FormulaToken.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/Function.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/Functions.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/Logical.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/LookupRef.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/MathTrig.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/Statistical.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/TextData.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/Token/Stack.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Calculation/functionlist.txt vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Cell.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Cell/AdvancedValueBinder.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Cell/DataType.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Cell/DataValidation.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Cell/DefaultValueBinder.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Cell/Hyperlink.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Cell/IValueBinder.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Chart.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Chart/Axis.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Chart/DataSeries.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Chart/DataSeriesValues.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Chart/Exception.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Chart/GridLines.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Chart/Layout.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Chart/Legend.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Chart/PlotArea.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Chart/Properties.php vendored Executable file → Normal file
View File

View File

0
application/third_party/PHPExcel/Chart/Renderer/jpgraph.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Chart/Title.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Comment.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/DocumentProperties.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/DocumentSecurity.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Exception.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/HashTable.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Helper/HTML.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/IComparable.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/IOFactory.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/NamedRange.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Abstract.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/CSV.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/DefaultReadFilter.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel2003XML.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel2007.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel2007/Chart.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel2007/Theme.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel5.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel5/Color.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel5/Color/BIFF5.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel5/Color/BIFF8.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel5/Color/BuiltIn.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel5/ErrorCode.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel5/Escher.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel5/MD5.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel5/RC4.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Excel5/Style/Border.php vendored Executable file → Normal file
View File

View File

0
application/third_party/PHPExcel/Reader/Exception.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/Gnumeric.php vendored Executable file → Normal file
View File

0
application/third_party/PHPExcel/Reader/HTML.php vendored Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More