diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index ae79d2f2..67490a38 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -210,6 +210,15 @@ $route['getallnumer'] = 'Broadcast_Controller/getallnumer'; $route['setValue'] = 'Broadcast_Controller/setValue'; $route['setgrpstatus'] = 'Broadcast_Controller/setgrpstatus'; +/* Data Correction */ + +$route['getAllstudentcoursedetail'] = 'DataCorrection_Controller/getAllstudentcoursedetail'; +$route['getAllfeedetail'] = 'DataCorrection_Controller/getAllfeedetail'; +$route['updateCourseDetails'] = 'DataCorrection_Controller/updateCourseDetails'; + + +/* + diff --git a/Apollo/api/application/controllers/DataCorrection_Controller.php b/Apollo/api/application/controllers/DataCorrection_Controller.php new file mode 100644 index 00000000..70660b6f --- /dev/null +++ b/Apollo/api/application/controllers/DataCorrection_Controller.php @@ -0,0 +1,171 @@ +load->model('Data_correction', 'Data_correction'); + + } + + public function StudMerge_post() + { + $toDelete = $this->post('toDelete'); + $toMerge = $this->post('toMerge'); + $getStatus = $this->Data_correction->Student_Merge($toDelete,$toMerge); + //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 getAllstudentcoursedetail_post() + { + $search['Firstname'] = $this->post('studentName'); + $search['MobileNumber'] = $this->post('mobileNumber'); + $search['receipt'] = $this->post('receipt'); + $search['requestedtBy'] =$this->post('requestedtBy'); + $search['branchId']=$this->post('branchId'); + $search['requestedDept'] = $this->post('requestedDept'); + $search['University'] = $this->post('University'); + + $stucourse = $this->Data_correction->GetAllCourseDetails($search); + + if($stucourse) + { + $stucourse['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($stucourse, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + $this->response([ + 'message' => 'No records found!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); + } + + } + + + public function getAllfeedetail_post() + { + $search['University'] = $this->post('University'); + $search['courseId'] = $this->post('courseId'); + $search['studentId'] =$this->post('studentId'); + $search['requestedtBy'] =$this->post('requestedtBy'); + $search['branchId']=$this->post('branchId'); + $search['requestedDept'] = $this->post('requestedDept'); + + $feedetails = $this->Data_correction->GetFeeDetails($search); + + if($feedetails) + { + $feedetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($feedetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + $this->response([ + 'message' => 'No records found!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); + } + + + } + + + public function updateCourseDetails_post() + { + $search['University'] = $this->post('universityid'); + $search['courseId'] = $this->post('courseId'); + $search['studentId'] =$this->post('studentid'); + $search['requestedtBy'] =$this->post('requestedtBy'); + $search['branchId']=$this->post('branchId'); + $search['requestedDept'] = $this->post('requestedDept'); + + $search['Reason'] = $this->post('Reason'); + $search['IsActive'] = $this->post('IsActive'); + + $updatedetails = $this->Data_correction->UpdateCouseandfee($search); + + $allfeeid = $this->Data_correction->GetAllfeeid($search); + + if(!empty($allfeeid)) + { + foreach($allfeeid as $fi) + { + $feeid = $fi->FeesID; + + $feedeact = $this->Data_correction->feedetailupdate($search,$feeid); + + } + } + + + + + // if($updatedetails) + // { + // $updatedetails['status'] = REST_Controller::HTTP_OK; + // // Set the response and exit + // $this->response($updatedetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + // } + // else + // { + // $this->response([ + // 'message' => 'No records found!', + // 'status' => REST_Controller::HTTP_NOT_FOUND + // ], REST_Controller::HTTP_NOT_FOUND); + // } + + } + + + + + + +} \ No newline at end of file diff --git a/Apollo/api/application/models/Data_correction.php b/Apollo/api/application/models/Data_correction.php new file mode 100644 index 00000000..e4cab2e2 --- /dev/null +++ b/Apollo/api/application/models/Data_correction.php @@ -0,0 +1,176 @@ +db->query($sql); + $batch = $b->result(); + if (count($batch) > 0) { + $results['MergeStatus'] = true; + $results['Stud_Merge'] = $batch; + } else { + $results['MergeStatus'] = false; + $results['message'] = 'No record found'; + } + return $results; + } + + + + Public function GetAllCourseDetails($search) + { + $this->db->select('sd.MobileNumber,sd.Firstname,sd.Lastname,CourseName,UniversityName,scd.CourseID,scd.ID,sd.StudentID,scd.IsActive as IsActive,scd.DeactiveComments as Reason,scd.UniversityID,sfs.FeesID'); + $this->db->from('T_StudentDetails sd'); + $this->db->join('T_Student_CourseDetails scd','scd.StudentID = sd.StudentID'); + $this->db->join('T_CourseMaster cm','cm.CourseID = scd.CourseID'); + $this->db->join('T_UniversityMaster um','um.UniversityID = scd.UniversityID'); + $this->db->join('T_Students_Fees_Status sfs','sfs.StudentID = scd.StudentID and sfs.CourseID=scd.CourseID'); + if($search['MobileNumber']!='') + { + $this->db->where('sd.MobileNumber',$search['MobileNumber']); + } + if($search['Firstname']!='') + { + // $this->db->like('ST.Firstname','%'.$search['Firstname'].'%'); + $this->db->like('sd.Firstname',$search['Firstname'],'both'); + } + if($search['University']!='') + { + // $this->db->like('ST.Firstname','%'.$search['Firstname'].'%'); + $this->db->where('scd.UniversityID',$search['University']); + } + $this->db->group_by('scd.ID'); + + $searchDetails = $this->db->get(); + + if($searchDetails->result()) + { + + //print_r($searchDetails->result()); + $result_array['studentStatus'] = true; + $result_array['details'] = $searchDetails->result(); + } + else + { + $result_array['studentStatus'] = false; + $result_array['details'] = "No records found!"; + } + // print_r($result_array); + // die(); + + return $result_array; + + + } + + + + Public function GetFeeDetails($search) + { + $this->db->select('BillNO,BillDate,BillAmount,ModeOfPayment ,ReceiptNo,sfd.ID as FID'); + $this->db->from('T_Students_Fees_PaidDetails sfd'); + $this->db->join('T_Students_Fees_Status sfs','sfs.StudentID = sfd.StudentID and sfs.FeesID=sfd.FeesId'); + $this->db->where('sfs.StudentID',$search['studentId']); + $this->db->where('sfs.CourseID',$search['courseId']); + $feeDetails = $this->db->get(); + + if($feeDetails->result()) + { + + //print_r($searchDetails->result()); + $result_array['feeStatus'] = true; + $result_array['details'] = $feeDetails->result(); + } + else + { + $result_array['feeStatus'] = false; + $result_array['details'] = "No records found!"; + } + + //print_r($result_array);die(); + + return $result_array; + + } + + + + Public function UpdateCouseandfee($search) + { + $time = date('Y-m-d H:i:s'); + $dateTime = $time; + + + $coursearr['IsActive'] = $search['IsActive']; + $coursearr['DeactiveComments'] =$search['Reason']; + $this->db->where('StudentID', $search['studentId']); + $this->db->where('UniversityID', $search['University']); + $this->db->where('CourseID', $search['courseId']); + $this->db->update('T_Student_CourseDetails', $coursearr); + + + $dayarr['IsActive'] = $search['IsActive']; + $dayarr['Reason'] = $search['Reason']; + + if( $search['IsActive'] ==0) + { + $dayarr['Status'] = 'Cancel'; + } + $this->db->where('StudentID', $search['studentId']); + $this->db->where('CourseID', $search['courseId']); + $this->db->update('T_DayBookMaster', $dayarr); + + + // $feearr['IsActive'] = $search['IsActive']; + // $feearr['InternalComments'] = $search['Reason']; + // $feearr['UpdatedOn'] = $dateTime; + // $feearr['UpdatedBy'] = $search['branchId']; + + // $this->db->where('FeesId', $search['ID']); + // $this->db->update('T_Students_Fees_PaidDetails', $feearr); + + return TRUE; + + + } + + + Public function GetAllfeeid($search) + { + $this->db->select('FeesID'); + $this->db->from('T_Students_Fees_Status'); + $this->db->where('StudentID',$search['studentId']); + $this->db->where('CourseID',$search['courseId']); + $feeidDetails = $this->db->get(); + + //print_r($feeidDetails->result()); + //die(); + + return $feeidDetails->result(); + } + + + public function feedetailupdate($search,$feeid) + { + $time = date('Y-m-d H:i:s'); + $dateTime = $time; + + $feearr['IsActive'] = $search['IsActive']; + $feearr['InternalComments'] = $search['Reason']; + $feearr['UpdatedOn'] = $dateTime; + $feearr['UpdatedBy'] = $search['branchId']; + + $this->db->where('FeesId', $feeid); + $this->db->where('StudentID',$search['studentId']); + $this->db->update('T_Students_Fees_PaidDetails', $feearr); + return true; + } + +} \ No newline at end of file diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json index f543d7f5..f798f467 100755 --- a/Apollo/assets/i18n/en.json +++ b/Apollo/assets/i18n/en.json @@ -77,7 +77,8 @@ "SESSIONSCHEDULE": "Session Schedule", "HALLTICKET": "HALL TICKET", "REREGISTRATION":"RE-REGISTRATION", - "ACCOUNTTYPE":"Account Types" + "ACCOUNTTYPE":"Account Types", + "ENTRY":"ENTRY CORRECTION" }, "report": { "TITLE": "REPORTS", @@ -106,7 +107,6 @@ "STUDENTDETAILS": "Manage", "STUDENTDETAILSADDEDIT": "Manage Details", "STUDENTFEEDETAILCOMPARE": "Student University Fee", - "STUDENTFROMIDFEEDETAILS": "Student FormId Fee Details", "status" : { "MAIN": "Update Status", "STUDYMATERIAL": "Study Material", @@ -153,6 +153,10 @@ "mydetails": { "MAIN": "My Details" }, + "entry": { + "MAIN": "My Details", + "coursecorrection": "Course Details" + }, "announcement": { "MAIN": "ANNOUNCEMENT", "ANNOUNCEMENTLISTING": "List", diff --git a/Apollo/assets/js/config.constant.js b/Apollo/assets/js/config.constant.js index b8c0e32b..82beca4b 100755 --- a/Apollo/assets/js/config.constant.js +++ b/Apollo/assets/js/config.constant.js @@ -146,6 +146,10 @@ app.constant('JS_REQUIRES', { 'FeeCollected_reportCtrl': 'assets/js/controllers/FeeCollected_reportCtrl.js', /* + **/ + 'entrycorrectionCtrl': 'assets/js/controllers/entrycorrectionCtrl.js', + /* + * student status updation * */ diff --git a/Apollo/assets/js/config.router.js b/Apollo/assets/js/config.router.js index 9c4188dd..76cbf9e4 100755 --- a/Apollo/assets/js/config.router.js +++ b/Apollo/assets/js/config.router.js @@ -782,7 +782,24 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com ncyBreadcrumb: { label: 'Promote Batch' } - }); + }).state('app.entry', { + url: '/entry', + template: '