0001613: Issue in Certificate and 0001628: Total Balance

This commit is contained in:
sriramv 2019-01-23 17:45:43 +05:30
parent aaeb413ad3
commit 69069950be
2 changed files with 10 additions and 4 deletions

View File

@ -752,6 +752,8 @@ $sql="select sum(TotalBalance) as total FROM (select (sum(totalpayable) - sum(to
GROUP BY std.AdmittedBy , bcode) b group by bcode ORDER BY BDate DESC) final";
$ltd=$this->db->query($sql);
//print_r($sql);
$tlead = $ltd->result();
if (count($tlead) > 0) {
$results['lList'] = true;
@ -789,8 +791,8 @@ $sql="select sum(TotalBalance) as total FROM (select (sum(totalpayable) - sum(to
LEFT JOIN T_StudentDetails std ON std.StudentID = a.StudentID
LEFT JOIN T_StaffDetails sd ON sd.StaffID = std.AdmittedBy
LEFT JOIN T_BatchMaster bm ON bm.BatchCode = a.BatchCode
where a.BranchCode = '".$branchId."' and a.BatchCode != 'Not applicable'
GROUP BY std.AdmittedBy , bcode) b where uid = '".$univ."' ";
where a.BranchCode = '".$branchId."' and bm.UniversityID = '".$univ."' and a.BatchCode != 'Not applicable'
GROUP BY std.AdmittedBy , bcode) b ";
// if($univ != ''){
// $sql.= " where uid = '".$univ."' ";

View File

@ -208,7 +208,7 @@ union
SELECT app.ID,app.StudentID as sid,app.CourseID as cid,app.BranchCode as branch,app.ListCode as lcode,p.ListName as status,AppDate as adate,app.Comments as acmts,CertificationType as ctype,app.CertificationType as certname,sum(bal.balpayable) as balance
FROM T_ApplicationStatus as app
left join T_PickListDetails p on p.ListCode = app.ListCode
left join BalFees bal on bal.student=app.StudentID and bal.course=app.CourseID
left join BalFees bal on bal.student=app.StudentID and bal.course=app.CourseID and bal.feestype = app.CertificationType
where app.CertificationType not like 'CERT%' and app.ID IN (SELECT max(ID) FROM T_ApplicationStatus group by StudentID,CourseID,BranchCode,CertificationType)
group by app.ID) as sms
left join
@ -267,6 +267,9 @@ left join
}
$sql.=" group by Student_id,cid,ctype";
// echo $sql;
//print_r($sql);
$leadDet=$this->db->query($sql);
$cert_statusDetails = $leadDet->result();
if (count($cert_statusDetails) > 0) {
@ -1059,7 +1062,8 @@ from T_Lead_Tracking_Followup as ltf
$result['universityName'] = "";
$result['batchDetails']= "";
}
// print_r( $this->db->last_query());
// die();
return $result;