changes : ps

This commit is contained in:
Sanjeev 2021-01-07 22:26:07 +05:30
parent 655611507b
commit 40c3d877a7
4 changed files with 16 additions and 14 deletions

View File

@ -1123,19 +1123,19 @@ class DayBook_model extends CI_Model
// echo $from.'ff';
// echo $to.'to';
$incomecode='I002';
$expensecode='I001';
$fromd= date("Y-m-d",strtotime($from));
$tod=date("Y-m-d",strtotime($to));
// echo $fromd;
// echo $tod;
// die();
if($from != null && $to != null){
$where="str_to_date(Date,'%d-%m-%Y')>=".$fromd." and str_to_date(Date,'%d-%m-%Y')<=".$tod." and";
$where="str_to_date(Date,'%d-%m-%Y')>='".$fromd."' and str_to_date(Date,'%d-%m-%Y')<='".$tod."' and";
}else{
$where="";
}
$subQuery= 'SELECT
DISTINCT(p.Name) AS TID,ListName,
SUM(IF(p.Name=?,Amount,0)) AS Income,
@ -1152,7 +1152,6 @@ class DayBook_model extends CI_Model
$query = $this->db->query($subQuery,array($incomecode,$expensecode,'Pending',$incomecode,$expensecode,'1','I001','Pending','I002','WAIVER','REFERRAL','Cancel',$br));
$expense = $query->result();
// print_r($this->db->last_query());die();
// and p.Isdaybook=?
// if(count($expense) > 0)
// {
@ -1192,11 +1191,11 @@ class DayBook_model extends CI_Model
public function getIncome_Details($from,$to,$incid,$branch)
{
$fromd= date("d-m-Y",strtotime($from));
$tod=date("d-m-Y",strtotime($to));
$fromd= date("Y-m-d",strtotime($from));
$tod=date("Y-m-d",strtotime($to));
$expid = 'I001';
if($from != null && $to != null){
$where="str_to_date(Date,'%d-%m-%Y')>=str_to_date('".$fromd."','%d-%m-%Y') and str_to_date(Date,'%d-%m-%Y')<=str_to_date('".$tod."','%d-%m-%Y') and";
$where="str_to_date(Date,'%d-%m-%Y')>='".$fromd."' and str_to_date(Date,'%d-%m-%Y')<='".$tod."' and";
}else{
$where="";
}
@ -1308,7 +1307,8 @@ public function GetPLexcelDetails($from,$to,$branch)
// $query = $this->db->query($subQuery,array('I002','I002','I001','I001','I002','I002','I001','I001','%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,$branch,'%d-%m-%Y'));
if($from != null && $to != null){
$where="str_to_date(Date,'%d-%m-%Y')>=str_to_date('".$fromd."','%d-%m-%Y') and str_to_date(Date,'%d-%m-%Y')<=str_to_date('".$tod."','%d-%m-%Y') and";
//$where="str_to_date(Date,'%d-%m-%Y')>=str_to_date('".$fromd."','%d-%m-%Y') and str_to_date(Date,'%d-%m-%Y')<=str_to_date('".$tod."','%d-%m-%Y') and";
$where="str_to_date(Date,'%d-%m-%Y')>='".$from."' and str_to_date(Date,'%d-%m-%Y')<='".$to."' and";
}else{$where="";}
$subQuery='select Name,ListName,q.Date as dat,month(str_to_date(Date,?)) as month,year(str_to_date(Date,?)) as Year,

View File

@ -1214,6 +1214,7 @@ class Fees_status_model extends CI_Model
// echo 'Set Fee Function ** ';
// print_r($details);
// print_r($jsonData);
// die();
$RollNo= $details['RollNo'];
@ -1259,9 +1260,10 @@ class Fees_status_model extends CI_Model
for($j=0;$j<count($result);$j++)
{
$a = $result[$j]['Sem_Year'];
if($a == 'Sem1'){$check++;}
$b = $result[$j]['ProgramType'];
if($a == 'Sem1' && ($b == REGULARFEES || $b == SEMYEARFEES)){$check++;}
if($a == 'Sem3' && ($b == LATERALFEES || $b == SEMYEARFEES)){$check++;}
}
// select cf.Sem_Year
// from T_Students_Fees_Status sfs
// left join T_Course_Fees_Details cf on sfs.CourseID = cf.CourseID

View File

@ -573,7 +573,7 @@ sfs.branch = '".$br."'";
$sql.=" and sfs.fid IS not null";
$sql.=" group by Student_id,cid,fid,ctype";
$sql.=" ORDER BY sfb.bdate ASC";
//echo $sql;
// echo $sql;die();
$leadDet=$this->db->query($sql);

View File

@ -111,8 +111,8 @@ app.controller('income_reportCtrl', ["$scope","$rootScope","toaster", "$filter",
$scope.PLexceldetails='';
$scope.expense ='';
$scope.alldata='';
// from : $filter('date')(new Date($scope.filters.from_date), "dd-MM-yyyy"),
// to : $filter('date')(new Date($scope.filters.to_date), "dd-MM-yyyy")
var response_data = {
method: 'POST',
url: apiPoint.url + 'IncomeExpenseDetails/',