diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index 7c68d5cd..aac78eed 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -370,4 +370,7 @@ $route['addManualEnrolmentDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/ad $route['getForFormIdDraftDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getForFormIdDraftDetails'; $route['addForFormIdDraftDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/addForFormIdDraftDetails'; $route['draftMovetoList'] = 'Receive_Enrolment_Fees_Univ_Controller/draftMovetoList'; -$route['editDraftFormIdFeesDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/editDraftFormIdFeesDetails'; \ No newline at end of file +$route['editDraftFormIdFeesDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/editDraftFormIdFeesDetails'; +$route['getStudentUnivFormIdFeeDatailsList'] = 'Receive_Enrolment_Fees_Univ_Controller/getStudentUnivFormIdFeeDatailsList'; +$route['getFormIdDetailsStatusUpdateList'] = 'Receive_Enrolment_Fees_Univ_Controller/getFormIdDetailsStatusUpdateList'; +$route['insertStatusUpdateDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/insertStatusUpdateDetails'; diff --git a/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php b/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php index dda9badb..637edb56 100644 --- a/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php +++ b/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php @@ -337,5 +337,59 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller { } } + // get formid fee details list with status + public function getStudentUnivFormIdFeeDatailsList_post(){ + $reqBranchData = $this->post('data'); + $searchDetails = $this->post('search'); + + $getStudentUnivFormIdFeeDatailsList = $this->receive_model->getStudentUnivFormIdFeeDatailsList($reqBranchData, $searchDetails); // Check if the employee exist + if ($getStudentUnivFormIdFeeDatailsList) { + $getStudentUnivFormIdFeeDatailsList['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getStudentUnivFormIdFeeDatailsList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + + } else { + // Set the response and exit + $this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + + } + } + + public function getFormIdDetailsStatusUpdateList_post(){ + $reqBranchData = $this->post('localDetails'); + $statusDetailsId = $this->post('detailsID'); + + $getFormIdDetailsStatusUpdateList = $this->receive_model->getFormIdDetailsStatusUpdateList($reqBranchData, $statusDetailsId); // Check if the employee exist + if ($getFormIdDetailsStatusUpdateList) { + $getFormIdDetailsStatusUpdateList['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getFormIdDetailsStatusUpdateList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + + } else { + // Set the response and exit + $this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + + } + } + + public function insertStatusUpdateDetails_post(){ + $reqBranchData = $this->post('localDetails'); + $statusDetails = $this->post('details'); + $id = $this->post('id'); + $formId = $this->post('formId'); + + $insertStatusUpdateDetails = $this->receive_model->insertStatusUpdateDetails($reqBranchData, $statusDetails, $id, $formId ); // Check if the employee exist + if ($insertStatusUpdateDetails) { + $insertStatusUpdateDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($insertStatusUpdateDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + + } else { + // Set the response and exit + $this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + + } + } + } \ No newline at end of file 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 118c4a71..a869d2b7 100644 --- a/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php +++ b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php @@ -1083,4 +1083,109 @@ $result['updatedraftStatus'] = false; return $result; } + public function getStudentUnivFormIdFeeDatailsList($reqBranchData, $searchDetails){ + + $this->db->select('FUD.*, concat(ST.FirstName," ", ST.Lastname) as app_StudentName, IF(concat(ST.FirstName," " , ST.Lastname) = FUD.Student_Name, "YES", "NO") as StudentNameStatus , + ST.Fathername as app_FatherName, IF(ST.Fathername = FUD.Father_Name, "YES", "NO") as FathernameStatus, + CM.CourseCode as app_CourseCode, IF(CM.CourseCode = FUD.CourseCode, "YES", "NO" ) as CourseCodeStatus'); + $this->db->from('T_FormId_FeeDetails_Received_From_University as FUD'); + $this->db->join(ENROLMENTRECEIVEDFROMUNIV.' as ENU', 'FUD.FormID = ENU.FormID' ); + $this->db->join(STUDENTCOURSE.' as STC', 'STC.EnrollmentID = ENU.EnrolmentNo'); + $this->db->join(COURSE.' as CM', 'CM.CourseID = STC.CourseID'); + $this->db->join(STUDENTS.' as ST', 'ST.StudentID = STC.StudentID'); + // $this->db->join(UNIVERSITY.' as UN', 'UN.UniversityID = STC.UniversityID'); + if($searchDetails['University']!=''){ + $this->db->where('ENU.UniversityCode',$searchDetails['University']); + } + if($searchDetails['Course']!=''){ + $this->db->where('ENU.CourseCode',$searchDetails['Course']); + } + if($searchDetails['Sem']!=''){ + $this->db->where('ENU.SemesterYear',$searchDetails['Sem']); + } + $this->db->where('FUD.DraftStatus',0); + $details = $this->db->get(); + $detailsList = $details->result(); + if($detailsList){ + // foreach ($detailsList as $fetchStudentRow){ + // // form id bases get student paid details + // $getStudentsetFeesDetails=$this->getStudentsetFeesDetails($fetchStudentRow->StudentID,$fetchStudentRow->CourseID,$fetchStudentRow->SemesterYear); + // if(isset($getStudentsetFeesDetails['status']) AND $getStudentsetFeesDetails['status']==true ){ + // $formResult['SessionName']=$getStudentsetFeesDetails['SessionName']; + // $formResult['FormID']=$fetchStudentRow->FormID; + // $formResult['FormType']=$fetchStudentRow->FormType; + // $formResult['SemesterYear']=$fetchStudentRow->SemesterYear; + // $formResult['EnrolmentNo']=$fetchStudentRow->EnrolmentNo; + // $formResult['CourseCode']=$fetchStudentRow->CourseCode; + // $formResult['CourseName']=$fetchStudentRow->CourseName; + // $formResult['RollNo']=$fetchStudentRow->RollNo; + // $formResult['StudentID']=$fetchStudentRow->StudentID; + // $formResult['MobileNumber']=$fetchStudentRow->MobileNumber; + // $formResult['Firstname']=$fetchStudentRow->Firstname; + // $formResult['Lastname']=$fetchStudentRow->Lastname; + // $formResult['Fathername']=$fetchStudentRow->Fathername; + // $formResult['MotherName']=$fetchStudentRow->MotherName; + // $formResult['EmailID']=$fetchStudentRow->EmailID; + // $formResult['AlternateNumber']=$fetchStudentRow->AlternateNumber; + // $formResult['Gender']=$fetchStudentRow->Gender; + // $formResult['DOB']=$fetchStudentRow->DOB; + // $formResult['PresentAddress']=$fetchStudentRow->PresentAddress; + // $formResult['PermanentAddress']=$fetchStudentRow->PermanentAddress; + // $formResult['AadharNumber']=$fetchStudentRow->AadharNumber; + // $formResult['OtherID']=$fetchStudentRow->OtherID; + // $formResult['OtherIDDetails']=$fetchStudentRow->OtherIDDetails; + // $formResult['Qualification']=$fetchStudentRow->Qualification; + // $formResult['UniversityID']=$fetchStudentRow->UniversityID; + // $formResult['UniversityName']=$fetchStudentRow->UniversityName; + // $mergeFormDetails[]=$formResult; + // } + // } + $resultArr['studentFeeCompareDetails'] = $detailsList; + $resultArr['formTypeStatus'] = true; + $resultArr['message'] = "Successfully data generated"; + } else { + $resultArr['studentFeeCompareDetails'] = []; + $resultArr['formTypeStatus'] = false; + $resultArr['message'] = "No record found"; + } + return $resultArr; + + } + + public function getFormIdDetailsStatusUpdateList($reqBranchData, $searchDetails){ + $selectQuery = "SELECT * FROM T_FormId_FeeDetails_Received_From_University_StatusUpdate WHERE FormIdDetailsID = '$searchDetails'"; + $details = $this->db->query($selectQuery); + $detailsList = $details->result(); + if($detailsList) { + $result['formIdstatusListStatus'] = true; + $result['formIdstatusListDetails'] = $detailsList; + $result['formIdstatusListMessagae'] = "details generate successfully."; + } else { + $result['formIdstatusListStatus'] = false; + $result['formIdstatusListDetails'] = ''; + $result['formIdstatusListMessagae'] = "No Record Found."; + } + return $result; + } + + public function insertStatusUpdateDetails($reqBranchData, $statusDetails, $id, $formId ){ + + $newLeadDetails['FormIdDetailsID'] = $id; + $newLeadDetails['FormID'] = $formId; + $newLeadDetails['Status'] = $statusDetails['Status']; + $time = date('Y-m-d H:i:s'); + $newLeadDetails['CreatedOn'] = $time; + $newLeadDetails['CreatedBy'] = $reqBranchData['localUserID']; + $this->db->insert('T_FormId_FeeDetails_Received_From_University_StatusUpdate', $newLeadDetails); + // this if for insert lead details + if ($this->db->affected_rows() == '1') { + $result['insertStatusUpdateDetailsStatus'] = true; + $result['insertStatusUpdateDetailsMessagae'] = "Status Updated successfully."; + }else { + $result['insertStatusUpdateDetailsStatus'] = false; + $result['insertStatusUpdateDetailsMessagae'] = "Something went Wrong."; + } + return $result; + } + } \ No newline at end of file diff --git a/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js b/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js index ccfb701a..7f424922 100644 --- a/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js +++ b/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js @@ -2,6 +2,7 @@ /** * controllers for ng-table * Simple table with sorting and filtering on AngularJS + * kdk */ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', "flowFactory", "$interval", 'SweetAlert', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window, flowFactory, $interval, SweetAlert) { @@ -87,11 +88,12 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter }); }; + $scope.semDetails=["1","2","3","4","5","6","7","8"]; $scope.searchData = { "University": "", "Course": "", - "Status": "" + "Sem": "" } $scope.myUnivSearch = ""; $scope.courseData = ""; @@ -134,7 +136,7 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter $scope.Searchloader = true; var empListreq = { method: 'POST', - url: apiPoint.url + 'getStudentUnivFeeCompareDetails/', + url: apiPoint.url + 'getStudentUnivFormIdFeeDatailsList/', headers: { 'Content-Type': 'application/json' }, @@ -161,6 +163,17 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter } } + $scope.myObj = { + // "color" : "green", + "font-size" : "inherit" + } + + $scope.myObjErr = { + "text-decoration": "underline", + "text-decoration-color": "red", + "font-size" : "inherit" + } + $scope.editId = -1; $scope.setEditId = function (id) { $scope.editId = id; @@ -519,4 +532,70 @@ $scope.draftManualEntryDetails = { }}); } + $scope.statusUpdateEditId = -1; + $scope.statusUpdate = function(id){ + $scope.statusUpdateEditId = id; + } + + $scope.StatusListDetails = ''; + $scope.getFormIdDetailsStatusListLoading = false; + $scope.getFormIdDetailsStatusList = function(id){ + $scope.getFormIdDetailsStatusListLoading = true; + var getFormIdDetailsStatusList = { + method: 'POST', + url: apiPoint.url + 'getFormIdDetailsStatusUpdateList/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + localDetails: localDetail, + detailsID : id + } + }; + $http(getFormIdDetailsStatusList).then(function (response) { + if (response.data.formIdstatusListStatus == true) { + $scope.getFormIdDetailsStatusListLoading = false; + $scope.StatusListDetails = response.data.formIdstatusListDetails; + } else { + $scope.getFormIdDetailsStatusListLoading = false; + $scope.StatusListDetails = response.data.formIdstatusListDetails; + $scope.StatusListDetailsApiMessage = response.data.formIdstatusListMessagae; + }}); + } + + $scope.statusUpdateFormIdDetails = { + "Status": "", + "Comments": "" + } + + $scope.addStatusUpdateDetails = function(id, formId){ + var addStatusUpdateDetailsStatusList = { + method: 'POST', + url: apiPoint.url + 'insertStatusUpdateDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + localDetails: localDetail, + details : $scope.statusUpdateFormIdDetails, + id: id, + formId : formId + } + }; + $http(addStatusUpdateDetailsStatusList).then(function (response) { + if (response.data.insertStatusUpdateDetailsStatus == true) { + $scope.statusUpdateFormIdDetails = { + "Status": "", + "Comments": "" + } + $scope.statusUpdateEditId = -1; + swal("", response.data.insertStatusUpdateDetailsMessagae, "success"); + } else { + swal("", response.data.insertStatusUpdateDetailsMessagae, "success"); + // $scope.getFormIdDetailsStatusListLoading = false; + // $scope.StatusListDetails = response.data.formIdstatusListDetails; + // $scope.StatusListDetailsApiMessage = response.data.formIdstatusListMessagae; + }}); + } + }]); diff --git a/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html b/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html index 231cf356..1f43e63c 100644 --- a/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html +++ b/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html @@ -65,13 +65,24 @@ Course - + Select Course {{itemCourse.CourseName}} - - + + + Sem + + + Select Sem + {{sem}} + + + + + + @@ -94,30 +105,65 @@ + Action + FormID Form Type - Student Name + CentreCode - Father Name + Session - University + Year - Course + Semester - Sem/Year + Student_Name - Enrolment ID + Father_Name - University Paid + CourseCode - Student Paid + ActualCourseFee + + CourseFee + + ExamFee + + EnrollmentFee + + ProspectusFee + + ReRegFee + + CreditTransferFee + + LateralEntryFee + + DualSpclFee + + OtherFee + + NRIFEE + + ProvisionalFee + + MigrationFee + + UrgentResultDMCFee + + AdditionalFee + + Amount + + + {{p.FormID}} @@ -125,48 +171,97 @@ {{p.FormType}} - - {{p.Firstname}} {{p.Lastname}} - - + {{p.CentreCode}} - {{p.Fathername}} - {{p.UniversityName}} - {{p.CourseName}} - {{p.SemesterYear}} - {{p.EnrolmentNo}} - {{p.UniversityPaidAmount}} - {{p.StudentPaidAmount}} + + {{p.Session}} + + + {{p.Year}} + + + {{p.Semester}} + + + {{p.Student_Name}} + + + {{p.Father_Name}} + + + {{p.CourseCode}} + + {{p.ActualCourseFee}} + {{p.CourseFee}} + {{p.ExamFee}} + {{p.EnrollmentFee}} + {{p.ProspectusFee}} + {{p.ReRegFee}} + {{p.CreditTransferFee}} + {{p.LateralEntryFee}} + {{p.DualSpclFee}} + {{p.OtherFee}} + {{p.NRIFEE}} + {{p.ProvisionalFee}} + {{p.MigrationFee}} + {{p.UrgentResultDMCFee}} + {{p.AdditionalFee}} + {{p.Amount}} - + + + + Loading... + + + + + + + + Select Status + + + Ok + Not Ok + Not Our Student + + + + + Comments + + + + + + + + Save + + + Reset + + + + + + + + + {{StatusListDetailsApiMessage}} + + + - --> +