diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index 7fafcaef..98749e5e 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -330,6 +330,7 @@ $route['report_markcard_certificate'] = 'Report/mark_cert'; $route['report_expense'] = 'Report/expense'; $route['report_answer_booklet'] = 'Report/answer_booklet'; $route['report_app_pending'] = 'Report/app_pending'; +$route['report_app_pending_old'] = 'Report/app_pending_old'; $route['report_doc_pending'] = 'Report/doc_pending'; $route['report_wav_ref'] = 'Report/wav_ref'; $route['report_examfee'] = 'Report/examfee'; diff --git a/Apollo/api/application/controllers/Report.php b/Apollo/api/application/controllers/Report.php index 0f8c0b51..57f79598 100755 --- a/Apollo/api/application/controllers/Report.php +++ b/Apollo/api/application/controllers/Report.php @@ -212,6 +212,31 @@ class Report extends REST_Controller { } + } + public function app_pending_old_post() + { + $bat = $this->post('batch'); + $br = $this->post('branch'); + $u = $this->post('university'); + + $getStatus = $this->report_model->app_pending_old($bat,$br,$u); + //print_r($getStatus); + if ($getStatus) + { + $getStatus['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No records found!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + + } public function doc_pending_post() { diff --git a/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php index 4469bee2..bb2e30e5 100644 --- a/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php +++ b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php @@ -526,54 +526,115 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model { public function formIdFeeDetails($formFeeDetails=null,$local=null){ // print_r($formFeeDetails);exit(); - foreach ($formFeeDetails as $formIdDetails){ - // echo $formIdDetails['FormId']; - $this->db->select('*'); - $this->db->from('T_Enrolment_Received_From_University'); - $this->db->where('FormID', $formIdDetails['FormId']); - $detailsList = $this->db->get(); - if($detailsList->result() == 1){ - // $this->db->select('*'); - // $this->db->from('T_FormId_FeeDetails_Received_From_University'); - // $this->db->where('FormID', $formIdDetails['FormId']); - // $FormIDdetailsList = $this->db->get(); - // $dbDetailsArr = array(); - // $dbDetailsArr['FormID'] = $formIdDetails['FormId']; - // $dbDetailsArr['FormType'] = $formIdDetails['Form Type']; - // $dbDetailsArr['CentreCode'] = $formIdDetails['CentreCode']; - // $dbDetailsArr['CourseCode'] = $formIdDetails['Course_Code']; - // $dbDetailsArr['ActualCourseFee'] = $formIdDetails['Actual_Course_Fee']; - // $dbDetailsArr['CourseFee'] = $formIdDetails['Course_Fee']; - // $dbDetailsArr['ExamFee'] = $formIdDetails['Exam_Fee']; - // $dbDetailsArr['EnrollmentFee'] = $formIdDetails['Enrollment_Fee']; - // $dbDetailsArr['ProspectusFee'] = $formIdDetails['Prospectus_Fee']; - // $dbDetailsArr['ReRegFee'] = $formIdDetails['Re_Reg_Fee']; - // $dbDetailsArr['CreditTransferFee'] = $formIdDetails['Credit_Transfer_Fee']; - // $dbDetailsArr['LateralEntryFee'] = $formIdDetails['Lateral_Entry_Fee']; - // $dbDetailsArr['DualSpclFee'] = $formIdDetails['Dual_Spcl_Fee']; - // $dbDetailsArr['OtherFee'] = $formIdDetails['Other_Fee']; - // $dbDetailsArr['NRIFEE'] = $formIdDetails['NRI_FEE']; - // $dbDetailsArr['ProvisionalFee'] = $formIdDetails['Provisional_Fee']; - // $dbDetailsArr['MigrationFee'] = $formIdDetails['Migration_Fee']; - // $dbDetailsArr['UrgentResultDMCFee'] = $formIdDetails['Urgent_Result_DMC_Fee']; - // $dbDetailsArr['AdditionalFee'] = $formIdDetails['Additional_Fee']; - // $dbDetailsArr['Amount'] = $formIdDetails['Amount']; - // // $dbDetailsArr['BranchCode'] = $formIdDetails['FormId']; - - // if($FormIDdetailsList->result()){ - // $ids = $FormIDdetailsList->result(); - // $this->db->where('ID', $ids['ID']); - // $this->db->update('T_FormId_FeeDetails_Received_From_University', $dbDetailsArr); - // } else { - // print_r($dbDetailsArr);exit(); - // $this->db->insert('T_FormId_FeeDetails_Received_From_University', $dbDetailsArr); - // $this->db->affected_rows(); - // } + // $this->db->select('*'); + // $this->db->from('T_Enrolment_Received_From_University'); + // $this->db->where('FormID', $formIdDetails['FormId']); + // $detailsList = $this->db->get(); + // $datassss = $detailsList->result(); + foreach ($formFeeDetails as $formIdDetails){ + + $formIds = $formIdDetails['FormId']; + $formType = $formIdDetails['Form Type']; + $CentreCode = $formIdDetails['CentreCode']; - } else{ + $CourseCode = $formIdDetails['Course_Code']; + $ActualCourseFee = $formIdDetails['Actual_Course_Fee']; + $CourseFee = $formIdDetails['Course_Fee']; + $ExamFee = $formIdDetails['Exam_Fee']; + $EnrollmentFee = $formIdDetails['Enrollment_Fee']; + $ProspectusFee = $formIdDetails['Prospectus_Fee']; + $ReRegFee = $formIdDetails['Re_Reg_Fee']; + $CreditTransferFee = $formIdDetails['Credit_Transfer_Fee']; + $LateralEntryFee = $formIdDetails['Lateral_Entry_Fee']; + $DualSpclFee = $formIdDetails['Dual_Spcl_Fee']; + $OtherFee = $formIdDetails['Other_Fee']; + $NRIFEE = $formIdDetails['NRI_FEE']; + $ProvisionalFee = $formIdDetails['Provisional_Fee']; + $MigrationFee = $formIdDetails['Migration_Fee']; + $UrgentResultDMCFee = $formIdDetails['Urgent_Result_DMC_Fee']; + $AdditionalFee = $formIdDetails['Additional_Fee']; + $Amount = $formIdDetails['Amount']; + + + $query = "INSERT INTO T_FormId_FeeDetails_Received_From_University + (FormID, FormType, CentreCode, CourseCode, ActualCourseFee, CourseFee, ExamFee, EnrollmentFee, ProspectusFee, ReRegFee, CreditTransferFee, LateralEntryFee, DualSpclFee, OtherFee, NRIFEE, ProvisionalFee, MigrationFee, UrgentResultDMCFee, AdditionalFee, Amount) + VALUES + ( '$formIds', '$formType', '$CentreCode', '$CourseCode', '$ActualCourseFee', '$CourseFee', '$ExamFee', '$EnrollmentFee', '$ProspectusFee', '$ReRegFee', '$CreditTransferFee', '$LateralEntryFee', '$DualSpclFee', '$OtherFee', '$NRIFEE', '$ProvisionalFee', '$MigrationFee', '$UrgentResultDMCFee', '$AdditionalFee', '$Amount' ) + ON DUPLICATE KEY UPDATE + FormType = '$formType', + CentreCode = '$CentreCode', + CourseCode = '$CourseCode', + ActualCourseFee = '$ActualCourseFee', + CourseFee = '$CourseFee', + ExamFee = '$ExamFee', + EnrollmentFee = '$EnrollmentFee', + ProspectusFee = '$ProspectusFee', + ReRegFee = '$ReRegFee', + CreditTransferFee = '$CreditTransferFee', + LateralEntryFee = '$LateralEntryFee', + DualSpclFee = '$DualSpclFee', + OtherFee = '$OtherFee', + NRIFEE = '$NRIFEE', + ProvisionalFee = '$ProvisionalFee', + MigrationFee = '$MigrationFee', + UrgentResultDMCFee = '$UrgentResultDMCFee', + AdditionalFee = '$AdditionalFee', + Amount = '$Amount'"; + $queryDetails = $this->db->query($query); + + + } + +// foreach ($formFeeDetails as $formIdDetails){ +// // echo $formIdDetails['FormId']; +// $this->db->select('*'); +// $this->db->from('T_Enrolment_Received_From_University'); +// $this->db->where('FormID', $formIdDetails['FormId']); +// $detailsList = $this->db->get(); + + +// if($detailsList->result() == 1){ +// // $this->db->select('*'); +// // $this->db->from('T_FormId_FeeDetails_Received_From_University'); +// // $this->db->where('FormID', $formIdDetails['FormId']); +// // $FormIDdetailsList = $this->db->get(); +// // $dbDetailsArr = array(); +// // $dbDetailsArr['FormID'] = $formIdDetails['FormId']; +// // $dbDetailsArr['FormType'] = $formIdDetails['Form Type']; +// // $dbDetailsArr['CentreCode'] = $formIdDetails['CentreCode']; +// // $dbDetailsArr['CourseCode'] = $formIdDetails['Course_Code']; +// // $dbDetailsArr['ActualCourseFee'] = $formIdDetails['Actual_Course_Fee']; +// // $dbDetailsArr['CourseFee'] = $formIdDetails['Course_Fee']; +// // $dbDetailsArr['ExamFee'] = $formIdDetails['Exam_Fee']; +// // $dbDetailsArr['EnrollmentFee'] = $formIdDetails['Enrollment_Fee']; +// // $dbDetailsArr['ProspectusFee'] = $formIdDetails['Prospectus_Fee']; +// // $dbDetailsArr['ReRegFee'] = $formIdDetails['Re_Reg_Fee']; +// // $dbDetailsArr['CreditTransferFee'] = $formIdDetails['Credit_Transfer_Fee']; +// // $dbDetailsArr['LateralEntryFee'] = $formIdDetails['Lateral_Entry_Fee']; +// // $dbDetailsArr['DualSpclFee'] = $formIdDetails['Dual_Spcl_Fee']; +// // $dbDetailsArr['OtherFee'] = $formIdDetails['Other_Fee']; +// // $dbDetailsArr['NRIFEE'] = $formIdDetails['NRI_FEE']; +// // $dbDetailsArr['ProvisionalFee'] = $formIdDetails['Provisional_Fee']; +// // $dbDetailsArr['MigrationFee'] = $formIdDetails['Migration_Fee']; +// // $dbDetailsArr['UrgentResultDMCFee'] = $formIdDetails['Urgent_Result_DMC_Fee']; +// // $dbDetailsArr['AdditionalFee'] = $formIdDetails['Additional_Fee']; +// // $dbDetailsArr['Amount'] = $formIdDetails['Amount']; +// // // $dbDetailsArr['BranchCode'] = $formIdDetails['FormId']; + +// // if($FormIDdetailsList->result()){ +// // $ids = $FormIDdetailsList->result(); +// // $this->db->where('ID', $ids['ID']); +// // $this->db->update('T_FormId_FeeDetails_Received_From_University', $dbDetailsArr); +// // } else { +// // print_r($dbDetailsArr);exit(); +// // $this->db->insert('T_FormId_FeeDetails_Received_From_University', $dbDetailsArr); +// // $this->db->affected_rows(); +// // } + +// } else{ - } - } +// } +// } return 'true'; } diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index 4d9b7485..1f2facc4 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -515,6 +515,61 @@ GROUP BY x.regid"; return $results; + } + public function app_pending_old($bat=null,$br=null,$u=null){ + + $sql = "select a.StudentID as Student_id, +a.CourseID as cid, +a.BranchCode as branch, +a.ListCode as lcode, +ifnull(a.AppDate,'-') as adate, +a.CertificationType as ctype, +ifnull(sfs.BatchCode,'-') as batch, +list.ListName as StatusName, +ifnull(sfp.bill,'-') as init_date, +STU.Firstname as Student_name, +STU.Fathername as FatherName, +STU.MobileNumber as Phone_number, +STU.AlternateNumber as AlternateNumber, +STU.PermanentAddress as address, +STU_COUR.EnrollmentID as eid, +COUR.CourseName as Course_name, +UNIV.UniversityName as University +from T_ApplicationStatus a +left join T_Students_Fees_Status sfs on sfs.StudentID = a.StudentID and sfs.CourseID = a.CourseID +left join (SELECT StudentID,FeesId AS FeesID, min(CreatedOn), BillDate AS bill FROM T_Students_Fees_PaidDetails GROUP BY FeesId) as sfp on sfp.StudentID = sfs.StudentID and sfp.FeesID = sfs.FeesID +left join T_PickListDetails list on list.ListCode = a.ListCode +left join T_StudentDetails AS STU ON STU.StudentID = a.StudentID +left join T_CourseMaster AS COUR ON COUR.CourseID = a.CourseID +LEFT JOIN T_UniversityMaster AS UNIV ON UNIV.UniversityID = COUR.UniversityID +LEFT JOIN T_Student_CourseDetails AS STU_COUR ON STU_COUR.StudentID = a.StudentID AND STU_COUR.CourseID = a.CourseID +left join T_CertificationMaster cert on cert.CertificationID=a.CertificationType +where a.ID in (select max(ID) from T_ApplicationStatus group by StudentID,CourseID,CertificationType) and cert.CertificateName like 'APPLICATION%' + + "; + if ($bat!= ''){ + + $sql.=" and sfs.BatchCode = '".$bat."'"; + + } + if ($u!= ''){ + + $sql.=" and UNIV.UniversityID = '".$u."'"; + + } +$sql.=" group by Student_id,cid,ctype"; + $leadDet=$this->db->query($sql); + $answer = $leadDet->result(); + if (count($answer) > 0) { + $results['app_pendingList'] = true; + $results['app_pending_oldData'] = $answer; + } else { + $results['app_pendingList'] = false; + $results['message'] = 'No record found'; + } + + return $results; + } public function doc_pending($bat=null,$br=null,$u=null){ diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json index 102629fe..a4b605a6 100755 --- a/Apollo/assets/i18n/en.json +++ b/Apollo/assets/i18n/en.json @@ -88,6 +88,7 @@ "expense": "Expenses", "answer_booklets": "Answer Booklets", "app_pending": "New and Re-reg Form Status", + "app_pending_old": "Application Status - Old Data", "doc_pending": "Student Docs Pending", "wav_ref": "Waiver and Referral", "examfee": "Exam Writing Fees", diff --git a/Apollo/assets/js/config.constant.js b/Apollo/assets/js/config.constant.js index e6b6307a..0239a568 100755 --- a/Apollo/assets/js/config.constant.js +++ b/Apollo/assets/js/config.constant.js @@ -226,6 +226,7 @@ app.constant('JS_REQUIRES', { 'report_expenseCtrl':'assets/js/controllers/report_expenseCtrl.js', 'report_ans_bookletCtrl':'assets/js/controllers/report_ans_bookletCtrl.js', 'report_app_pendingCtrl':'assets/js/controllers/report_app_pendingCtrl.js', + 'report_app_pending_oldDataCtrl':'assets/js/controllers/report_app_pending_oldDataCtrl.js', 'report_doc_pendingCtrl':'assets/js/controllers/report_doc_pendingCtrl.js', 'report_waiver_referalCtrl':'assets/js/controllers/report_waiver_referalCtrl.js', 'report_examfeeCtrl':'assets/js/controllers/report_examfeeCtrl.js', diff --git a/Apollo/assets/js/config.router.js b/Apollo/assets/js/config.router.js index 0f8f2460..9d81c71c 100755 --- a/Apollo/assets/js/config.router.js +++ b/Apollo/assets/js/config.router.js @@ -675,6 +675,12 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com resolve: loadSequence('ui.select','report_app_pendingCtrl','ngTable', 'ladda', 'angular-ladda'), title: 'Application Pending Student List Report', + }).state('app.reports.app_pending_old', { + url: '/report_app_pending_oldDataCtrl', + templateUrl: "assets/views/report_application_pending_oldData.html", + resolve: loadSequence('ui.select','report_app_pending_oldDataCtrl','ngTable', 'ladda', 'angular-ladda'), + title: 'Application Pending Student List Report', + }).state('app.reports.doc_pending', { url: '/report_doc_pendingCtrl', templateUrl: "assets/views/report_document_pending.html", diff --git a/Apollo/assets/js/controllers/report_app_pending_oldDataCtrl.js b/Apollo/assets/js/controllers/report_app_pending_oldDataCtrl.js new file mode 100644 index 00000000..72dce9d9 --- /dev/null +++ b/Apollo/assets/js/controllers/report_app_pending_oldDataCtrl.js @@ -0,0 +1,553 @@ +'use strict'; +/*** controller***/ +app.controller('report_app_pending_oldDataCtrl', ["$scope", "$filter","$rootScope","$modal", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService", + function ($scope, $filter,$rootScope,$modal, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) { + + /* + * auto call tracking + */ + $scope.userType=JSON.parse(localStorage.getItem('localObj')).localType; + $scope.myModel = { + + "date": new Date(), + "activity": "", + "assignedTo": "", + "status": "", + "referedBy": '', + "comments":'', + "enquiryStatus":'', + + "important":false, + "branch":"", + + }; + + //get current date + $scope.hideDateSearch=true; + $scope.modifyMinDate = moment(); + //$scope.minDate = $filter('date')($scope.modifyMinDate, 'MM-dd-yyyy'); + $scope.currentDate=$filter('date')(new Date(), 'dd-MM-yyyy'); + // get 30 plus date for follwup details + $scope.modifyDate = moment(); + $scope.modifyDate.add(30, 'days'); + $scope.futureDate = $filter('date')($scope.modifyDate, 'dd-MM-yyyy'); + $scope.myModel.date=$scope.currentDate; + // console.log($scope.currentDate); + /** + * End of the call tracking + */ + // DataTables configurable options + + + $scope.univModel = { + "branch": "", + "university": "", + "batch": "", + }; + + $scope.filters = function () { + var filterlist = { + method: 'POST', + url: apiPoint.url + 'report_filters/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + branch : JSON.parse(localStorage.getItem('localObj')).localBranchID + + } + + }; + $http(filterlist).then(function (response) { + if (response.data) { + $scope.batch=[]; + $scope.batchlist = response.data.batch; + $scope.university = response.data.university; + //Desc order Batchlist + angular.forEach($scope.batchlist,function (values,key) { + var parts = values.BatchDate.split("-"); + $scope.batch.push({ + "batchcode":values.batchcode, + "batch":values.batch + '('+ values.batchcode + ')', + "BatchDate":values.BatchDate, + "givenDateObject":new Date(parts[2], parts[1] - 1, parts[0]) + }) + }); + // call service for make a list in desc order based on date + $scope.batch=dateListDescService.getOrderByList($scope.batch); + //console.log($scope.branch); + } else { + } + }); + } + //For batch dropdown + $scope.$watch('univModel.university', function (newValue,oldValue) { + if(newValue==undefined || newValue==''){ + $scope.filterBatchDetails=""; + console.log($scope.filterBatchDetails); + } + else{ + if(angular.isString(newValue)){ + $scope.filterBatchDetails=angular.fromJson(newValue); + } + } + + }); + //Response data + $scope.show = false; + $scope.onSubmit = function (form) { + $scope.filterUniv = angular.fromJson($scope.univModel.university); + // 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; + $scope.show = true; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$batch; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[batch=' + firstError + ']').focus(); + }else { + //alert($scope.batch.name); + $scope.app_pending_data = ''; + $scope.message = ''; + var response_data = { + method: 'POST', + url: apiPoint.url + 'report_app_pending_old/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + branch: JSON.parse(localStorage.getItem('localObj')).localBranchID, + university: $scope.filterUniv.universityID, + batch: $scope.univModel.batch + + } + + }; + + $http(response_data).then(function (response) { + if (response.data.app_pendingList == true) { + $scope.app_pending_data = response.data.app_pending_oldData; + for(var i=0;i<$scope.app_pending_data.length;i++) + $scope.app_pending_data[i].SL_NO = i+1; + + } else { + $scope.message = response.data.message; + } + + }); + + } + } + var mystyle = { + sheetid: 'Application Status Report for Old Data', + headers: true, + caption: { + title:'Application Status Report for Old Data', + width: '300px', + style:'font-size:50px;' + }, + // style:'background:#00FF00', + column: { + style:'font-size:12px' + }, + + }; + + + + $scope.exportData = function () { + alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,init_date as InititalPaymentDate,eid as EnrollmentID,Student_name as StudentName,FatherName as FatherName,Course_name as CourseName,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,StatusName as ApplicationPendingStatus,adate as Date INTO XLS("ApplicationStatusReport.xls",?) FROM ?',[mystyle,$scope.app_pending_data]); + }; + + + /** + * Auto Call Tracking Sriram + */ + $scope.selectedStudentsID = []; + $scope.isCheckAll = function(e){ + var val = (e.target.checked ? true : false); + if(val) + { + // $scope.disable = false; + var len = $scope.app_pending_data.length; + var i = 0; + for(i=0;i
  • - Application Pending Student List Report + New & Re-Reg Form Status Report
  • +
  • + + Application Status List Report(Old Data) + +
  • Document Pending Student List Report @@ -951,7 +956,12 @@
  • - Application Pending Student List Report + New & Re-Reg Form Status Report + +
  • +
  • + + Application Status List Report(Old Data)
  • diff --git a/Apollo/assets/views/report_application_pending_oldData.html b/Apollo/assets/views/report_application_pending_oldData.html new file mode 100644 index 00000000..c2e29872 --- /dev/null +++ b/Apollo/assets/views/report_application_pending_oldData.html @@ -0,0 +1,143 @@ +
    +
    +
    + + +

    Application Status Report - Old Data

    +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    + +
    + + + + Please select University. +
    + +
    + + + + Please select Batch. +
    +
    +
    + + + +
    +
    +
    +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    SL.NoInitital Payment DateEnrollment IDStudent NameFather NameCoursePhone NoUniversityApplication StatusDate
    {{p.SL_NO}}{{p.init_date}}{{p.eid}}{{p.Student_name}}{{p.FatherName}}{{p.Course_name}}{{p.Phone_number}}{{p.University}}{{p.StatusName}}{{p.adate}}
    +

    {{message}}

    + +
    + + + +
    +
    \ No newline at end of file