hall and profit
This commit is contained in:
parent
c3c555a828
commit
f89e4561ad
@ -995,7 +995,7 @@ class DayBook_model extends CI_Model
|
||||
$subQuery= 'SELECT
|
||||
DISTINCT(p.Name) AS TID,ListName,
|
||||
SUM(IF(p.Name=?,Amount,0)) AS Income,
|
||||
SUM(IF(p.Name=?,Amount,0)) AS Expense,
|
||||
SUM(IF(p.Name=? and p.Status !=?,Amount,0)) AS Expense,
|
||||
SUM( CASE Name
|
||||
WHEN ? THEN Amount
|
||||
WHEN ? THEN Amount
|
||||
@ -1003,23 +1003,23 @@ class DayBook_model extends CI_Model
|
||||
FROM
|
||||
T_DayBookMaster AS p
|
||||
join T_PickListDetails on T_PickListDetails.ListCode = p.name
|
||||
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? and p.IsActive=? and (p.Name=? or p.Name=?) and (p.ModeOfPayment != ? and p.ModeOfPayment != ? ) and Status !=? and p.BranchCode=? and p.Isdaybook=?
|
||||
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? and p.IsActive=? and (p.Name=? and p.Status !=? or p.Name=?) and (p.ModeOfPayment != ? and p.ModeOfPayment != ? ) and Status !=? and p.BranchCode=?
|
||||
GROUP BY p.`Name`';
|
||||
|
||||
$query = $this->db->query($subQuery,array($incomecode,$expensecode,$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','I002','WAIVER','REFERRAL','Cancel',$br,'1'));
|
||||
$query = $this->db->query($subQuery,array($incomecode,$expensecode,'Pending',$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','Pending','I002','WAIVER','REFERRAL','Cancel',$br));
|
||||
$expense = $query->result();
|
||||
// print_r($this->db->last_query());die();
|
||||
if(count($expense) > 0)
|
||||
{
|
||||
// print_r($this->db->last_query());die();and p.Isdaybook=?
|
||||
// if(count($expense) > 0)
|
||||
// {
|
||||
$results['expense_data'] = $expense;
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
|
||||
$subQueryNON= 'SELECT
|
||||
DISTINCT(q.Name) AS TID,ListName,T_Income_Outcome_Master.TypeID as Orgtype,
|
||||
SUM(IF(q.Name=?,Amount,0)) AS Income,
|
||||
SUM(IF(q.Name=?,Amount,0)) AS Expense,
|
||||
SUM(IF(q.Name=? ,Amount,0)) AS Expense,
|
||||
|
||||
SUM( CASE Name
|
||||
WHEN ? THEN Amount
|
||||
@ -1035,10 +1035,10 @@ class DayBook_model extends CI_Model
|
||||
$querynon = $this->db->query($subQueryNON,array($incomecode,$expensecode,$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','I002','Cancel',$br,'1'));
|
||||
$expensenon = $querynon->result();
|
||||
|
||||
if(count($expensenon)>0)
|
||||
{
|
||||
// if(count($expensenon)>0)
|
||||
// {
|
||||
$results['expense_data_nonop'] = $expensenon;
|
||||
}
|
||||
// }
|
||||
|
||||
// print_r($results);die();
|
||||
return $results;
|
||||
@ -1056,11 +1056,11 @@ class DayBook_model extends CI_Model
|
||||
$subQuery='select Name,sum(Amount) as Total,T_DayBookMaster.ID,T_Income_Outcome_Master.ID as SubID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,T_DayBookMaster.Date,Reason,T_DayBookMaster.Description,ListName from T_DayBookMaster
|
||||
left join T_Income_Outcome_Master on T_Income_Outcome_Master.ID = T_DayBookMaster.Type
|
||||
join T_PickListDetails on T_PickListDetails.ListCode = T_Income_Outcome_Master.TypeID
|
||||
where str_to_date(date,?)>=? and str_to_date(date,?)<=? and Status!=? and T_DayBookMaster.BranchCode=? and T_DayBookMaster.Isdaybook=? group by Type,Name';
|
||||
where str_to_date(date,?)>=? and str_to_date(date,?)<=? and Status!=? and T_DayBookMaster.BranchCode=? and (T_DayBookMaster.ModeOfPayment != ? and T_DayBookMaster.ModeOfPayment != ?and T_DayBookMaster.Status !=?) group by Type,Name';
|
||||
|
||||
$query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Cancel',$branch,'1'));
|
||||
$query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Cancel',$branch,'WAIVER','REFERRAL','Pending'));
|
||||
|
||||
|
||||
//and T_DayBookMaster.Isdaybook=?
|
||||
$expense = $query->result();
|
||||
|
||||
|
||||
|
||||
@ -1010,7 +1010,7 @@ BalFees.semyr');
|
||||
$studetdetails['balpayable'] =$r->balpayable;
|
||||
$course = $r->CourseID;
|
||||
|
||||
// $studetdetails['FeeDetails'] = $this->getFeeSemesterDetails($r->StudentID,$batch,$branchId,$course);
|
||||
$studetdetails['FeeDetails'] = $this->getFeeSemesterDetails($r->StudentID,$batch,$branchId,$course);
|
||||
$studetdetails['CourseID'] = $r->CourseID;
|
||||
$studetdetails['CourseName'] = $r->CourseName;
|
||||
$studetdetails['balpayable'] =$r->balpayable;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user