alignment changes

This commit is contained in:
gayathri1990 2017-12-21 19:20:57 +05:30
parent 78c5c561e4
commit 1c25428aa7
5 changed files with 158 additions and 49 deletions

View File

@ -1092,9 +1092,15 @@ class report extends BaseController
$this->global['pageTitle'] = 'Cashbook - yearly expenses Reports - ';
$fyear = $this->input->post('financialyear');
$fa=substr( $fyear,0,-5);
$aa=substr( $fyear,5,5);
//echo $fyear;
//$data['yearlyincreport']=$this->dahsboard_Model->yearincomereport();
$data['yearlyreport']=$this->dahsboard_Model->yearexpensereport();
$data['yearlyreport']=$this->dahsboard_Model->yearexpensereport($fa,$aa);
$data['financialyear']=$this->dahsboard_Model->cashbookfinyear();
//print_r($data['finyear']);
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
if($this->DEPCode == MANAGEMENT)
@ -1171,9 +1177,11 @@ class report extends BaseController
$this->global['pageTitle'] = 'Cashbook - AllReport ';
$fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date');
//echo $fdate;
//echo $tdate;
$data['depmenu']=$this->dahsboard_Model->departmentmenu($fdate,$tdate);
$finyear = $this->input->post('financialyear');
$fa=substr( $finyear,0,-5);
$aa=substr( $finyear,5,5);
$data['depmenu']=$this->dahsboard_Model->departmentmenu($fdate,$tdate,$fa,$aa);
$data['financialyear']=$this->dahsboard_Model->cashbookfinyear();
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
$this->loadviews("cashbookall",$this->global,$data, NULL);
}

View File

@ -0,0 +1,18 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
ERROR - 2017-12-21 14:49:05 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\reportcashbook.php 230
ERROR - 2017-12-21 14:49:05 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\reportcashbook.php 230
ERROR - 2017-12-21 14:49:05 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\reportcashbook.php 230
ERROR - 2017-12-21 14:49:05 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\reportcashbook.php 230
ERROR - 2017-12-21 14:49:13 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\cashbookall.php 167
ERROR - 2017-12-21 14:49:13 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\cashbookall.php 167
ERROR - 2017-12-21 14:49:13 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\cashbookall.php 167
ERROR - 2017-12-21 14:49:13 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\cashbookall.php 167
ERROR - 2017-12-21 14:49:13 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\cashbookall.php 167
ERROR - 2017-12-21 14:49:13 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\cashbookall.php 167
ERROR - 2017-12-21 14:49:13 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\cashbookall.php 167
ERROR - 2017-12-21 14:49:13 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\cashbookall.php 167
ERROR - 2017-12-21 14:49:29 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\cashbookall.php 167
ERROR - 2017-12-21 14:49:29 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\cashbookall.php 167
ERROR - 2017-12-21 14:49:29 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\cashbookall.php 167
ERROR - 2017-12-21 14:49:29 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\cashbookall.php 167

View File

