Report changes

This commit is contained in:
gandhimathi 2018-09-26 16:14:11 +05:30
parent 11788c5286
commit 89a5dea416
3 changed files with 70 additions and 53 deletions

View File

@ -265,39 +265,56 @@ left join
public function mark_cert_status($bat=null,$br=null,$u=null,$from=null,$to=null){ public function mark_cert_status($bat=null,$br=null,$u=null,$from=null,$to=null){
$sql = "select sms.ID,sms.sid,sms.cid,sms.fid,sms.sem as Sem_year,ifnull(sms.certname,'-') as Certificate_name,sms.ctype, $sql = "select sms.ID,sms.sid,sms.cid,sms.fid,sms.sem as Sem_year,ifnull(sms.certname,'-') as Certificate_name,sms.ctype,
ifnull(sms.issuedate,'') as issuedate,sms.istatus, ifnull(sms.issuedate,'') as issuedate,sms.istatus,
ifnull(sms.rcvedate,'-') as rdate,ifnull(sms.rstatus,'-') as rstatus,sms.acmts,ifnull(sms.balance,0) as Balance_fee,std.name as Student_name,std.father as Father_name,std.phone as Phone_number,cm.course as Course_name,cm.uname as University,mdate,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber ifnull(sms.rcvedate,'-') as rdate,ifnull(sms.rstatus,'-') as rstatus,sms.acmts,ifnull(sms.balance,0) as Balance_fee,std.name as Student_name,std.father as Father_name,std.phone as Phone_number,cm.course as Course_name,cm.uname as University,mdate,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber
from from
(select c.ID,c.StudentID as sid,sfs.CourseID as cid,sfs.BranchCode as branch,sfs.FeesID as fid,Sem as sem,c.CertificationType as certname,c.CertificationType as ctype,CDate as mdate,balpayable as balance, (select c.ID,c.StudentID as sid,sfs.CourseID as cid,sfs.BranchCode as branch,sfs.FeesID as fid,Sem as sem,c.CertificationType as certname,c.CertificationType as ctype,CDate as mdate,balpayable as balance,
max(if(ListName = 'ISSUED TO STUDENT', CDate,'-')) as issuedate,max(if(ListName = 'ISSUED TO STUDENT', ListName,'-')) as istatus, max(if(ListName = 'ISSUED TO STUDENT', CDate,'-')) as issuedate,max(if(ListName = 'ISSUED TO STUDENT', ListName,'-')) as istatus,
max(if(ListName = 'RECEIVED', CDate,'-')) as rcvedate,max(if(ListName = 'RECEIVED', ListName,'-')) as rstatus,c.Comments as acmts max(if(ListName = 'RECEIVED', CDate,'-')) as rcvedate,max(if(ListName = 'RECEIVED', ListName,'-')) as rstatus,c.Comments as acmts
from T_CertificationStatus c from T_CertificationStatus c
left join T_Students_Fees_Status sfs on sfs.FeesType=c.CourseID and sfs.StudentID=c.StudentID left join T_Students_Fees_Status sfs on sfs.FeesType=c.CourseID and sfs.StudentID=c.StudentID
left join T_PickListDetails list on list.ListCode=c.ListCode left join T_PickListDetails list on list.ListCode=c.ListCode
left join BalFees bal on bal.student=c.StudentID and bal.course=sfs.CourseID and bal.semyr=c.Sem left join BalFees bal on bal.student=c.StudentID and bal.course=sfs.CourseID and bal.semyr=c.Sem
where CDate is not null and (list.ListName like 'ISSUED TO STUDENT' or list.ListName like 'RECEIVED%' ) where CDate is not null and (list.ListName like 'ISSUED TO STUDENT' or list.ListName like 'RECEIVED%' )
group by sid,cid,sem,ctype group by sid,cid,sem,ctype
union union
select a.ID,a.StudentID as sid,a.CourseID as cid,sfs.BranchCode as branch,sfs.FeesID as fid,'-' as sem,ifnull(cm.CertificateName,a.CertificationType) as certname,a.CertificationType as ctype,AppDate as mdate,bal.balpayable as balance, select a.ID,a.StudentID as sid,a.CourseID as cid,sfs.BranchCode as branch,sfs.FeesID as fid,'-' as sem,ifnull(cm.CertificateName,a.CertificationType) as certname,a.CertificationType as ctype,AppDate as mdate,bal.balpayable as balance,
max(if(ListName = 'ISSUED TO STUDENT', AppDate,'-')) as issuedate,max(if(ListName = 'ISSUED TO STUDENT', ListName,'-')) as istatus, max(if(ListName = 'ISSUED TO STUDENT', AppDate,'-')) as issuedate,max(if(ListName = 'ISSUED TO STUDENT', ListName,'-')) as istatus,
max(if(ListName = 'RECEIVED', AppDate,'-')) as rcvedate,max(if(ListName = 'RECEIVED', ListName,'-')) as rstatus,a.Comments as acmts max(if(ListName = 'RECEIVED', AppDate,'-')) as rcvedate,max(if(ListName = 'RECEIVED', ListName,'-')) as rstatus,a.Comments as acmts
from T_ApplicationStatus a from T_ApplicationStatus a
left join left join
T_Students_Fees_Status sfs on sfs.StudentID=a.StudentID and sfs.CourseID=a.CourseID T_Students_Fees_Status sfs on sfs.StudentID=a.StudentID and sfs.CourseID=a.CourseID
left join T_CertificationMaster cm on cm.CertificationID=a.CertificationType left join T_CertificationMaster cm on cm.CertificationID=a.CertificationType
left join T_PickListDetails list on list.ListCode=a.ListCode left join T_PickListDetails list on list.ListCode=a.ListCode
left join (select student, course, sum(balpayable) balpayable from BalFees group by student, course) bal on bal.student=a.StudentID and bal.course=a.CourseID left join (select student, course, sum(balpayable) balpayable from BalFees group by student, course) bal on bal.student=a.StudentID and bal.course=a.CourseID
where AppDate is not null and cm.CertificateName not like 'APPLICATION%' and (list.ListName like 'ISSUED TO STUDENT' or list.ListName like 'RECEIVED%' ) where cm.CertificateName not like 'APPLICATION%' and a.ID in (select Max(a.ID) from T_ApplicationStatus a
group by sid,cid,ctype) as sms left join T_CertificationMaster cm on cm.CertificationID=a.CertificationType
left join group by a.StudentID,a.CourseID,cm.CertificateName) and (list.ListName like 'ISSUED TO STUDENT' or list.ListName like 'RECEIVED%' )
group by sid,cid,ctype
union
select a.ID,a.StudentID as sid,a.CourseID as cid,sfs.BranchCode as branch,sfs.FeesID as fid,'-' as sem,ifnull(cm.CertificateName,a.CertificationType) as certname,a.CertificationType as ctype,AppDate as mdate,bal.balpayable as balance,
max(if(ListName = 'ISSUED TO STUDENT', AppDate,'-')) as issuedate,max(if(ListName = 'ISSUED TO STUDENT', ListName,'-')) as istatus,
max(if(ListName = 'RECEIVED', AppDate,'-')) as rcvedate,max(if(ListName = 'RECEIVED', ListName,'-')) as rstatus,a.Comments as acmts
from T_ApplicationStatus a
left join
T_Students_Fees_Status sfs on sfs.StudentID=a.StudentID and sfs.CourseID=a.CourseID
left join T_CertificationMaster cm on cm.CertificationID=a.CertificationType
left join T_PickListDetails list on list.ListCode=a.ListCode
left join (select student, course, sum(balpayable) balpayable from BalFees group by student, course) bal on bal.student=a.StudentID and bal.course=a.CourseID
where a.CertificationType not like 'CERT%' and a.ID in (select Max(a.ID) from T_ApplicationStatus a
left join T_CertificationMaster cm on cm.CertificationID=a.CertificationType
group by a.StudentID,a.CourseID,cm.CertificateName) and (list.ListName like 'ISSUED TO STUDENT' or list.ListName like 'RECEIVED%' )
group by sid,cid,ctype
) as sms
left join
(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 (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
FROM T_Students_Fees_Status FROM T_Students_Fees_Status
group by sid,cid) group by sid,cid)
as sfs on sfs.sid=sms.sid and sfs.cid=sms.cid as sfs on sfs.sid=sms.sid and sfs.cid=sms.cid
left join left join
(SELECT sfp.StudentID as sid,sfp.FeesId as fid,sfs.FeesType as ftype,sfs.CourseID as cid,BillDate as bdate,sum(BillAmount) as bamount,BillNO as billno FROM T_Students_Fees_PaidDetails sfp (SELECT sfp.StudentID as sid,sfp.FeesId as fid,sfs.FeesType as ftype,sfs.CourseID as cid,BillDate as bdate,sum(BillAmount) as bamount,BillNO as billno FROM T_Students_Fees_PaidDetails sfp
left join T_Students_Fees_Status sfs on sfs.FeesId=sfp.FeesId left join T_Students_Fees_Status sfs on sfs.FeesId=sfp.FeesId
where IsActive = 1 where IsActive = 1
group by sid,cid) group by sid,cid)
as sfb on sfb.sid=sms.sid and sfb.fid=sms.fid and (sfb.ftype=sms.cid or sfb.cid=sms.cid) as sfb on sfb.sid=sms.sid and sfb.fid=sms.fid and (sfb.ftype=sms.cid or sfb.cid=sms.cid)
left join left join
@ -307,9 +324,9 @@ where IsActive = 1
group by cid group by cid
order by CourseID) order by CourseID)
as cm on cm.cid=sms.cid as cm on cm.cid=sms.cid
left join left join
(SELECT StudentID as sid,MobileNumber as phone,IsActive as active,concat(FirstName,' ',Lastname) 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,concat(FirstName,' ',Lastname) 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 (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."' where sms.branch = '".$br."'
"; ";
@ -431,7 +448,7 @@ left join
if(ListName like 'RECEIVED FROM STUDENT', AnsDate,'-') as rcvedate if(ListName like 'RECEIVED FROM STUDENT', AnsDate,'-') as rcvedate
from T_AnswerBookletStatus abs from T_AnswerBookletStatus abs
left join T_PickListDetails list on list.ListCode=abs.ListCode where AnsDate is not null and left join T_PickListDetails list on list.ListCode=abs.ListCode where AnsDate is not null and
ID in (select max(ID) from T_AnswerBookletStatus where AnsDate is not null group by StudentID,Sem) and StudentID = 3061 ID in (select max(ID) from T_AnswerBookletStatus where AnsDate is not null group by StudentID,Sem)
group by sid,Sem group by sid,Sem
) as rdate on rdate.sid=sms.sid and rdate.sem=sms.sem ) as rdate on rdate.sid=sms.sid and rdate.sem=sms.sem
left join left join
@ -439,7 +456,7 @@ left join
if(ListName like 'ISSUED TO STUDENT', AnsDate,'-') as issuedate if(ListName like 'ISSUED TO STUDENT', AnsDate,'-') as issuedate
from T_AnswerBookletStatus abs from T_AnswerBookletStatus abs
left join T_PickListDetails list on list.ListCode=abs.ListCode where AnsDate is not null and left join T_PickListDetails list on list.ListCode=abs.ListCode where AnsDate is not null and
ID in (select min(ID) from T_AnswerBookletStatus where AnsDate is not null group by StudentID,Sem) and StudentID = 3061 ID in (select min(ID) from T_AnswerBookletStatus where AnsDate is not null group by StudentID,Sem)
group by sid,Sem) as idate on idate.sid=sms.sid and idate.sem=sms.sem group by sid,Sem) as idate on idate.sid=sms.sid and idate.sem=sms.sem
left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.semyr=sms.sem left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.semyr=sms.sem
where std.active = 1 and sms.branch = '".$br."' where std.active = 1 and sms.branch = '".$br."'

