diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index a7d21665..0d3d8d62 100755 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -137,7 +137,7 @@ defined('STUDENTS') OR define('STUDENTS','T_StudentDetails'); defined('ANNOUNCEMENT') OR define('ANNOUNCEMENT','T_AnnouncementDetails'); defined('ACTIVITY') OR define('ACTIVITY','T_ActivityMaster'); defined('ACTIVITY_STATUS') OR define('ACTIVITY_STATUS','T_Activity_Status'); -defined('ANSWER_BOOKLET') OR define('ANSWER_BOOKLET','T_AnswerBookletStatus'); +defined('ANSWER_BOOKLET') OR define('ANSWER_BOOKLET','T_AnswerBookletStatus'); defined('APPLICATION_STATUS') OR define('APPLICATION_STATUS','T_ApplicationStatus'); defined('CERTIFICATION_STATUS') OR define('CERTIFICATION_STATUS','T_CertificationStatus'); defined('STUDENTS_FEES_STATUS') OR define('STUDENTS_FEES_STATUS','T_Students_Fees_Status'); diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index ce31d44a..ce09afb1 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -142,7 +142,7 @@ $route['deleteDocPendingDetails'] = 'Student_Controller/deleteDocPendingDetails' $route['getEmployeeDetailsBranch'] = 'Student_Controller/getEmployeeDetailsBranch'; //batch -$route['addBatchDetails'] = 'Batch_Controller/addBatchDetails'; +$route['addBatchDetails'] = 'Batch_Controller/addBatchDetails'; $route['updateBatchDetails'] = 'Batch_Controller/updateBatchDetails'; $route['getBatchDetails'] = 'Batch_Controller/getBatchDetails'; $route['updateBatchDefault'] = 'Batch_Controller/updateBatchDefault'; @@ -200,6 +200,7 @@ $route['feepaidDetails'] = 'Report/feepaidDetails'; $route['getSubjectDetaillist'] = 'HallTickets_Controller/getSubjectDetaillist'; + /* Add New Contact Group */ $route['addNewGroup'] = 'Broadcast_Controller/addNewGroup'; $route['getGroups'] = 'Broadcast_Controller/getGroups'; @@ -210,6 +211,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'; + + +/* + @@ -311,6 +321,7 @@ $route['updateSheduleDetails'] = 'HallTickets_Controller/updateSheduleDetails'; $route['getSheduleDetails'] = 'HallTickets_Controller/getSheduleDetails'; $route['getUniversityCourseId'] = 'HallTickets_Controller/getUniversityCourseId'; $route['saveBatchSchedule'] = 'HallTickets_Controller/SaveAllBatchSchedule'; +$route['batchUploadDataDetails'] = 'HallTickets_Controller/BatchUploadDataDetails'; // Re Registration Form $route['getStudentListForRegistrer'] = 'Reregister_Controller/getStudentListForReregister'; $route['getSubject'] = 'Reregister_Controller/getSubject'; diff --git a/Apollo/api/application/controllers/Batch_Controller.php b/Apollo/api/application/controllers/Batch_Controller.php index 7a53f21c..9a77c55b 100755 --- a/Apollo/api/application/controllers/Batch_Controller.php +++ b/Apollo/api/application/controllers/Batch_Controller.php @@ -36,13 +36,15 @@ class Batch_Controller extends REST_Controller { $now = new DateTime(); $now->setTimezone(new DateTimezone('Asia/Kolkata')); $details['BatchCode'] = $this->post('batchcode'); + $details['BatchName'] = $this->post('batcheName'); $details['BatchDate'] = $this->post('batcheDate'); $details['UniversityID'] = $this->post('universityName'); - $details['CreatedBy'] = $this->post('createdBy'); + $details['CreatedBy'] = $this->post('createdBy'); $details['IsActive'] = $this->post('status'); $details['BranchCode'] = $this->post('branchCode'); $details['CreatedOn'] = $now->format('Y-m-d H:i:s'); + print_r( $details +'samplearray'); $batchDetails = $this->batch_model->addBatch($details);// Check if the users data store contains users (in case the database result returns NULL) if ($batchDetails) 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/controllers/HallTickets_Controller.php b/Apollo/api/application/controllers/HallTickets_Controller.php index 3c00659f..7a6e1888 100755 --- a/Apollo/api/application/controllers/HallTickets_Controller.php +++ b/Apollo/api/application/controllers/HallTickets_Controller.php @@ -24,7 +24,7 @@ class HallTickets_Controller extends REST_Controller { $this->methods['getCourseSubjectDetails_post']['limit'] = 500; // 500 requests per hour per user/key $this->methods['getUniversityCourseDetails_post']['limit'] = 500; // 500 requests per hour per user/key $this->methods['updateSheduleDetails_post']['limit'] = 500; // 500 requests per hour per user/key - + $this->methods['BatchUploadDataDetails_post']['limit'] = 500; // load the model $this->load->model('Hallticket_model', 'Hallticket_model'); @@ -305,22 +305,58 @@ class HallTickets_Controller extends REST_Controller { } } + public function BatchUploadDataDetails_post() + { + // echo 'hai'; + $university= $this->post('universityDetails'); + $courseArray = $this->post('courseDetails'); + $filedetails = $this->post('details'); + $requestedBy = $this->post('requestedBy'); + $branchId = $this->post('branchId'); + $Cdate = new DateTime('now',new DateTimeZone('Asia/Kolkata')); + $CreatedOn = $Cdate->format('Y-m-d H:i:s'); + foreach($courseArray as $CourseDatialArray) + { + $course=$CourseDatialArray; + $schedulemaster = array('UniversityID'=>$university,'CourseID'=>$course,'BranchCode'=>$branchId,'CreatedBy'=>$requestedBy,'CreatedOn'=>$CreatedOn); + $schedulemasteradd = $this->Hallticket_model->AddBatchScheduleMasterFile($schedulemaster,$filedetails); + } + $SchId = ''; + if(count($schedulemasteradd)>0) + { + $SchId = $schedulemasteradd[0]['SchId']; + } + + + + if((count($schedulemasteradd)>0)) + { + $data['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($data, REST_Controller::HTTP_OK); + } + + else + { + $this->response([ + 'message' => 'No records found!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); + + } + + } public function SaveAllBatchSchedule_post() { - - - $detailArray = $this->post('scheduleDetails'); - - $university =$this->post('getuniversityid'); - $courseid= $this->post('getcourseid'); + $detailArray = $this->post('scheduleDetails'); + $university =$this->post('getuniversityid'); + //$courseid= $this->post('getcourseid'); $requestedBy = $this->post('requestedBy'); $branchId = $this->post('branchId'); - $Cdate = new DateTime('now',new DateTimeZone('Asia/Kolkata')); $CreatedOn = $Cdate->format('Y-m-d H:i:s'); - //echo $courseid; $CourseDatialArray = $this->post('courseDetails'); foreach($CourseDatialArray as $coursedetails) { diff --git a/Apollo/api/application/models/Data_correction.php b/Apollo/api/application/models/Data_correction.php new file mode 100644 index 00000000..f84ea742 --- /dev/null +++ b/Apollo/api/application/models/Data_correction.php @@ -0,0 +1,177 @@ +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,scd.Deactive'); + $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']; + $coursearr['Deactive'] = '0'; + $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/api/application/models/Hallticket_model.php b/Apollo/api/application/models/Hallticket_model.php index aa2a5a78..b4927b14 100755 --- a/Apollo/api/application/models/Hallticket_model.php +++ b/Apollo/api/application/models/Hallticket_model.php @@ -108,18 +108,21 @@ class Hallticket_model extends CI_Model $this->db->select('SM.SubjectName,SM.SubjectID'); $this->db->from('T_SubjectMaster SM'); + $this->db->join('T_Batch_Schedule_Child','T_Batch_Schedule_Child.SubjectID=SM.SubjectID'); $this->db->where('SM.BranchCode',$branchcode); + $this->db->where('T_Batch_Schedule_Child.SchId',$mapid); $result = $this->db->get(); if($result->result()){ $resultShedule['status']=true; $mastScheduleID=""; foreach($result->result() as $row) { - + $this->db->select('T_Batch_Schedule_Child.SchId,T_Batch_Schedule_Child.SubjectID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime,T_Batch_Schedule_Child.SchChildId,T_Batch_Schedule_Child.SchId'); $this->db->from('T_Batch_Schedule_Master SCM'); $this->db->join('T_Batch_Schedule_Child','T_Batch_Schedule_Child.SchId = SCM.SchId'); - $this->db->where('T_Batch_Schedule_Child.SchId',$mapid); + //$this->db->where('SCM.BranchCode',$branchcode); + // $this->db->where('T_Batch_Schedule_Child.SchId',$mapid); $this->db->where('T_Batch_Schedule_Child.SubjectID',$row->SubjectID); $existsheduledetails = $this->db->get(); @@ -1245,11 +1248,75 @@ class Hallticket_model extends CI_Model //echo "MODEL";print_r($result);die(); return $result; - } + } + public function AddBatchScheduleMasterFile($schedulemaster,$filedetails) + { + + $this->db->trans_start(); + $this->db->insert('T_Batch_Schedule_Master', $schedulemaster); + $insert_id = $this->db->affected_rows(); + $this->db->trans_complete(); + // print_r($this->db->last_query()); + if($insert_id>0) + { + $subQuery = 'select max(SchId) as SchId from T_Batch_Schedule_Master'; + + $query = $this->db->query($subQuery); + $result = $query->result_array(); + $schid= $result[0]['SchId']; + + // if(($schid != '')||($schid !=0)) + + if(count($result)>0) + { + + foreach($filedetails as $det) + { + + $sudate = $det['schduleDate']; + $SubDate = date("Y-m-d", strtotime($sudate)); + // $SubDate=$sudate->format('Y-m-d H:i:s'); + $stime = $det['FromTime']; + $etime = $det['ToTime']; + $isactive=1; + $subcode = $det['SubjectID']; + $Cdate = new DateTime('now',new DateTimeZone('Asia/Kolkata')); + $CreatedOn = $Cdate->format('Y-m-d H:i:s'); + $this->db->select('SubjectCode,SubjectID,SubjectName'); + $this->db->from('T_SubjectMaster'); + $this->db->where('T_SubjectMaster.BranchCode', $schedulemaster['BranchCode']); + $this->db->where('T_SubjectMaster.SubjectCode', $det['SubjectID']); + $subDetails = $this->db->get()->result(); + $SubjectID=$subDetails[0]->SubjectID; + $schedulchild = array('SchId'=>$schid,'SubjectID'=>$SubjectID,'SchChildId'=>'','ScheduleDate'=>$SubDate,'FromTime'=>$stime,'ToTime'=>$etime,'IsActive'=>$isactive); + $this->db->trans_start(); + $this->db->insert('T_Batch_Schedule_Child',$schedulchild); + $this->db->trans_complete(); + + + + + } + + } + + //echo $schid; + // $schid=$query[0]['SchId']; + + // echo $schid; + + + } + return true; + + // return $query->result_array(); + + + } public function AddBatchScheduleMaster($schedulemaster,$detailArray) { - + $this->db->trans_start(); $this->db->insert('T_Batch_Schedule_Master', $schedulemaster); $insert_id = $this->db->affected_rows(); 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 0fb4d807..9d7fea9a 100644 --- a/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php +++ b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php @@ -477,6 +477,7 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model { return $results; } public function getStudentUnivFeeCompareDetails($univCode=null,$session=null){ + $mergeFormDetails=array(); $this->db->distinct('ENU.FormID'); $this->db->select('ENU.FormID, ENU.FormType, ENU.SemesterYear, ENU.EnrolmentNo,ENU.RollNo, ST.*,UN.UniversityID, UN.UniversityName,CM.CourseID,CM.CourseCode,CM.CourseName'); $this->db->from(ENROLMENTRECEIVEDFROMUNIV.' as ENU'); @@ -696,6 +697,106 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model { } return $universityResult; } + /* + * get exist student enrolment details + * creted by kms + * */ + public function getExistStudentEnrolmentDetails($enrolment=null,$localData=null){ + $keyArray = array(0 => 'SEM1', 1 => 'SEM2', 2 => 'SEM3', 3 => 'SEM4',4 => 'SEM5',5 => 'SEM6',6 => 'SEM7',7 => 'SEM8',8 => 'YEAR1',9 => 'YEAR2',10 => 'YEAR3',11 => 'YEAR4',12 => "DMC CHANGE SEM1",13 => "DMC CHANGE SEM2",14 => "DMC CHANGE SEM3",15 => "DMC CHANGE SEM4",16 => "DMC CHANGE SEM5",17 => "DMC CHANGE SEM6",18 => "DMC CHANGE SEM7",19 => "DMC CHANGE SEM8",20 => "DMC CHANGE YEAR1",21 => "DMC CHANGE YEAR2",22 => "DMC CHANGE YEAR3",23 => "DMC CHANGE YEAR4"); + $valueArray = array("1","2","3","4","5","6","7","8","1","2","3","4","1","2","3","4","5","6","7","8","1","2","3","4"); + $this->db->distinct('ENU.FormID'); + $this->db->select('STC.EnrollmentID,ST.*,UN.UniversityID, UN.UniversityName,CM.CourseID,CM.CourseCode,CM.CourseName,CF.ID,CF.Sem_Year,CF.ProgramType,SM.SessionName,RE.RegistrationType'); + $this->db->from(STUDENTCOURSE.' as STC'); + $this->db->join(COURSE.' as CM', 'CM.CourseID = STC.CourseID'); + $this->db->join(COURSE_FEES.' as CF', 'CF.CourseID = CM.CourseID'); + $this->db->join(STUDENTS.' as ST', 'ST.StudentID = STC.StudentID'); + $this->db->join(STUDENTS_FEES_STATUS.' as SFS', 'SFS.StudentID = STC.StudentID AND SFS.CourseID=STC.CourseID AND SFS.FeesType=CF.ID'); + $this->db->join(SESSIONMASTER.' as SM', 'SM.SessionID = SFS.SessionName'); + $this->db->join(REGISTRATIONDETAILS.' as RE', 'RE.Student_Fee_Status_Id = SFS.FeesID','left'); + $this->db->join(UNIVERSITY.' as UN', 'UN.UniversityID = STC.UniversityID'); + $this->db->where('STC.EnrollmentID', $enrolment); + $details = $this->db->get(); + $arrayResultStudent=array(); + if($details->result()){ + $getVAll=$details->result(); + + // $arrayResult['StudentID']=$getVAll[0]->StudentID; + $arrayResult['StudentName']=$getVAll[0]->Firstname.' '.$getVAll[0]->Lastname; + $arrayResult['MobileNumber']=$getVAll[0]->MobileNumber; + $arrayResult['FatherName']=$getVAll[0]->Fathername; + $arrayResult['MotherName']=$getVAll[0]->MotherName; + $arrayResult['EmailID']=$getVAll[0]->EmailID; + $arrayResult['AlternateNumber']=$getVAll[0]->AlternateNumber; + $arrayResult['Gender']=$getVAll[0]->Gender; + $arrayResult['DOB']=$getVAll[0]->DOB; + $arrayResult['AadharNumber']=$getVAll[0]->AadharNumber; + $arrayResult['BranchCode']=$getVAll[0]->BranchCode; + $arrayResult['UniversityCode']=$getVAll[0]->UniversityID; + $arrayResult['UniversityName']=$getVAll[0]->UniversityName; + $arrayResult['CourseCode']=$getVAll[0]->CourseCode; + $arrayResult['CourseName']=$getVAll[0]->CourseName; + $arrayResult['EnrolmentNo']=$getVAll[0]->EnrollmentID; + $arrayResultStudent['StudentInfo']=$arrayResult; + if($getVAll[0]->ProgramType==SEMYEARFEES){ + $arrayResultStudent['status']=true; + $arraySem=array(); + foreach ($getVAll as $row){ + + $serachKey = array_search(strtoupper($row->Sem_Year), $keyArray); + $sem=$valueArray[$serachKey]; + $this->db->select('FormID'); + $this->db->from(ENROLMENTRECEIVEDFROMUNIV.' as ENU'); + $this->db->where('ENU.EnrolmentNo',$enrolment); + $this->db->where('ENU.SemesterYear',$sem); + $notExistDetails=$this->db->get(); + if(!$notExistDetails->result()){ + $getSemType['sem']=$sem; + $getSemType['SessionName']=$row->SessionName; + $getSemType['FormType']=$row->RegistrationType; + $arraySem[]=$getSemType; + } + + } + $arrayResultStudent['semDetails']=$arraySem; + } + else{ + $arrayResultStudent['status']=false; + $arrayResultStudent['message']="This is regular or lateral course so we can't do manual entry."; + } + + + } + else{ + $arrayResultStudent['message']="This enrolment either don't register in student course or set fees.please check to update details."; + $arrayResultStudent['status']=false; + } + return $arrayResultStudent; + } + /* + * add manual enrolment details + * cretaed by kms + * */ + public function addManualEnrolmentDetails($studentInfo=null){ + $this->db->select('ENU.FormID'); + $this->db->from(ENROLMENTRECEIVEDFROMUNIV.' as ENU'); + $this->db->where('ENU.FormID', $studentInfo['FormID']); + $details = $this->db->get(); + if($details->num_rows()==0){ + $this->db->insert(ENROLMENTRECEIVEDFROMUNIV, $studentInfo); + if ($this->db->affected_rows() > 0) { + $resultArray['status']=true; + $resultArray['message']="Inserted successfully"; + } else { + $resultArray['status']=false; + $resultArray['message']="Inserted failed"; + } + } + else { + $resultArray['status']=false; + $resultArray['message']="This form id is already exist."; + } + return $resultArray; + } public function getForFormIdDraftDetails(){ $selectQuery = "SELECT * FROM T_FormId_FeeDetails_Received_From_University WHERE DraftStatus = 1"; diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json index f543d7f5..18ddf828 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", @@ -153,6 +154,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: '