@ -1943,7 +1943,7 @@ if ($fa and $aa != ''){
$query = $this->db->query($sql);
return $query->result();
}
//home --this month//
function monthexpensereport()
{
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
@ -1968,31 +1968,22 @@ if ($fa and $aa != ''){
return $query->result();
}
function yearexpensereport()
{
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
ifnull(case
when tinc.type = 'PAYMENT'
then tinc.total
end,'0') as expense,
ifnull(case
when tinc.type = 'RECEIPT'
then tinc.total
end, '0') as income,
ifnull(case
when tinc.type = 'PAYMENT'
then tinc.towhom
end,'-') as paymentname,
ifnull(case
when tinc.type = 'RECEIPT'
then tinc.towhom
end, '-') as receiptname,
date_format(date,'%d-%m-%Y')as date,tinc.type,sum(tinc.total)as total,tinc.towhom,tinc.description,tinc.account_code,monthname(tinc.date)as month FROM t_income_expense tinc where year(date)= year(current_date()) group by month order by total desc limit 10 ";
//home--this year//
function yearexpensereport($fa,$aa)
{
$sql="select monthname(date) as month,
sum(if(type='PAYMENT',total,0)) as exp,
sum(if(type='RECEIPT',total,0)) as inc,
sum(total) as total
from t_income_expense
where date >= '".$fa."-04-01' and date <= '".$aa."-03-31'
group by month ";
$query = $this->db->query($sql);
return $query->result();
}
//home--report--Day Wise Report //
function today_data($value='')
{
$sql="SELECT type,Sum(total) as todaydata FROM t_income_expense WHERE type = ? AND DATE(date) = CURRENT_DATE";
@ -2046,6 +2037,7 @@ if ($fa and $aa != ''){
return $query->result();
}
//yearwise/month//
function yearmonthwise($sid='')
{
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
@ -2099,6 +2091,22 @@ function INRSymbol()
$query=$this->db->query($sql);
return $query->result();
}
function cashbookfinyear(){
$sql="SELECT
CASE WHEN MONTH(date)>=4 THEN
concat(YEAR(date), '-',YEAR(date)+1)
ELSE concat(YEAR(date)-1,'-', YEAR(date)) END AS financial_year
FROM t_income_expense
GROUP BY financial_year";
$query = $this->db->query($sql);
return $query->result();
}
function today()
{
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
@ -2128,7 +2136,7 @@ function INRSymbol()
// $query = $this->db->query($sql);
// return $query->result();
//}
//for menu link in monthly payments//
function monthlypayments()
{
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,.tinc.description, ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code WHERE MONTH(date) = MONTH(curdate()) group by account_code";
@ -2137,10 +2145,11 @@ function INRSymbol()
return $query->result();
}
function departmentmenu($fdate,$tdate)
//home page --Reports//
function departmentmenu($fdate,$tdate,$fa,$aa)
{
$fdate= date("Y-m-d",strtotime($fdate));
$tdate=date("Y-m-d",strtotime($tdate));
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
ifnull(case
when tinc.type = 'PAYMENT'
@ -2158,10 +2167,25 @@ function INRSymbol()
when tinc.type = 'RECEIPT'
then tinc.towhom
end, '-') as receiptname,
tinc.total,tinc.towhom,tinc.description,tinc.type,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code where tinc.date >= '".$fdate."' and tinc.date <= '".$tdate."'";
tinc.total,tinc.towhom,tinc.description,tinc.type,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code where tinc.date !=0 ";
if ($fdate and $tdate != ''){
$fdate= date("Y-m-d",strtotime($fdate));
$tdate=date("Y-m-d",strtotime($tdate));
$sql.="and date(tinc.date) >= '".$fdate."'
and date(tinc.date) <= '".$tdate."'";
}
if ($fa and $aa != ''){
$sql.=" and (tinc.date >= '".$fa."-04-01' and tinc.date <= '".$aa."-03-31')";
}
$query = $this->db->query($sql);
//echo $fdate;
//print_r($this->db->last_query());
//echo $sql;
return $query->result();
}

View File

@ -19,9 +19,14 @@ if(!empty($depmenu))
{
$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>
@ -73,9 +78,9 @@ if(!empty($depmenu))
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Report</b></p></h3></center>
<div class="box-body">
<div>
<div class="row">
<div class="col-md-4">
<div class="col-md-3">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
@ -88,7 +93,7 @@ if(!empty($depmenu))
</div>
<div class="col-md-4">
<div class="col-md-3">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
@ -99,13 +104,30 @@ if(!empty($depmenu))
</span>
</div>
</div>
<div class="col-md-2"><br>
<div class="col-md-3" style="margin-top:24px;">
<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-3" style="margin-top:24px;">
<input type="submit" class="btn btn-success" name="btn_submit"
value="View Report">
</div>
</div>
</form>
<br>
<br>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>

View File

@ -1,12 +1,20 @@
<?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>
@ -41,8 +49,36 @@ if(!empty($Indiancurrency))
<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(2017-2018)</b></p></h3></center>
</div>
<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>
@ -51,9 +87,9 @@ if(!empty($Indiancurrency))
<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;"> Amount <?php echo '('.$inrsymbol.')' ?></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>
@ -61,7 +97,8 @@ if(!empty($Indiancurrency))
</thead>
<tbody>
<?php
$ti=0.00;
$tvt=0.00;
if(!empty($yearlyreport)){
foreach($yearlyreport as $yr)
{
@ -71,12 +108,12 @@ if(!empty($Indiancurrency))
<!--<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->income,2,'.','');
echo number_format($yr->income,2,'.','');?></span></td>
<td align="right"><span><?php
$tvt= $tvt + number_format($yr->expense,2,'.','');
echo number_format($yr->expense,2,'.','');?></span></td>-->
$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>