View File

@ -137,7 +137,7 @@ td,th {
<tr> <tr>
<th><input type="checkbox" ng-model="myModel.all" id="all" name="all" ng-click="isCheckAll($event);"></th> <th><input type="checkbox" ng-model="myModel.all" id="all" name="all" ng-click="isCheckAll($event);"></th>
<th>SL.No</th> <th>SL.No</th>
<th style=" white-space: pre-wrap;text-align:left;width: 100px;"!important>Document Fee Paid Date</th> <th style=" white-space: pre-wrap;text-align:left;width: 100px;"!important>Certificate Fee Paid Date</th>
<th>Enrollment ID</th> <th>Enrollment ID</th>
<th>Student Name</th> <th>Student Name</th>
<th>Father Name</th> <th>Father Name</th>

View File

@ -100,15 +100,15 @@
<th>SL.No</th> <th>SL.No</th>
<th style=" white-space: pre-wrap;text-align:left;width: 100px;"!important>Intial Payment Paid Date</th> <th style=" white-space: pre-wrap;text-align:left;width: 100px;"!important>Intial Payment Paid Date</th>
<th>Enrollment ID</th> <th>Enrollment ID</th>
<th>Student Name</th>
<th>Roll NO</th> <th>Roll NO</th>
<th>Student Name</th>
<th>Father Name</th> <th>Father Name</th>
<th>Course</th> <th>Course</th>
<th>Sem/Year</th> <th>Sem/Year</th>
<th>University</th> <th>University</th>
<th>Balance Fee</th> <th>Balance Fee</th>
<th style=" white-space: pre-wrap;text-align:left;width: 100px;"!important>Application Sent Date</th> <th style=" white-space: pre-wrap;text-align:left;width: 100px;"!important>Application Sent to Univ Date</th>
<th style=" white-space: pre-wrap;text-align:left;width: 100px;"!important>Answer Booklet Sent Date</th> <th style=" white-space: pre-wrap;text-align:left;width: 100px;"!important>Answer Booklet Sent to Univ Date</th>
<th>Mark Card Status</th> <th>Mark Card Status</th>
<th>Date</th> <th>Date</th>
@ -120,8 +120,8 @@
<td>{{p.SL_NO}}</td> <td>{{p.SL_NO}}</td>
<td>{{p.Initial_paid_date}}</td> <td>{{p.Initial_paid_date}}</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>{{p.Roll_NO}}</td> <td>{{p.Roll_NO}}</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>
<td>{{p.Course_name}}</td> <td>{{p.Course_name}}</td>
<td>{{p.Sem_year}}({{p.Sem}})</td> <td>{{p.Sem_year}}({{p.Sem}})</td>