application status report changes : kdk
This commit is contained in:
parent
0ed67a9b9f
commit
d071a21a52
@ -433,51 +433,80 @@ group by sid,Sem
|
||||
}
|
||||
public function app_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(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,
|
||||
sms.adate as appdate,ifnull(reg.formtype,'-') as formtype,sfs.batch as batch
|
||||
from
|
||||
(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
|
||||
FROM T_ApplicationStatus as app
|
||||
left join T_CertificationMaster cm on cm.CertificationID=app.CertificationType
|
||||
left join T_PickListDetails list on list.ListCode=app.ListCode
|
||||
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)
|
||||
group by sid,cid,lcode,branch,ctype) as sms
|
||||
left join
|
||||
(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
|
||||
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 sfs.fid=sfp.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=sms.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 (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
|
||||
// $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,
|
||||
// sms.adate as appdate,ifnull(reg.formtype,'-') as formtype,sfs.batch as batch
|
||||
// from
|
||||
// (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
|
||||
// FROM T_ApplicationStatus as app
|
||||
// left join T_CertificationMaster cm on cm.CertificationID=app.CertificationType
|
||||
// left join T_PickListDetails list on list.ListCode=app.ListCode
|
||||
// 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)
|
||||
// group by sid,cid,lcode,branch,ctype) as sms
|
||||
// left join
|
||||
// (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
|
||||
// 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 sfs.fid=sfp.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=sms.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 (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."'
|
||||
// ";
|
||||
|
||||
$sql = "SELECT
|
||||
APFS.ListCode as StatusCode,
|
||||
APFS.AppFormDate as StatusUpdationOn,
|
||||
APFS.Comments as StatusComments,
|
||||
PKL.ListName as StatusName,
|
||||
concat(STU.Firstname,' ', STU.Lastname) as StudentName,
|
||||
STU.Fathername as FatherName,
|
||||
STU.MobileNumber as Phone_number,
|
||||
COUR.CourseName as CourseName,
|
||||
UNIV.UniversityName as UniversityName,
|
||||
sfpd.BILL as InitialPayDate,
|
||||
RD.Student_Fee_Status_Id as FeesStatusID,
|
||||
STU_COUR.EnrollmentID as EnrollmentNumber,
|
||||
CFD.Sem_Year as Sem_Year,
|
||||
RD.RegistrationType as FormType,
|
||||
STU.StudentID
|
||||
FROM T_ApplicationFormStatus as APFS
|
||||
LEFT JOIN T_Registration_Details as RD ON RD.ID = APFS.Registration_Details_ID
|
||||
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
|
||||
LEFT JOIN T_Course_Fees_Details as CFD ON CFD.ID = RD.FeeType
|
||||
LEFT JOIN T_UniversityMaster as UNIV ON UNIV.UniversityID = COUR.UniversityID
|
||||
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
|
||||
where COUR.UniversityID = '$u' and RD.BatchCode = '$bat'and STU_COUR.BranchID = '$br' and STU.IsActive = '1'
|
||||
group by APFS.Registration_Details_ID";
|
||||
|
||||
where std.active = 1 and sms.branch = '".$br."'
|
||||
";
|
||||
|
||||
if ($bat!= ''){
|
||||
// if ($bat!= ''){
|
||||
|
||||
$sql.=" and sfs.batch = '".$bat."'";
|
||||
// $sql.=" and sfs.batch = '".$bat."'";
|
||||
|
||||
}
|
||||
if ($u!= ''){
|
||||
// }
|
||||
// if ($u!= ''){
|
||||
|
||||
$sql.=" and cm.uid = '".$u."'";
|
||||
// $sql.=" and cm.uid = '".$u."'";
|
||||
|
||||
}
|
||||
$sql.=" group by Student_id,Course_id,Branch_code,Sem_year";
|
||||
// }
|
||||
// $sql.=" group by Student_id,Course_id,Branch_code,Sem_year";
|
||||
|
||||
|
||||
|
||||
|
||||
@ -43,8 +43,6 @@ app.controller('report_app_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
|
||||
"branch": "",
|
||||
"university": "",
|
||||
"batch": "",
|
||||
|
||||
|
||||
};
|
||||
|
||||
$scope.filters = function () {
|
||||
@ -98,6 +96,11 @@ app.controller('report_app_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
|
||||
//Response data
|
||||
$scope.show = false;
|
||||
$scope.onSubmit = function (form) {
|
||||
if($scope.univModel.university !== null){
|
||||
$scope.filterUniv = angular.fromJson($scope.univModel.university);
|
||||
}else {
|
||||
$scope.filterUniv = '';
|
||||
}
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
@ -125,7 +128,7 @@ app.controller('report_app_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
|
||||
},
|
||||
data: {
|
||||
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
university: $scope.univModel.university.universityID,
|
||||
university: $scope.filterUniv.universityID,
|
||||
batch: $scope.univModel.batch
|
||||
|
||||
}
|
||||
@ -156,7 +159,7 @@ app.controller('report_app_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
|
||||
},
|
||||
// style:'background:#00FF00',
|
||||
column: {
|
||||
style:'font-size:10px'
|
||||
style:'font-size:12px'
|
||||
},
|
||||
|
||||
};
|
||||
@ -164,7 +167,7 @@ app.controller('report_app_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
|
||||
|
||||
|
||||
$scope.exportData = function () {
|
||||
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,Admission_date as InititalPaymentDate,Enrollment_id as EnrollmentID,Student_name as StudentName,Father_name as FatherName,Course_name as CourseName,Sem_year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,Status as ApplicationPendingStatus,formtype as FormType,appdate as Date INTO XLS("Application_pending_student_list.xls",?) FROM ?',[mystyle,$scope.app_pending_data]);
|
||||
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,InitialPayDate as InititalPaymentDate,EnrollmentNumber as EnrollmentID,StudentName as StudentName,FatherName as FatherName,CourseName as CourseName,Sem_Year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,UniversityName as University,StatusName as ApplicationPendingStatus,FormType as FormType,StatusUpdationOn as Date INTO XLS("Application_pending_student_list.xls",?) FROM ?',[mystyle,$scope.app_pending_data]);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -47,7 +47,6 @@
|
||||
<option value="" selected>Select University</option>
|
||||
<!--details.universityName for details in university-->
|
||||
<option ng-repeat="details in university" value="{{details}}">{{details.universityName}}</option>
|
||||
|
||||
</select>
|
||||
<span style="color:red;" ng-if="show" ng-show="Form.university.$dirty && Form.university.$error.required">Please select University.</span>
|
||||
</div>
|
||||
@ -120,17 +119,17 @@
|
||||
<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>{{p.SL_NO}}</td>
|
||||
<td>{{p.Admission_date}}</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.Father_name}}</td>
|
||||
<td>{{p.Course_name}}</td>
|
||||
<td>{{p.Sem_year}}</td>
|
||||
<td>{{p.InitialPayDate}}</td>
|
||||
<td>{{p.EnrollmentNumber}}</td>
|
||||
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.StudentName}}</a></td>
|
||||
<td>{{p.FatherName}}</td>
|
||||
<td>{{p.CourseName}}</td>
|
||||
<td>{{p.Sem_Year}}</td>
|
||||
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Phone_number}}</a></td>
|
||||
<td>{{p.University}}</td>
|
||||
<td>{{p.Status}}</td>
|
||||
<td>{{p.formtype}}</td>
|
||||
<td>{{p.appdate}}</td>
|
||||
<td>{{p.UniversityName}}</td>
|
||||
<td>{{p.StatusName}}</td>
|
||||
<td>{{p.FormType}}</td>
|
||||
<td>{{p.StatusUpdationOn}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user