report issues
This commit is contained in:
parent
378758da59
commit
4402865f7e
@ -200,7 +200,8 @@ left join
|
|||||||
left join
|
left join
|
||||||
(SELECT StudentID as sid,MobileNumber as phone,IsActive as active,FirstName as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid
|
(SELECT StudentID as sid,MobileNumber as phone,IsActive as active,FirstName as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid
|
||||||
left join
|
left join
|
||||||
(SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and scd.cid=sms.cid and sms.branch = '".$br."'
|
(SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and scd.cid=sms.cid
|
||||||
|
where sms.branch = '".$br."'
|
||||||
";
|
";
|
||||||
|
|
||||||
if ($bat!= ''){
|
if ($bat!= ''){
|
||||||
@ -422,29 +423,53 @@ group by sid,Sem
|
|||||||
}
|
}
|
||||||
public function app_pending($bat=null,$br=null,$u=null){
|
public function app_pending($bat=null,$br=null,$u=null){
|
||||||
|
|
||||||
$sql = "SELECT
|
$sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(sms.cid,'-') as Course_id,ifnull(cfd.syear,'-') as Sem_year,ifnull(sms.branch,'-') as Branch_code,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,ifnull(sms.status,'-') as Status,ifnull(sfp.bdate,'-') as Admission_date,
|
||||||
APFS.ListCode as StatusCode,
|
sms.adate as appdate,ifnull(reg.formtype,'-') as formtype,sfs.batch as batch
|
||||||
APFS.AppFormDate as StatusUpdationOn,
|
from
|
||||||
APFS.Comments as StatusComments,
|
(SELECT ID,StudentID as sid,CourseID as cid,app.BranchCode as branch,list.ListName as status,app.ListCode as lcode,AppDate as adate,Comments as acmts,app.CertificationType as ctype,CertificateName as certname
|
||||||
PKL.ListName as StatusName,
|
FROM T_ApplicationStatus as app
|
||||||
concat(STU.Firstname,' ', STU.Lastname) as Student_name,
|
left join T_CertificationMaster cm on cm.CertificationID=app.CertificationType
|
||||||
STU.Fathername as FatherName,
|
left join T_PickListDetails list on list.ListCode=app.ListCode
|
||||||
STU.MobileNumber as Phone_number,
|
where CertificateName like 'APPLICATION%' and list.ListName != 'SENT TO UNIVERSITY' and ID IN (SELECT max(ID) FROM T_ApplicationStatus group by StudentID,CourseID,BranchCode,CertificationType,ListCode)
|
||||||
COUR.CourseName as CourseName,
|
group by sid,cid,lcode,branch,ctype) as sms
|
||||||
UNIV.UniversityName as UniversityName,
|
left join
|
||||||
sfpd.BILL as InitialPayDate,
|
(select StudentID as sid,CourseID as cid,BatchCode as batch,FeesID as fid from T_Students_Fees_Status) as sfs on sfs.sid=sms.sid and sfs.cid=sms.cid
|
||||||
RD.Student_Fee_Status_Id as FeesStatusID,
|
left join
|
||||||
STU_COUR.EnrollmentID as EnrollmentNumber,
|
(SELECT ID,StudentID as sid,FeesId as fid,BillDate as bdate,sum(BillAmount) as bamount,BillNO as billno FROM T_Students_Fees_PaidDetails
|
||||||
CFD.Sem_Year as Sem_Year,
|
WHERE IsActive = 1 and ID IN (SELECT min(ID) FROM T_Students_Fees_PaidDetails group by StudentID,FeesID)
|
||||||
RD.RegistrationType as FormType,
|
group by sid,fid,billno)
|
||||||
STU.StudentID
|
as sfp on sfp.sid=sfs.sid and sfs.fid=sfp.fid
|
||||||
FROM T_ApplicationFormStatus as APFS +LEFT JOIN T_Registration_Details as RD ON RD.ID = APFS.Registration_Details_ID
|
left join
|
||||||
LEFT JOIN T_PickListDetails as PKL ON PKL.ListCode = APFS.ListCode +LEFT JOIN T_StudentDetails as STU ON STU.StudentID = RD.StudentID +LEFT JOIN T_CourseMaster as COUR ON COUR.CourseID = RD.CourseID +LEFT JOIN T_Student_CourseDetails as STU_COUR ON STU_COUR.StudentID = RD.StudentID AND STU_COUR.CourseID = RD.CourseID
|
(SELECT ID as cid,CourseID as ccid,FeesType as ftype,Sem_Year as syear FROM T_Course_Fees_Details) as cfd on cfd.ccid=sms.cid
|
||||||
LEFT JOIN T_Course_Fees_Details as CFD ON CFD.ID = RD.FeeType
|
left join
|
||||||
LEFT JOIN T_UniversityMaster as UNIV ON UNIV.UniversityID = COUR.UniversityID
|
(SELECT CourseID as cid,cm.UniversityID as cuid,u.UniversityID as uid,CourseName as course,
|
||||||
LEFT JOIN (Select FeesId as FeeID, min(CreatedOn), BillDate as BILL FROM apollod4_ApolloDECDev.T_Students_Fees_PaidDetails group by FeesId) as sfpd on sfpd.FeeID = RD.Student_Fee_Status_Id
|
UniversityName as uname,cm.BranchCode as branch FROM T_CourseMaster as cm
|
||||||
where COUR.UniversityID = '$u' and RD.BatchCode = '$bat'and STU_COUR.BranchID = '$br' and STU.IsActive = '1'
|
left join T_UniversityMaster as u on u.UniversityID=cm.UniversityID
|
||||||
group by APFS.Registration_Details_ID";
|
group by cid
|
||||||
|
order by CourseID)
|
||||||
|
as cm on cm.cid=cfd.ccid
|
||||||
|
left join
|
||||||
|
(SELECT StudentID as sid,MobileNumber as phone,IsActive as active,FirstName as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid
|
||||||
|
left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and scd.cid=sms.cid and scd.branch=sms.branch
|
||||||
|
left join
|
||||||
|
(Select StudentID as sid,CourseID as cid,BatchCode as bcode,FeeType as ftype,BranchCode as branch,RegistrationType as formtype from T_Registration_Details) as reg on reg.sid=sms.sid and reg.cid=sms.cid
|
||||||
|
|
||||||
|
where std.active = 1 and sms.branch = '".$br."'
|
||||||
|
";
|
||||||
|
|
||||||
|
if ($bat!= ''){
|
||||||
|
|
||||||
|
$sql.=" and sfs.batch = '".$bat."'";
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($u!= ''){
|
||||||
|
|
||||||
|
$sql.=" and cm.uid = '".$u."'";
|
||||||
|
|
||||||
|
}
|
||||||
|
$sql.=" group by Student_id,Course_id,Branch_code,Sem_year";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$leadDet=$this->db->query($sql);
|
$leadDet=$this->db->query($sql);
|
||||||
$answer = $leadDet->result();
|
$answer = $leadDet->result();
|
||||||
@ -823,407 +848,6 @@ from T_Lead_Tracking_Followup as ltf
|
|||||||
// die();
|
// die();
|
||||||
|
|
||||||
|
|
||||||
$subQuery='SELECT T_StudentDetails.StudentID,DOJ,BatchName,CourseName ,T_Student_CourseDetails.UniversityID, T_Student_CourseDetails.CourseID, Firstname,T_StudentDetails. MobileNumber, Fathername, UniversityName,CourseName FROM T_Student_CourseDetails
|
|
||||||
JOIN T_StudentDetails ON T_StudentDetails.StudentID=T_Student_CourseDetails.StudentID
|
|
||||||
JOIN T_UniversityMaster ON T_UniversityMaster.UniversityID=T_Student_CourseDetails.UniversityID JOIN T_CourseMaster ON T_CourseMaster.CourseID=T_Student_CourseDetails.CourseID
|
|
||||||
left JOIN T_Registration_Details ON T_Registration_Details.CourseID = T_Student_CourseDetails.CourseID and T_Registration_Details.StudentID=T_Student_CourseDetails.StudentID
|
|
||||||
left JOIN T_BatchMaster ON T_BatchMaster.BatchCode = T_Registration_Details.BatchCode
|
|
||||||
WHERE T_Registration_Details.RegistrationType = ? and str_to_date(DOJ,?)>=? and str_to_date(DOJ,?)<=? and T_Registration_Details.RegistrationMode=? and T_Student_CourseDetails.UniversityID=? group by T_Registration_Details.StudentID';
|
|
||||||
|
|
||||||
$query = $this->db->query($subQuery,array(NEWREGISTRATION_CONST,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1',$university));
|
|
||||||
|
|
||||||
|
|
||||||
$searchDetails =$query->result();
|
|
||||||
//print_r( $this->db->last_query());
|
|
||||||
//die();
|
|
||||||
|
|
||||||
//print_r($searchDetails);die();
|
|
||||||
|
|
||||||
|
|
||||||
if($searchDetails)
|
|
||||||
{
|
|
||||||
|
|
||||||
//print_r($searchDetails->result());
|
|
||||||
$result_array['searchst'] = true;
|
|
||||||
$result_array['details'] = $query->result();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$result_array['searchst'] = false;
|
|
||||||
$result_array['details'] = "No records found!";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return $result_array;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
public function doc_pending($bat=null,$br=null,$u=null){
|
|
||||||
|
|
||||||
$sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(sfs.cid,'-') as Course_id,ifnull(sfs.batch,'-') as Batch_code,ifnull(sfs.branch,'-') as Branch_code,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,ifnull(sms.status,'-') as Status,sms.certname as certname,ifnull(sfp.bdate,'-') as Admission_date,sms.follow_date as fdate
|
|
||||||
from
|
|
||||||
(select StudentID as sid,Details as certname,DocumentDate as follow_date,StatusName as status
|
|
||||||
from T_Student_DocumentTrack_Details
|
|
||||||
where StatusName not like 'CLOSED') as sms
|
|
||||||
left join
|
|
||||||
(SELECT FeesID as fid,BatchCode as batch,StudentID as sid,CourseID as cid,FeesType as ftype,BranchCode as branch
|
|
||||||
FROM T_Students_Fees_Status
|
|
||||||
group by sid,fid,cid,batch)
|
|
||||||
as sfs on sfs.sid=sms.sid
|
|
||||||
left join
|
|
||||||
(SELECT ID,StudentID as sid,FeesId as fid,BillDate as bdate,sum(BillAmount) as bamount,BillNO as billno FROM T_Students_Fees_PaidDetails
|
|
||||||
WHERE IsActive = 1 and ID IN (SELECT min(ID) FROM T_Students_Fees_PaidDetails group by StudentID,FeesID)
|
|
||||||
group by sid,fid,billno)
|
|
||||||
as sfp on sfp.sid=sfs.sid and sfp.fid=sfs.fid
|
|
||||||
left join
|
|
||||||
(SELECT ID as cid,CourseID as ccid,FeesType as ftype,Sem_Year as syear FROM T_Course_Fees_Details) as cfd on cfd.ccid=sfs.cid and cfd.cid=sfs.ftype
|
|
||||||
left join
|
|
||||||
(SELECT CourseID as cid,cm.UniversityID as cuid,u.UniversityID as uid,CourseName as course,
|
|
||||||
UniversityName as uname,cm.BranchCode as branch FROM T_CourseMaster as cm
|
|
||||||
left join T_UniversityMaster as u on u.UniversityID=cm.UniversityID
|
|
||||||
group by cid
|
|
||||||
order by CourseID)
|
|
||||||
as cm on cm.cid=cfd.ccid
|
|
||||||
left join
|
|
||||||
(SELECT StudentID as sid,MobileNumber as phone,IsActive as active,FirstName as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid
|
|
||||||
left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid
|
|
||||||
where std.active = 1 and sfs.branch = '".$br."'
|
|
||||||
|
|
||||||
";
|
|
||||||
|
|
||||||
if ($bat!= ''){
|
|
||||||
|
|
||||||
$sql.=" and sfs.batch = '".$bat."'";
|
|
||||||
|
|
||||||
}
|
|
||||||
if ($u!= ''){
|
|
||||||
|
|
||||||
$sql.=" and cm.uid = '".$u."'";
|
|
||||||
|
|
||||||
}
|
|
||||||
$sql.="group by Student_id,Course_id,Batch_code,Branch_code,certname";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$leadDet=$this->db->query($sql);
|
|
||||||
$answer = $leadDet->result();
|
|
||||||
if (count($answer) > 0) {
|
|
||||||
$results['doc_pendingList'] = true;
|
|
||||||
$results['doc_pending_data'] = $answer;
|
|
||||||
} else {
|
|
||||||
$results['doc_pendingList'] = false;
|
|
||||||
$results['message'] = 'No record found';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $results;
|
|
||||||
|
|
||||||
}
|
|
||||||
public function wav_ref($bat=null,$br=null,$u=null){
|
|
||||||
|
|
||||||
$sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(cfd.syear,'-') as Sem_year,ifnull(sfs.batch,'-') as Batch_code,ifnull(scd.branch,'-') as Branch_code,ifnull(sfs.cid,'-') as Course_id,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,staff.FirstName as staffname,ifnull(sms.waiver_bill,'-') as Waiver_bill,ifnull(sms.waiver,0) as Waiver_amount,ifnull(sms.referal_bill,'-') as Referal_bill,ifnull(sms.referal,0) as Referal_amount,ifnull(sms.cmts,'-') as Comments,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber
|
|
||||||
from
|
|
||||||
(SELECT StudentID as sid,CreatedBy as lid,CommentsForStudent as cmts,FeesId as fid,
|
|
||||||
IF(ModeOfPayment = 'WAIVER', BillNO,'-') AS waiver_bill,
|
|
||||||
IF(ModeOfPayment = 'WAIVER', sum(BillAmount), 0) AS waiver,
|
|
||||||
IF(ModeOfPayment = 'REFERRAL', BillNO,'-') AS referal_bill,
|
|
||||||
IF(ModeOfPayment = 'REFERRAL', sum(BillAmount), 0) AS referal FROM T_Students_Fees_PaidDetails
|
|
||||||
where IsActive = 1 and ModeOfPayment = 'WAIVER' or ModeOfPayment = 'REFERRAL'
|
|
||||||
group by fid,waiver_bill,referal_bill) as sms
|
|
||||||
left join
|
|
||||||
(SELECT FeesID as fid,BatchCode as batch,StudentID as sid,CourseID as cid,FeesType as ftype FROM T_Students_Fees_Status
|
|
||||||
group by sid,cid,fid,batch) as sfs on sfs.sid=sms.sid and sfs.fid=sms.fid
|
|
||||||
left join
|
|
||||||
(SELECT ID as cid,CourseID as ccid,FeesType as ftype,Sem_Year as syear FROM T_Course_Fees_Details) as cfd on cfd.ccid=sfs.cid and cfd.cid=sfs.ftype
|
|
||||||
left join
|
|
||||||
(SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sfs.sid and scd.cid=sfs.cid
|
|
||||||
left join
|
|
||||||
(SELECT CourseID as cid,cm.UniversityID as cuid,u.UniversityID as uid,CourseName as course,
|
|
||||||
UniversityName as uname,cm.BranchCode as branch FROM T_CourseMaster as cm
|
|
||||||
left join T_UniversityMaster as u on u.UniversityID=cm.UniversityID
|
|
||||||
group by cid
|
|
||||||
order by CourseID)
|
|
||||||
as cm on cm.cid=cfd.ccid
|
|
||||||
left join
|
|
||||||
(SELECT StudentID as sid,MobileNumber as phone,IsActive as active,FirstName as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid
|
|
||||||
left join
|
|
||||||
T_Login as login on login.ID=sms.lid
|
|
||||||
left join
|
|
||||||
T_StaffDetails as staff on staff.StaffID=login.StaffID
|
|
||||||
where std.active = 1 and scd.branch = '".$br."'
|
|
||||||
|
|
||||||
";
|
|
||||||
|
|
||||||
if ($bat!= ''){
|
|
||||||
|
|
||||||
$sql.=" and sfs.batch = '".$bat."'";
|
|
||||||
|
|
||||||
}
|
|
||||||
if ($u!= ''){
|
|
||||||
|
|
||||||
$sql.=" and cm.uid = '".$u."'";
|
|
||||||
|
|
||||||
}
|
|
||||||
$sql.=" group by Student_id,Course_id,Batch_code,Branch_code,Waiver_bill,Referal_bill,Sem_year";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$leadDet=$this->db->query($sql);
|
|
||||||
$answer = $leadDet->result();
|
|
||||||
if (count($answer) > 0) {
|
|
||||||
$results['wav_refList'] = true;
|
|
||||||
$results['wav_ref_data'] = $answer;
|
|
||||||
} else {
|
|
||||||
$results['wav_refList'] = false;
|
|
||||||
$results['message'] = 'No record found';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $results;
|
|
||||||
|
|
||||||
}
|
|
||||||
public function examfee($bat=null,$br=null,$u=null){
|
|
||||||
|
|
||||||
$sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(cfd.syear,'-') as Sem_year,ifnull(sms.batch,'-') as Batch_code,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,ifnull(sms.cid,'-') as Course_id,ifnull(sms.cmts,'-') as Comments,ifnull(sms.stf,'-') as Amount,ifnull(sms.branch,'-') as Branch_code,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber
|
|
||||||
from
|
|
||||||
(SELECT FeesID as fid,BatchCode as batch,StudentID as sid,CourseID as cid,FeesType as ftype,sum(CourseFees) as cf,Sum(STFOrWR) as stf,sum(Others) as others,Comments as cmts,BranchCode as branch FROM T_Students_Fees_Status
|
|
||||||
where STFOrWR != ''
|
|
||||||
group by sid,fid,batch,cid) as sms
|
|
||||||
left join
|
|
||||||
(SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and scd.cid=sms.cid
|
|
||||||
|
|
||||||
left join
|
|
||||||
(SELECT ID as cid,CourseID as ccid,FeesType as ftype,Sem_Year as syear FROM T_Course_Fees_Details) as cfd on cfd.ccid=sms.cid and cfd.cid=sms.ftype
|
|
||||||
left join
|
|
||||||
(SELECT CourseID as cid,cm.UniversityID as cuid,u.UniversityID as uid,CourseName as course,
|
|
||||||
UniversityName as uname,cm.BranchCode as branch FROM T_CourseMaster as cm
|
|
||||||
left join T_UniversityMaster as u on u.UniversityID=cm.UniversityID
|
|
||||||
group by cid
|
|
||||||
order by CourseID)
|
|
||||||
as cm on cm.cid=sms.cid
|
|
||||||
left join
|
|
||||||
(SELECT StudentID as sid,MobileNumber as phone,IsActive as active,FirstName as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid
|
|
||||||
where std.active = 1 and sms.branch = '".$br."'
|
|
||||||
|
|
||||||
";
|
|
||||||
|
|
||||||
if ($bat!= ''){
|
|
||||||
|
|
||||||
$sql.=" and sms.batch = '".$bat."'";
|
|
||||||
|
|
||||||
}
|
|
||||||
if ($u!= ''){
|
|
||||||
|
|
||||||
$sql.=" and cm.uid = '".$u."'";
|
|
||||||
|
|
||||||
}
|
|
||||||
$sql.=" group by Student_id,Course_id,Batch_code,Branch_code,Sem_year";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$leadDet=$this->db->query($sql);
|
|
||||||
$answer = $leadDet->result();
|
|
||||||
if (count($answer) > 0) {
|
|
||||||
$results['examfeeList'] = true;
|
|
||||||
$results['examfee_data'] = $answer;
|
|
||||||
} else {
|
|
||||||
$results['examfeeList'] = false;
|
|
||||||
$results['message'] = 'No record found';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $results;
|
|
||||||
|
|
||||||
}
|
|
||||||
public function balfee($bat=null,$br=null,$u=null){
|
|
||||||
|
|
||||||
$sql = "SELECT ifnull(sfp.StudentID,'-') as Student_id,scd.EnrollmentID as eid,sfs.CourseID as cid,std.MobileNumber as Phone_number,FirstName as Student_name,Fathername as Father_name,PermanentAddress as address,AlternateNumber,date_format(std.CreatedOn,'%d-%m-%Y') as regdate,cm.CourseName as Course_name,u.UniversityName as University,sfp.FeesID as fid,(CourseFees + STFOrWR + Others) as Total,ifnull((sfp.BillAmount),0) as Paid_fee,((CourseFees + STFOrWR + Others) - sfp.BillAmount) as balance,cfd.Sem_Year as Sem_year,std.PermanentAddress as address,std.AlternateNumber as AlternateNumber,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 1 THEN sfp.BillNO END),'-') as billno1,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 1 THEN sfp.BillAmount END),0) as billamt1,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 2 THEN sfp.BillNO END),'-') as billno2,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 2 THEN sfp.BillAmount END),0) as billamt2,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 3 THEN sfp.BillNO END),'-') as billno3,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 3 THEN sfp.BillAmount END),0) as billamt3,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 4 THEN sfp.BillNO END),'-') as billno4,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 4 THEN sfp.BillAmount END),0) as billamt4,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 5 THEN sfp.BillNO END),'-') as billno5,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 5 THEN sfp.BillAmount END),0) as billamt5,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 6 THEN sfp.BillNO END),'-') as billno6,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 6 THEN sfp.BillAmount END),0) as billamt6,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 7 THEN sfp.BillNO END),'-') as billno7,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 7 THEN sfp.BillAmount END),0) as billamt7,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 8 THEN sfp.BillNO END),'-') as billno8,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 8 THEN sfp.BillAmount END),0) as billamt8,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 9 THEN sfp.BillNO END),'-') as billno9,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 9 THEN sfp.BillAmount END),0) as billamt9,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 10 THEN sfp.BillNO END),'-') as billno10,
|
|
||||||
ifnull(MAX(CASE WHEN Installment = 10 THEN sfp.BillAmount END),0) as billamt10
|
|
||||||
|
|
||||||
FROM T_Students_Fees_PaidDetails as sfp
|
|
||||||
left join T_Students_Fees_Status sfs on sfs.FeesID=sfp.FeesID
|
|
||||||
left join T_Course_Fees_Details cfd on cfd.ID=sfs.FeesType
|
|
||||||
left join T_CourseMaster cm on cm.CourseID=sfs.CourseID
|
|
||||||
left join T_UniversityMaster u on u.UniversityID=cm.UniversityID
|
|
||||||
left join T_StudentDetails std on std.StudentID=sfp.StudentID and std.IsActive = 1
|
|
||||||
left join T_Student_CourseDetails scd on scd.StudentID=sfs.StudentID and scd.CourseID=sfs.CourseID
|
|
||||||
where sfp.IsActive = 1 and sfp.UpdatedBy = '".$br."'
|
|
||||||
|
|
||||||
";
|
|
||||||
|
|
||||||
if ($bat!= ''){
|
|
||||||
|
|
||||||
$sql.=" and sfs.BatchCode = '".$bat."'";
|
|
||||||
|
|
||||||
}
|
|
||||||
if ($u!= ''){
|
|
||||||
|
|
||||||
$sql.=" and u.UniversityID = '".$u."'";
|
|
||||||
|
|
||||||
}
|
|
||||||
$sql.=" group by Student_id,fid";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$leadDet=$this->db->query($sql);
|
|
||||||
$answer = $leadDet->result();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (count($answer) > 0) {
|
|
||||||
$results['balfeeList'] = true;
|
|
||||||
$results['balfee_data'] = $answer;
|
|
||||||
} else {
|
|
||||||
$results['balfeeList'] = false;
|
|
||||||
$results['message'] = 'No record found';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $results;
|
|
||||||
|
|
||||||
}
|
|
||||||
public function lead($from=null,$to=null,$br=null){
|
|
||||||
|
|
||||||
$sql = "select InteractionID,date_format(ltf.CreatedOn,'%d-%m-%Y') as date,ltf.TrackingID as tid,ltf.FollowupOn as fup,ld.LeadName as name,ld.MobileNumber as mobile,lt.University as univ,lt.Course as course,lt.Course as prvStatus,list.ListName as prsStatus,ltf.FollowupComments as cmnts,ifnull(am.ActivityName,'-') as activity,sd.FirstName as AssignTo
|
|
||||||
from T_Lead_Tracking_Followup as ltf
|
|
||||||
left join T_Lead_Tracking lt on lt.TrackingID=ltf.TrackingID
|
|
||||||
join T_Login l on l.ID=lt.AssignedTo
|
|
||||||
join T_StaffDetails sd on sd.StaffID=l.StaffID
|
|
||||||
left join T_Lead_Details ld on ld.LeadID=lt.LeadID
|
|
||||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
|
||||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
|
||||||
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID) and lt.CreatedBranch = '".$br."'
|
|
||||||
|
|
||||||
";
|
|
||||||
|
|
||||||
if ($from and $to != ''){
|
|
||||||
$fromd= date("Y-m-d",strtotime($from));
|
|
||||||
$tod=date("Y-m-d",strtotime($to));
|
|
||||||
|
|
||||||
$sql.=" and date(ltf.CreatedOn) >= '".$fromd."'
|
|
||||||
and date(ltf.CreatedOn) <= '".$tod."'";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$leadDet=$this->db->query($sql);
|
|
||||||
$answer = $leadDet->result();
|
|
||||||
|
|
||||||
//echo $sql;
|
|
||||||
|
|
||||||
if (count($answer) > 0) {
|
|
||||||
$results['leadList'] = true;
|
|
||||||
$results['lead_data'] = $answer;
|
|
||||||
} else {
|
|
||||||
$results['leadList'] = false;
|
|
||||||
$results['message'] = 'No record found';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $results;
|
|
||||||
|
|
||||||
}
|
|
||||||
public function getUniversity($br=null)
|
|
||||||
{
|
|
||||||
$this->db->select('UniversityID,UniversityName');
|
|
||||||
$this->db->where('IsActive','1');
|
|
||||||
$this->db->where('BranchCode',$br);
|
|
||||||
$this->db->order_by('CreatedOn','DESC');
|
|
||||||
$university = $this->db->get(UNIVERSITY);
|
|
||||||
|
|
||||||
if($university->result()){
|
|
||||||
$result = array();
|
|
||||||
$result['univlist'] = true;
|
|
||||||
foreach ($university->result() as $row)
|
|
||||||
{
|
|
||||||
|
|
||||||
$university_array['universityID'] = $row->UniversityID;
|
|
||||||
$university_array['universityName'] = $row->UniversityName;
|
|
||||||
$university_array['batchDetails']= $this->getBatch($row->UniversityID,$br);
|
|
||||||
$result_array[]=$university_array;
|
|
||||||
}
|
|
||||||
$result['university']= $result_array;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$result['univlist'] = false;
|
|
||||||
$result['message'] = "No records found!";
|
|
||||||
$result['universityID'] = "";
|
|
||||||
$result['universityName'] = "";
|
|
||||||
$result['batchDetails']= "";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getBatch($universityID=null,$br=null)
|
|
||||||
{
|
|
||||||
$this->db->select('BatchCode,BatchName');
|
|
||||||
$this->db->where('UniversityID',$universityID);
|
|
||||||
$this->db->where('IsActive','1');
|
|
||||||
$this->db->where('BranchCode',$br);
|
|
||||||
$this->db->order_by('BatchCode','ASC');
|
|
||||||
$batchDetails = $this->db->get(BATCH);
|
|
||||||
return $batchDetails->result();
|
|
||||||
}
|
|
||||||
public function GetAllUniversity($branchId)
|
|
||||||
{
|
|
||||||
$this->db->select('UniversityID,UniversityName');
|
|
||||||
$this->db->from('T_UniversityMaster');
|
|
||||||
$this->db->where('T_UniversityMaster.BranchCode',$branchId);
|
|
||||||
$searchDetails = $this->db->get();
|
|
||||||
|
|
||||||
if($searchDetails->result())
|
|
||||||
{
|
|
||||||
|
|
||||||
//print_r($searchDetails->result());
|
|
||||||
$result_array['UnivStatus'] = true;
|
|
||||||
$result_array['details'] = $searchDetails->result();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$result_array['UnivStatus'] = false;
|
|
||||||
$result_array['details'] = "No records found!";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return $result_array;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function GetNewRegList($det)
|
|
||||||
{
|
|
||||||
|
|
||||||
$fdate=$det['from'];
|
|
||||||
$tdate=$det['to'];
|
|
||||||
|
|
||||||
$fromd= date("Y-m-d",strtotime($fdate));
|
|
||||||
$tod=date("Y-m-d",strtotime($tdate));
|
|
||||||
$university = $det['university'];
|
|
||||||
|
|
||||||
// echo 'f'.$fromd.'t'.$tod;
|
|
||||||
// die();
|
|
||||||
|
|
||||||
|
|
||||||
$subQuery='SELECT T_StudentDetails.StudentID,DOJ,BatchName,CourseName ,T_Student_CourseDetails.UniversityID, T_Student_CourseDetails.CourseID, Firstname,T_StudentDetails. MobileNumber, Fathername, UniversityName,CourseName FROM T_Student_CourseDetails
|
$subQuery='SELECT T_StudentDetails.StudentID,DOJ,BatchName,CourseName ,T_Student_CourseDetails.UniversityID, T_Student_CourseDetails.CourseID, Firstname,T_StudentDetails. MobileNumber, Fathername, UniversityName,CourseName FROM T_Student_CourseDetails
|
||||||
JOIN T_StudentDetails ON T_StudentDetails.StudentID=T_Student_CourseDetails.StudentID
|
JOIN T_StudentDetails ON T_StudentDetails.StudentID=T_Student_CourseDetails.StudentID
|
||||||
JOIN T_UniversityMaster ON T_UniversityMaster.UniversityID=T_Student_CourseDetails.UniversityID JOIN T_CourseMaster ON T_CourseMaster.CourseID=T_Student_CourseDetails.CourseID
|
JOIN T_UniversityMaster ON T_UniversityMaster.UniversityID=T_Student_CourseDetails.UniversityID JOIN T_CourseMaster ON T_CourseMaster.CourseID=T_Student_CourseDetails.CourseID
|
||||||
|
|||||||
@ -114,6 +114,7 @@ app.controller('report_ans_bookletCtrl', ["$scope", "$filter","$rootScope","$mod
|
|||||||
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
|
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
|
||||||
}else {
|
}else {
|
||||||
//alert($scope.batch.name);
|
//alert($scope.batch.name);
|
||||||
|
$scope.filterUniv = angular.fromJson($scope.univModel.university);
|
||||||
$scope.ans_book_data = '';
|
$scope.ans_book_data = '';
|
||||||
$scope.message = '';
|
$scope.message = '';
|
||||||
var response_data = {
|
var response_data = {
|
||||||
@ -124,7 +125,7 @@ app.controller('report_ans_bookletCtrl', ["$scope", "$filter","$rootScope","$mod
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
university: $scope.univModel.university.universityID,
|
university: $scope.filterUniv.universityID,
|
||||||
batch: $scope.univModel.batch
|
batch: $scope.univModel.batch
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -124,6 +124,7 @@ app.controller('report_balfeeCtrl', ["$scope", "$filter","$rootScope","$modal",
|
|||||||
}
|
}
|
||||||
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
|
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
|
||||||
}else {
|
}else {
|
||||||
|
$scope.filterUniv = angular.fromJson($scope.univModel.university);
|
||||||
$scope.balfee_data = '';
|
$scope.balfee_data = '';
|
||||||
$scope.message = '';
|
$scope.message = '';
|
||||||
var response_data = {
|
var response_data = {
|
||||||
@ -134,7 +135,7 @@ app.controller('report_balfeeCtrl', ["$scope", "$filter","$rootScope","$modal",
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
university: $scope.univModel.university.universityID,
|
university: $scope.filterUniv.universityID,
|
||||||
batch: $scope.univModel.batch
|
batch: $scope.univModel.batch
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -110,6 +110,7 @@ app.controller('report_certificateCtrl', ["$scope", "$filter","$rootScope","$mod
|
|||||||
});
|
});
|
||||||
|
|
||||||
$scope.onSubmit = function () {
|
$scope.onSubmit = function () {
|
||||||
|
$scope.filterUniv = angular.fromJson($scope.univModel.university);
|
||||||
//alert($scope.batch.name);
|
//alert($scope.batch.name);
|
||||||
$scope.cert_data = '';
|
$scope.cert_data = '';
|
||||||
$scope.message = '';
|
$scope.message = '';
|
||||||
@ -121,7 +122,7 @@ app.controller('report_certificateCtrl', ["$scope", "$filter","$rootScope","$mod
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
university: $scope.univModel.university.universityID,
|
university: $scope.filterUniv.universityID,
|
||||||
batch: $scope.univModel.batch,
|
batch: $scope.univModel.batch,
|
||||||
from : $scope.univModel.from_date,
|
from : $scope.univModel.from_date,
|
||||||
to : $scope.univModel.to_date
|
to : $scope.univModel.to_date
|
||||||
@ -160,7 +161,7 @@ app.controller('report_certificateCtrl', ["$scope", "$filter","$rootScope","$mod
|
|||||||
|
|
||||||
|
|
||||||
$scope.exportData = function () {
|
$scope.exportData = function () {
|
||||||
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,Document_fee_paid_date as DocumentFeePaidDate,Enrollment_id as EnrollmentID,Student_name as StudentName,Father as FatherName,Course_name as CourseName,Sem_year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,CAST(Balance_fee AS NUMBER) as Balance,Certificate_name as CertificateName,Status as CertificateStatus,Date as Date INTO XLS("Certificate_status.xls",?) FROM ?',[mystyle,$scope.cert_data]);
|
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,initialPaid as DocumentFeePaidDate,Enrollment_id as EnrollmentID,Student_name as StudentName,Father_name as FatherName,Course_name as CourseName,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,CAST(balance AS NUMBER) as Balance,certname as CertificateName,status as CertificateStatus,adate as Date INTO XLS("Certificate_status.xls",?) FROM ?',[mystyle,$scope.cert_data]);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*modal controller
|
/*modal controller
|
||||||
|
|||||||
@ -116,6 +116,7 @@ app.controller('report_doc_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
|
|||||||
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
|
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
|
||||||
}else {
|
}else {
|
||||||
//alert($scope.batch.name);
|
//alert($scope.batch.name);
|
||||||
|
$scope.filterUniv = angular.fromJson($scope.univModel.university);
|
||||||
$scope.doc_pending_data = '';
|
$scope.doc_pending_data = '';
|
||||||
$scope.message = '';
|
$scope.message = '';
|
||||||
var response_data = {
|
var response_data = {
|
||||||
@ -126,7 +127,7 @@ app.controller('report_doc_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
university: $scope.univModel.university.universityID,
|
university: $scope.filterUniv.universityID,
|
||||||
batch: $scope.univModel.batch
|
batch: $scope.univModel.batch
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -114,6 +114,7 @@ app.controller('report_markcard_statusCtrl', ["$scope", "$filter","$rootScope",
|
|||||||
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
|
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
|
||||||
}else {
|
}else {
|
||||||
//alert($scope.batch.name);
|
//alert($scope.batch.name);
|
||||||
|
$scope.filterUniv = angular.fromJson($scope.univModel.university);
|
||||||
$scope.markcard_data = '';
|
$scope.markcard_data = '';
|
||||||
$scope.message = '';
|
$scope.message = '';
|
||||||
var response_data = {
|
var response_data = {
|
||||||
@ -124,7 +125,7 @@ app.controller('report_markcard_statusCtrl', ["$scope", "$filter","$rootScope",
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
university: $scope.univModel.university.universityID,
|
university: $scope.filterUniv.universityID,
|
||||||
batch: $scope.univModel.batch
|
batch: $scope.univModel.batch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -81,6 +81,7 @@ app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "S
|
|||||||
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
|
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
|
||||||
}else {
|
}else {
|
||||||
//alert($scope.batch.name);
|
//alert($scope.batch.name);
|
||||||
|
$scope.filterUniv = angular.fromJson($scope.univModel.university);
|
||||||
$scope.waiver_referal_data = '';
|
$scope.waiver_referal_data = '';
|
||||||
$scope.message = '';
|
$scope.message = '';
|
||||||
console.log($scope.waiver_referal_data);
|
console.log($scope.waiver_referal_data);
|
||||||
@ -92,7 +93,7 @@ app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "S
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
university: $scope.univModel.university.universityID,
|
university: $scope.filterUniv.universityID,
|
||||||
batch: $scope.univModel.batch
|
batch: $scope.univModel.batch
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -156,7 +156,7 @@ td,th {
|
|||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" ng-checked="myModel.all" id="{{p.Student_id}}" name="{{p.Student_id}}" class="form-control" ng-click="isClick($event);" /></td>
|
<td><input type="checkbox" ng-checked="myModel.all" id="{{p.Student_id}}" name="{{p.Student_id}}" class="form-control" ng-click="isClick($event);" /></td>
|
||||||
<td>{{p.SL_NO}}</td>
|
<td>{{p.SL_NO}}</td>
|
||||||
<td>{{p.Initial_paid_date}}</td>
|
<td>{{p.initialPaid}}</td>
|
||||||
<td>{{p.Enrollment_id}}</td>
|
<td>{{p.Enrollment_id}}</td>
|
||||||
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Student_name}}</a></td>
|
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Student_name}}</a></td>
|
||||||
<td>{{p.Father_name}}</td>
|
<td>{{p.Father_name}}</td>
|
||||||
@ -164,10 +164,10 @@ td,th {
|
|||||||
<!-- <td>{{p.Sem_year}}</td> -->
|
<!-- <td>{{p.Sem_year}}</td> -->
|
||||||
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Phone_number}}</a></td>
|
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Phone_number}}</a></td>
|
||||||
<td>{{p.University}}</td>
|
<td>{{p.University}}</td>
|
||||||
<td>{{p.Balance_Fee}}</td>
|
<td>{{p.balance}}</td>
|
||||||
<td>{{p.Certificate_name}}</td>
|
<td>{{p.certname}}</td>
|
||||||
<td>{{p.Certificate_status}}</td>
|
<td>{{p.status}}</td>
|
||||||
<td>{{p.Certificate_date}}</td>
|
<td>{{p.adate}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user