cashbook report
This commit is contained in:
parent
4febdd7780
commit
36db4cf841
@ -404,7 +404,22 @@ class report extends BaseController
|
||||
$this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
|
||||
public function cashbookdepartment()
|
||||
{
|
||||
$sid=$_GET['sid'];
|
||||
$this->global['pageTitle'] = 'Cashbook - department - ';
|
||||
$data['departmentwise']=$this->dahsboard_Model->departmentwise($sid);
|
||||
//print_r($data['departmentwise']);
|
||||
$this->loadviews("cashbookmonthlydep",$this->global,$data, NULL);
|
||||
}
|
||||
public function yearmonthwise()
|
||||
{
|
||||
$sid=$_GET['sid'];
|
||||
$this->global['pageTitle'] = 'Cashbook - yearmonthwise - ';
|
||||
$data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise($sid);
|
||||
//print_r($data['departmentwise']);
|
||||
$this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
12
application/logs/log-2017-12-04.php
Normal file
12
application/logs/log-2017-12-04.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
|
||||
|
||||
ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
|
||||
ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
|
||||
ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
|
||||
ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
|
||||
ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
|
||||
ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
|
||||
ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
|
||||
ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
|
||||
ERROR - 2017-12-04 08:53:16 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearmonthwise.php 59
|
||||
ERROR - 2017-12-04 08:53:16 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearmonthwise.php 59
|
||||
@ -937,12 +937,11 @@ group by supplier_name,material_name";
|
||||
// }
|
||||
function yearexpensereport()
|
||||
{
|
||||
$sql="SELECT date,type,sum(total)as total,towhom,description,account_code FROM kasiram9_SIADEV.t_income_expense where type='EXPENSE' and year(date)= year(current_date()) group by account_code order by total desc limit 10 ";
|
||||
$sql="SELECT date,type,sum(total)as total,towhom,description,account_code,monthname(date)as month FROM kasiram9_SIADEV.t_income_expense where type='EXPENSE' and year(date)= year(current_date()) group by month order by total desc limit 10 ";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
function today_data($value='')
|
||||
{
|
||||
$sql="SELECT type,Sum(total) as todaydata FROM kasiram9_SIADEV.t_income_expense WHERE type = ? AND DATE(date) = CURRENT_DATE";
|
||||
@ -968,6 +967,23 @@ group by supplier_name,material_name";
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
function departmentwise($sid='')
|
||||
{
|
||||
$sql="SELECT date,type,total,towhom,description,account_code FROM kasiram9_SIADEV.t_income_expense WHERE account_code = ?";
|
||||
$query = $this->db->query($sql,array($sid));
|
||||
//print_r($this->db->last_query());
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
function yearmonthwise($sid='')
|
||||
{
|
||||
$sql="SELECT date,type,total,description,towhom,account_code FROM kasiram9_SIADEV.t_income_expense WHERE monthname(date) = ? group by account_code";
|
||||
$query = $this->db->query($sql,array($sid));
|
||||
//print_r($this->db->last_query());
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
124
application/views/cashbookmonthlydep.php
Normal file
124
application/views/cashbookmonthlydep.php
Normal file
@ -0,0 +1,124 @@
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
if(!empty($departmentwise))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.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="row" style="min-height: 600px;">
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
||||
<div class="panel-heading">
|
||||
<center><b>Department Monthly Expenses</b></center>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified no-margin">
|
||||
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Date</th>
|
||||
<th>Paid To</th>
|
||||
<th>Paid Type</th>
|
||||
<th>Amount</th>
|
||||
<th>Account Code</th>
|
||||
<th>Description</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($departmentwise)){
|
||||
foreach($departmentwise as $dw)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span><?php echo $dw->date?></span></td>
|
||||
<td align="left"><span><?php echo $dw->towhom?></span></td>
|
||||
<td align="left"><span><?php echo $dw->type?></span></td>
|
||||
<td align="left"><span><?php echo $dw->total?></span></td>
|
||||
<td align="left"><span><?php echo $dw->account_code?></span></td>
|
||||
<td align="left"><span><?php echo $dw->description?></span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#req').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: 'collection',
|
||||
text: 'Export Cashbook Reports',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@ -23,58 +23,7 @@
|
||||
|
||||
</style>
|
||||
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!--<div class="col-md-6">
|
||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
||||
<div class="panel-heading">
|
||||
<center><b>Yearly Incomes</b></center>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified no-margin">
|
||||
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Date</th>
|
||||
<th>Paid To</th>
|
||||
<th>Paid Type</th>
|
||||
<th>Amount</th>
|
||||
<th>Account Code</th>
|
||||
<th>Description</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($yearlyincreport)){
|
||||
foreach($yearlyincreport as $yir)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span><?php echo $yir->date?></span></td>
|
||||
<td align="right"><span><?php echo $yir->towhom?></span></td>
|
||||
<td align="right"><span><?php echo $yir->type?></span></td>
|
||||
<td align="right"><span><?php echo $yir->total?></span></td>
|
||||
<td align="right"><span><?php echo $yir->account_code?></span></td>
|
||||
<td align="right"><span><?php echo $yir->description?></span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
||||
@ -82,17 +31,16 @@
|
||||
<center><b>Yearly Expenses</b></center>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified no-margin">
|
||||
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Date</th>
|
||||
<th>Paid To</th>
|
||||
<!--<th>Date</th>-->
|
||||
<th>month</th>
|
||||
<!-- <th>Paid To</th>-->
|
||||
<th>Paid Type</th>
|
||||
<th>Amount</th>
|
||||
<th>Account Code</th>
|
||||
<!--<th>Account Code</th>-->
|
||||
<th>Description</th>
|
||||
|
||||
|
||||
@ -105,11 +53,12 @@
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span><?php echo $yr->date?></span></td>
|
||||
<td align="right"><span><?php echo $yr->towhom?></span></td>
|
||||
<!--<td><span><?php echo $yr->date?></span></td>-->
|
||||
<td align="right"><a href="<?= base_url() ?>report/yearmonthwise?sid=<?php echo $yr->month;?>"><span><?php echo $yr->month?></span></a></td>
|
||||
<!--<td align="right"><span><?php echo $yr->towhom?></span></td>-->
|
||||
<td align="right"><span><?php echo $yr->type?></span></td>
|
||||
<td align="right"><span><?php echo $yr->total?></span></td>
|
||||
<td align="right"><span><?php echo $yr->account_code?></span></td>
|
||||
<!--<td align="right"><span><?php echo $yr->account_code?></span></td>-->
|
||||
<td align="right"><span><?php echo $yr->description?></span></td>
|
||||
|
||||
|
||||
@ -122,11 +71,10 @@
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
116
application/views/cashbookyearmonthwise.php
Normal file
116
application/views/cashbookyearmonthwise.php
Normal file
@ -0,0 +1,116 @@
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.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="col-md-12">
|
||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
||||
<div class="panel-heading">
|
||||
<center><b>Yearly Expenses</b></center>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified no-margin">
|
||||
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Date</th>
|
||||
<!--<th>month</th>-->
|
||||
<th>Paid To</th>
|
||||
<th>Paid Type</th>
|
||||
<th>Amount</th>
|
||||
<th>Account Code</th>
|
||||
<th>Description</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($yearmonthwise)){
|
||||
foreach($yearmonthwise as $ym)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span><?php echo $ym->date?></span></td>
|
||||
<!--<td align="right"><span><a href="<?= base_url() ?>report/yearmonthwise"><?php echo $ym->month?></a></span></td>-->
|
||||
<td align="right"><span><?php echo $ym->towhom?></span></td>
|
||||
<td align="right"><span><?php echo $ym->type?></span></td>
|
||||
<td align="right"><span><?php echo $ym->total?></span></td>
|
||||
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $ym->account_code;?>"><span><?php echo $ym->account_code?></span></a></td>
|
||||
<td align="right"><span><?php echo $ym->description?></span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#req').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: 'collection',
|
||||
text: 'Export Cashbook Reports',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user