diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index c62984cd..64d1a80e 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -153,7 +153,7 @@ order by CourseID) as cm on cm.cid=cfd.ccid 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 -left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch,ifnull(Status,'-') as coursestatus FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and (scd.coursestatus != 'Cancelled' or scd.coursestatus != 'Discontinued' or scd.coursestatus != 'Refund_issued') +left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch,ifnull(Status,'-') as coursestatus FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid left join (select ID,StudentID as sid,Sem, if(ListName = 'SENT TO UNIVERSITY', AnsDate,'-') as ansdate,CourierDetails as courierdetails from T_AnswerBookletStatus abs @@ -215,7 +215,7 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se LEFT JOIN (SELECT StudentID AS sid,UniversityID AS uid,CourseID AS cid,EnrollmentID AS eid,BranchID AS branch,ifnull(STATUS,'-') AS coursestatus FROM T_Student_CourseDetails) AS scd - ON scd.sid=sfs.sid AND (scd.coursestatus IS NULL OR (scd.coursestatus != 'Refund_issued' AND scd.coursestatus != 'Discontinued' AND scd.coursestatus != 'Cancelled')) + ON scd.sid=sfs.sid LEFT JOIN (SELECT ID,StudentID AS sid,Sem, IF(ListName = 'SENT TO UNIVERSITY', AnsDate,'-') AS ansdate,CourierDetails AS courierdetails @@ -234,9 +234,9 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se GROUP BY sid,sem) AS apdate ON apdate.sid=sfs.sid AND apdate.sem=cfd.syear - LEFT JOIN BalFees bal ON bal.student=sfs.sid AND bal.feestype=sfs.ftype AND bal.semyr=sms.sem + LEFT JOIN BalFees bal ON bal.student=sfs.sid AND bal.feestype=sfs.ftype AND bal.semyr=sms.sem AND bal.totalpayable is not null where std.active = 1 and sfs.branch = '".$br."' "; - + if ($bat!= ''){ $sql.=" and sfs.batch = '".$bat."'"; @@ -258,7 +258,9 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se $tod=date("Y-m-d",strtotime($to)); $sql.=" and sms.CreatedOn <= '".$tod."'"; } + $sql.=" AND (scd.coursestatus IS NULL OR (scd.coursestatus != 'Refund_issued' AND scd.coursestatus != 'Discontinued' AND scd.coursestatus != 'Cancelled'))"; $sql.=" group by Student_id,Course_id,Batch_code,Branch_code,Sem,Sem_year"; + // print_r($sql);die(); $leadDet=$this->db->query($sql); $mstatusDetails = $leadDet->result(); if (count($mstatusDetails) > 0) { @@ -351,7 +353,7 @@ 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 LEFT JOIN (SELECT StudentID AS sid,UniversityID AS uid,CourseID AS cid,EnrollmentID AS eid,BranchID AS branch,ifnull(Status,'-') as coursestatus - FROM T_Student_CourseDetails) AS scd ON scd.sid=sms.sid AND scd.cid=sms.cid And (scd.coursestatus IS NULL OR (scd.coursestatus != 'Refund_issued' AND scd.coursestatus != 'Discontinued' AND scd.coursestatus != 'Cancelled')) + FROM T_Student_CourseDetails) AS scd ON scd.sid=sms.sid AND scd.cid=sms.cid where sms.branch = '".$br."'"; $sql = "SELECT @@ -412,7 +414,7 @@ LEFT JOIN LEFT JOIN T_PickListDetails p ON p.ListCode = app.ListCode LEFT JOIN BalFees bal ON bal.student = app.StudentID AND bal.course = app.CourseID - AND bal.feestype = app.CertificationType + AND bal.feestype = app.CertificationType AND bal.totalpayable is not null WHERE app.CertificationType NOT LIKE 'CERT%' AND app.ID IN (SELECT @@ -470,10 +472,9 @@ LEFT JOIN IFNULL(Status, '-') AS coursestatus FROM T_Student_CourseDetails) AS scd ON scd.sid = sfs.sid AND scd.cid = sfs.cid - AND (scd.coursestatus IS NULL OR (scd.coursestatus != 'Refund_issued' AND scd.coursestatus != 'Discontinued' AND scd.coursestatus != 'Cancelled')) where sfs.branch = '".$br."'"; - + $sql.=" AND (scd.coursestatus IS NULL OR (scd.coursestatus != 'Refund_issued' AND scd.coursestatus != 'Discontinued' AND scd.coursestatus != 'Cancelled'))"; if ($bat!= ''){ $sql.=" and sfs.batch = '".$bat."'"; @@ -904,7 +905,7 @@ 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 and (STU_COUR.Status != 'Cancelled' or STU_COUR.Status != 'Discontinued' or STU_COUR.Status != 'Refund_issued') +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 BalFees AS BALFEE ON BALFEE.student = STU.StudentID @@ -946,7 +947,7 @@ LEFT JOIN T_Student_CourseDetails AS STU_COUR ON STU_COUR.StudentID = sfs.Studen AND STU_COUR.CourseID = sfs.CourseID LEFT JOIN T_Course_Fees_Details AS CFD ON CFD.ID = sfs.FeesType LEFT JOIN T_UniversityMaster AS UNIV ON UNIV.UniversityID = sfs.CourseID -LEFT JOIN BalFees AS BALFEE ON BALFEE.student = sfs.StudentID +LEFT JOIN BalFees AS BALFEE ON BALFEE.student = sfs.StudentID AND BALFEE.totalpayable is not null LEFT JOIN (SELECT FeesId AS FeeID, diff --git a/Apollo/assets/js/controllers/report_certificateCtrl.js b/Apollo/assets/js/controllers/report_certificateCtrl.js index 31cc2782..d0911bf7 100755 --- a/Apollo/assets/js/controllers/report_certificateCtrl.js +++ b/Apollo/assets/js/controllers/report_certificateCtrl.js @@ -121,13 +121,32 @@ $scope.generateButtonStatus = false; }); - $scope.onSubmit = function () { - $scope.isLoaderShow1 =true; - if($scope.univModel.university !== null && $scope.univModel.university !== '' ){ - $scope.filterUniv = angular.fromJson($scope.univModel.university); - }else { - $scope.filterUniv = ''; - } + $scope.onSubmit = function (form) { + $scope.isLoaderShow1 =true; + if($scope.univModel.university !== null && $scope.univModel.university !== '' ){ + $scope.filterUniv = angular.fromJson($scope.univModel.university); + }else { + $scope.filterUniv = ''; + } + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + $scope.show = true; + for (field in form) { + console.log('field',field); + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$name; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[name=' + firstError + ']').focus(); + }else{ + + //alert($scope.batch.name); $scope.cert_data = ''; $scope.message = ''; @@ -167,7 +186,7 @@ $scope.generateButtonStatus = false; } }); - + } } var mystyle = { sheetid: 'CERTIFICATE STATUS REPORT', diff --git a/Apollo/assets/js/controllers/report_markcard_statusCtrl.js b/Apollo/assets/js/controllers/report_markcard_statusCtrl.js index 772d6bbb..06d120b1 100755 --- a/Apollo/assets/js/controllers/report_markcard_statusCtrl.js +++ b/Apollo/assets/js/controllers/report_markcard_statusCtrl.js @@ -122,24 +122,21 @@ $scope.generateButtonStatus = false; $scope.show = false; $scope.onSubmit = function (form) { $scope.isLoaderShow1 =true; - console.log(form); var firstError = null; if (form.$invalid) { var field = null, firstError = null; $scope.show = true; for (field in form) { - console.log('field',field); - console.log($batch); if (field[0] != '$') { if (firstError === null && !form[field].$valid) { - firstError = form[field].$batch; + firstError = form[field].$name; } if (form[field].$pristine) { form[field].$dirty = true; } } } - angular.element('.ng-invalid[batch=' + firstError + ']').focus(); + angular.element('.ng-invalid[name=' + firstError + ']').focus(); }else { //alert($scope.batch.name); $scope.filterUniv = angular.fromJson($scope.univModel.university); diff --git a/Apollo/assets/views/report_application_pending.html b/Apollo/assets/views/report_application_pending.html index 43a087f8..b2c834f2 100755 --- a/Apollo/assets/views/report_application_pending.html +++ b/Apollo/assets/views/report_application_pending.html @@ -43,10 +43,10 @@

- @@ -66,9 +66,9 @@
-
+
- diff --git a/Apollo/assets/views/report_certificate_status.html b/Apollo/assets/views/report_certificate_status.html index f95491a8..75e363fb 100755 --- a/Apollo/assets/views/report_certificate_status.html +++ b/Apollo/assets/views/report_certificate_status.html @@ -30,7 +30,7 @@ td,th {
-
+
@@ -39,10 +39,10 @@ td,th {

- @@ -65,10 +65,10 @@ td,th {
-->

- diff --git a/Apollo/assets/views/report_markcardstatus.html b/Apollo/assets/views/report_markcardstatus.html index d2d3aadb..a790c526 100755 --- a/Apollo/assets/views/report_markcardstatus.html +++ b/Apollo/assets/views/report_markcardstatus.html @@ -26,10 +26,10 @@

- @@ -49,8 +49,8 @@
-
-