diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index ecfecf93..bd74cc86 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -211,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'; + + +/* + @@ -349,4 +358,9 @@ $route['getApplicationFormStatusList'] = 'StatusUpdation_Controller/getApplicati $route['receiveEnrolmentFromUniv'] = 'Receive_Enrolment_Fees_Univ_Controller/receiveEnrolmentFromUniv'; $route['insertFormIdUnivFeeDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/insertFormIdUnivFeeDetails'; $route['getStudentUnivFeeCompareDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getStudentUnivFeeCompareDetails'; -$route['formIDFeeCompareDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/formIDFeeCompareDetails'; \ No newline at end of file +$route['formIDFeeCompareDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/formIDFeeCompareDetails'; +$route['getUnmatchedRecordDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getUnmatchedRecordDetails'; +$route['getUniversitySessionDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getUniversitySessionDetails'; +$route['getUnivCourseFromFileDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getUnivCourseFromFileDetails'; +$route['getExistStudentEnrolmentDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getExistStudentEnrolmentDetails'; +$route['addManualEnrolmentDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/addManualEnrolmentDetails'; 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/Receive_Enrolment_Fees_Univ_Controller.php b/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php index 08bbe12e..7148fd98 100644 --- a/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php +++ b/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php @@ -33,6 +33,11 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller { // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php $this->methods['receiveEnrolmentFromUniv_post']['limit'] = 500; // 500 requests per hour per user/key $this->methods['formIDFeeCompareDetails_post']['limit'] = 500; + $this->methods['getUniversitySessionDetails_post']['limit'] = 500; + $this->methods['getExistStudentEnrolmentDetails_post']['limit'] = 1000; + + $this->methods['addManualEnrolmentDetails_post']['limit'] = 1000; + // load the model $this->load->model('Receive_Enrolment_Fees_Univ_model', 'receive_model'); @@ -103,9 +108,9 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller { $searchData = $this->post('search'); $univID = $searchData['University']; - $courseID = $searchData['Course']; + $sessionID = $searchData['Session']; - $getUnivStudentFeeCompare = $this->receive_model->getStudentUnivFeeCompareDetails($univID,$courseID);// Check if the users data store contains users (in case the database result returns NULL) + $getUnivStudentFeeCompare = $this->receive_model->getStudentUnivFeeCompareDetails($univID,$sessionID);// Check if the users data store contains users (in case the database result returns NULL) if ($getUnivStudentFeeCompare) { $getUnivStudentFeeCompare['status'] = REST_Controller::HTTP_OK; @@ -127,7 +132,7 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller { * created by kms * */ public function formIDFeeCompareDetails_post(){ - $formData['FormID'] = $this->post('formId');; + $formData['FormID'] = $this->post('formId'); $formData['EnrolmentNo'] = $this->post('enrolmentId');; $getDetails = $this->receive_model->getFormIDFeeDetails($formData); @@ -151,4 +156,123 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller { } } + public function getUnmatchedRecordDetails_post(){ + + $getDetailsFor = $this->post('getDetailsFor'); + $getUnmatchedFormDetails = $this->receive_model->getUnmatchedFormDetails($getDetailsFor);// Check if the users data store contains users (in case the database result returns NULL) + if ($getUnmatchedFormDetails) + { + $getUnmatchedFormDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getUnmatchedFormDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'Something went wrong.please try again!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + } + public function getUniversitySessionDetails_post(){ + $reqData = $this->post('data'); + $loginUserId = $reqData['localUserID']; + $loginUserBranchId = $reqData['localBranchID']; + $loginUserType = $reqData['localType']; + $getUniversityListDetails = $this->receive_model->getUniversitySessionList($loginUserBranchId); // Check if the employee exist + if ($getUniversityListDetails['status']) { + // $getUniversityListDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getUniversityListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + + } + else if($getUniversityListDetails['status']==false){ + $this->response(['message' => 'No list were found', 'status' => false], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + + } + else { + // Set the response and exit + $this->response(['message' => 'No list were found', 'status' => false], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + + } + + + } + /* + * get exist enrolment student details + * created by kms + * */ + public function getExistStudentEnrolmentDetails_post(){ + $localData = $this->post('localDetails'); + $enrolmentID=$this->post('enrolmentID'); + $getEnrolmentDetails=$this->receive_model->getExistStudentEnrolmentDetails($enrolmentID,$localData); + if($getEnrolmentDetails['status']==true){ + $this->response($getEnrolmentDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + + } + else if($getEnrolmentDetails['status']==false){ + $this->response($getEnrolmentDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + + + } + else{ + $this->response(['message' => 'No list were found', 'status' => false], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + + } + } + /* + * add manual enrolment details + * cretaed by kms + * */ + public function addManualEnrolmentDetails_post(){ + $now = new DateTime(); + $now->setTimezone(new DateTimezone('Asia/Kolkata')); + $localData = $this->post('localDetails'); + $studentInfo=$this->post('studentInfo'); + $semDetails=$this->post('sem'); + $studentInfo['CreatedOn'] = $now->format('Y-m-d H:i:s'); + $studentInfo['FormID'] = $this->post('formID'); + $studentInfo['SemesterYear'] = $semDetails['sem']; + $studentInfo['FormType'] = $semDetails['FormType']; + $studentInfo['SessionName'] = $semDetails['SessionName']; + $studentInfo['EnrolmentNo'] = $this->post('enrolmentID'); + $studentInfo['CreatedBy'] = $localData['localUserID']; + $studentInfo['BranchCode'] = $localData['localBranchID']; + $studentInfo['ManualEntry'] = 1; + $addEnrolmentDetails=$this->receive_model->addManualEnrolmentDetails($studentInfo); + if($addEnrolmentDetails['status']==true){ + $this->response($addEnrolmentDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + + } + else if($addEnrolmentDetails['status']==false){ + $this->response($addEnrolmentDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + + + } + else{ + $this->response(['message' => 'No list were found', 'status' => false], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + + } + } + + + + public function getUnivCourseFromFileDetails_post(){ + // $reqData = $this->post('data'); + // $reqBranch = $this->post('reqBranch'); + $getUnivCourseFromFileDetails = $this->receive_model->getUnivCourseFromFileDetails(); // Check if the employee exist + if ($getUnivCourseFromFileDetails) { + $getUnivCourseFromFileDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getUnivCourseFromFileDetails, 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/controllers/StatusUpdation_Controller.php b/Apollo/api/application/controllers/StatusUpdation_Controller.php index 056244b7..bc18a9f6 100755 --- a/Apollo/api/application/controllers/StatusUpdation_Controller.php +++ b/Apollo/api/application/controllers/StatusUpdation_Controller.php @@ -280,4 +280,5 @@ class StatusUpdation_Controller extends REST_Controller { } + } \ No newline at end of file diff --git a/Apollo/api/application/models/Calltracking_model.php b/Apollo/api/application/models/Calltracking_model.php index 2220ddbe..f71ad381 100755 --- a/Apollo/api/application/models/Calltracking_model.php +++ b/Apollo/api/application/models/Calltracking_model.php @@ -1386,6 +1386,14 @@ class Calltracking_model extends CI_Model { $result['message'] = "Something went wrong.please try again"; } }else{ + + + if($track_Details['StatusCode'] == 'S020' || $track_Details['StatusCode'] == 'S002'){ + $lead_Details['UpdatedOn'] = date('Y-m-d H:i:s'); + $lead_Details['UpdatedBy'] = $CreatedBy; + $track_Details['UpdatedOn'] = date('Y-m-d H:i:s'); + $track_Details['UpdatedBy'] = $CreatedBy; + } $lead_Details['CreatedOn'] = date('Y-m-d H:i:s'); $followup_Details['CreatedOn'] = date('Y-m-d H:i:s'); $track_Details['CreatedOn'] = date('Y-m-d H:i:s'); 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/api/application/models/Receive_Enrolment_Fees_Univ_model.php b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php index c8bc52b6..8229efef 100644 --- a/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php +++ b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php @@ -15,6 +15,36 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model { * created by kms * */ + public function getUnivCourseFromFileDetails(){ + $selectQuery = "SELECT UniversityCode, UniversityName FROM T_Enrolment_Received_From_University GROUP BY UniversityCode"; + $queryDetails = $this->db->query($selectQuery); + + if($queryDetails->result()){ + foreach ($queryDetails->result() as $formIdDetails){ + + $result['univCode'] = $formIdDetails->UniversityCode; + $result['univName'] = $formIdDetails->UniversityName; + + $selectCourseQuery = "SELECT CourseCode, CourseName FROM T_Enrolment_Received_From_University WHERE UniversityCode = '$formIdDetails->UniversityCode' GROUP BY CourseCode"; + $queryCourseDetails = $this->db->query($selectCourseQuery); + $result['univCourseDetails'] = $queryCourseDetails->result(); + + $selectSessionQuery = "SELECT SessionName FROM T_Enrolment_Received_From_University WHERE UniversityCode = '$formIdDetails->UniversityCode' GROUP BY CourseCode"; + $querySessionDetails = $this->db->query($selectSessionQuery); + $result['univSessionDetails'] = $querySessionDetails->result(); + + } + $finalArray['status'] = true; + $finalArray['message'] = "Success."; + $finalArray['details'] = $result; + } else { + $finalArray['status'] = false; + $finalArray['message'] = "No record found."; + $finalArray['details'] = []; + } + return $finalArray; + + } @@ -27,6 +57,7 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model { $get_data=array(); // loop for fetch details foreach ($enrolment as $k => $checkRow){ + // check enrolment no and form id in upload list if(array_key_exists("Enrollment_No",$checkRow) AND array_key_exists("Form Id",$checkRow)){ // start @@ -277,219 +308,271 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model { } } - // check form id exit in table for insert / update - $formIDData = $this->db->select('FormID')->order_by('SubmitID','ASC')->get(ENROLMENTRECEIVEDFROMUNIV)->result_array(); + if(sizeof($get_data)>0) { + // check form id exit in table for insert / update + $formIDData = $this->db->select('FormID')->order_by('SubmitID', 'ASC')->get(ENROLMENTRECEIVEDFROMUNIV)->result_array(); - $form_ids=array(); - $insertForms=array(); - $updateForms=array(); - foreach($formIDData as $fkey => $fvalue): - $matchedKey=array_search($fvalue['FormID'], array_column($get_data, 'FormID')); - if(count($matchedKey)>0){ - $updateForms[count($updateForms)]=$get_data[$matchedKey]; - // $form_ids[]=$fvalue['FormID']; - array_splice($get_data,$matchedKey,1); + $form_ids = array(); + $insertForms = array(); + $updateForms = array(); + foreach ($formIDData as $fkey => $fvalue): + if(sizeof($get_data)>0){ + + $matchedKey = array_search($fvalue['FormID'], array_column($get_data, 'FormID')); + if ($matchedKey!='') { + // $updateForms[count($updateForms)] = $get_data[$matchedKey]; + // $form_ids[]=$fvalue['FormID']; + array_splice($get_data, 0, 1); + + } + } + + endforeach; + if (sizeof($get_data) > 0) { + $this->db->insert_batch(ENROLMENTRECEIVEDFROMUNIV, $get_data); + if ($this->db->affected_rows() > 0) { + $finalArray['status'] = true; + $finalArray['message'] = "Inserted successfully"; + $finalArray['insertedRows'] = $this->db->affected_rows(); + $finalArray['details'] = $errorArray; + return $finalArray; + } else { + $finalArray['status'] = false; + $finalArray['message'] = "Insert failed please check data."; + $finalArray['insertedRows'] = $this->db->affected_rows(); + $finalArray['details'] = $errorArray; + return $finalArray; + } + + } else { + $finalArray['status'] = false; + $finalArray['message'] = "Updated Successfully.";; + $finalArray['details'] = $errorArray; } - endforeach; - - if(count($get_data)>0){ - $this->db->insert_batch(ENROLMENTRECEIVEDFROMUNIV, $get_data); + /* if(count($updateForms)>0){ + //$this->db->where_in('FormID',$form_ids); + $this->db->update_batch(ENROLMENTRECEIVEDFROMUNIV, $updateForms,'FormID'); + }*/ } - /* if(count($updateForms)>0){ - //$this->db->where_in('FormID',$form_ids); - $this->db->update_batch(ENROLMENTRECEIVEDFROMUNIV, $updateForms,'FormID'); - }*/ - $finalArray['status']=true; - $finalArray['details']=$errorArray; + else{ + $finalArray['status'] = false; + $finalArray['message'] = "Insert failed please check data."; + $finalArray['insertedRows'] = $this->db->affected_rows(); + $finalArray['details'] = $errorArray; + return $finalArray; + } + return $finalArray; } public function formIdFeeDetails($formFeeDetails=null,$local=null){ -// print_r($formFeeDetails);exit(); - // $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'] ? $formIdDetails['Form Type'] : ''; - $CentreCode = $formIdDetails['CentreCode'] ?: ''; - $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'] ?: ''; + $localBranchID = $local['localBranchID']; + $localUserID = $local['localUserID']; + $time = date('Y-m-d H:i:s'); + $CreatedOn = $time; - - $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{ - -// } -// } + foreach ($formFeeDetails as $formIdDetails){ + if(array_key_exists('FormId',$formIdDetails) && $formIdDetails['FormId'] != '' && $formIdDetails['FormId'] != null + && array_key_exists('Form Type',$formIdDetails) && array_key_exists('CentreCode',$formIdDetails) && array_key_exists('Course_Code',$formIdDetails) + && array_key_exists('Actual_Course_Fee',$formIdDetails) && array_key_exists('Course_Fee',$formIdDetails) && array_key_exists('Exam_Fee',$formIdDetails) + && array_key_exists('Enrollment_Fee',$formIdDetails) && array_key_exists('Prospectus_Fee',$formIdDetails) && array_key_exists('Additional_Fee',$formIdDetails) + && array_key_exists('Amount',$formIdDetails) && array_key_exists('Session',$formIdDetails) && array_key_exists('Year',$formIdDetails) + && array_key_exists('Semester',$formIdDetails) && array_key_exists('Student_Name',$formIdDetails) && array_key_exists('Father_Name',$formIdDetails) ){ + + //select query for the check the fields are entered + //echo $formIdDetails['FormId']; echo '===='; + + $formIds = $formIdDetails['FormId']; + $formType = $formIdDetails['Form Type'] ? $formIdDetails['Form Type'] : ''; + $CentreCode = $formIdDetails['CentreCode'] ?: ''; + $Session = $formIdDetails['Session'] ?: ''; + $Year = $formIdDetails['Year'] ?: ''; + $Semester = $formIdDetails['Semester'] ?: ''; + $Student_Name = $formIdDetails['Student_Name'] ?: ''; + $Father_Name = $formIdDetails['Father_Name'] ?: ''; + $CourseCode = $formIdDetails['Course_Code'] ?: ''; + $ActualCourseFee = $formIdDetails['Actual_Course_Fee'] ?: '0'; + $CourseFee = $formIdDetails['Course_Fee'] ?: '0'; + $ExamFee = $formIdDetails['Exam_Fee'] ?: '0'; + $EnrollmentFee = $formIdDetails['Enrollment_Fee'] ?: '0'; + $ProspectusFee = $formIdDetails['Prospectus_Fee'] ?: '0'; + $ReRegFee = $formIdDetails['Re_Reg_Fee'] ?: '0'; + $CreditTransferFee = $formIdDetails['Credit_Transfer_Fee'] ?: '0'; + $LateralEntryFee = $formIdDetails['Lateral_Entry_Fee'] ?: '0'; + $DualSpclFee = $formIdDetails['Dual_Spcl_Fee'] ?: '0'; + $OtherFee = $formIdDetails['Other_Fee'] ?: '0'; + $NRIFEE = $formIdDetails['NRI_FEE'] ?: '0'; + $ProvisionalFee = $formIdDetails['Provisional_Fee'] ?: '0'; + $MigrationFee = $formIdDetails['Migration_Fee'] ?: '0'; + $UrgentResultDMCFee = $formIdDetails['Urgent_Result_DMC_Fee'] ?: '0'; + $AdditionalFee = $formIdDetails['Additional_Fee'] ?: '0'; + $Amount = $formIdDetails['Amount'] ?: '0'; + + $selectQuery = "SELECT * FROM T_FormId_FeeDetails_Received_From_University WHERE + FormID = '$formIds' AND + FormType = '$formType' AND + CentreCode = '$CentreCode' AND + Session = '$Session' AND + Year = '$Year' AND + Semester = '$Semester' AND + Student_Name = '$Student_Name' AND + Father_Name = '$Father_Name' AND + CourseCode = '$CourseCode' AND + ActualCourseFee = '$ActualCourseFee' AND + CourseFee = '$CourseFee' AND + ExamFee = '$ExamFee' AND + EnrollmentFee = '$EnrollmentFee' AND + ProspectusFee = '$ProspectusFee' AND + ReRegFee = '$ReRegFee' AND + CreditTransferFee = '$CreditTransferFee' AND + LateralEntryFee = '$LateralEntryFee' AND + DualSpclFee = '$DualSpclFee' AND + OtherFee = '$OtherFee' AND + NRIFEE = '$NRIFEE' AND + ProvisionalFee = '$ProvisionalFee' AND + MigrationFee = '$MigrationFee' AND + UrgentResultDMCFee = '$UrgentResultDMCFee' AND + AdditionalFee = '$AdditionalFee' AND + Amount = '$Amount'"; + $queryDetails = $this->db->query($selectQuery); + // echo count($queryDetails->result());exit(); + + if(count($queryDetails->result()) == 0){ + $query = "INSERT INTO T_FormId_FeeDetails_Received_From_University + (FormID, FormType, CentreCode,Session,Year,Semester,Student_Name,Father_Name,CourseCode, ActualCourseFee, CourseFee, ExamFee, EnrollmentFee, ProspectusFee, ReRegFee, CreditTransferFee, LateralEntryFee, DualSpclFee, OtherFee, NRIFEE, ProvisionalFee, MigrationFee, UrgentResultDMCFee, AdditionalFee, Amount, CreatedBy, CreatedOn, BranchCode) + VALUES + ( '$formIds', '$formType', '$CentreCode','$Session','$Year','$Semester','$Student_Name','$Father_Name', '$CourseCode', '$ActualCourseFee', '$CourseFee', '$ExamFee', '$EnrollmentFee', '$ProspectusFee', '$ReRegFee', '$CreditTransferFee', '$LateralEntryFee', '$DualSpclFee', '$OtherFee', '$NRIFEE', '$ProvisionalFee', '$MigrationFee', '$UrgentResultDMCFee', '$AdditionalFee', '$Amount', '$localUserID', '$CreatedOn', '$localBranchID' )"; + $queryDetails = $this->db->query($query); + } else { + echo 'else con'; + } + // -- 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'"; + } + continue; + } $results['stuFeeList'] = true; $results['stuFeeList_details'] = "details updated successfully."; 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'); + $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'); + // $this->db->join(FORMFEESRECEIVEDFROMUNIV.' as t2', 't2.FormID = t1.FormID','left'); + //$this->db->where('t1.CourseCode', $courseCode); + $this->db->where('ENU.UniversityCode', $univCode); + + $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,$session); + 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; + } + /* if(sizeof($getStudentPaidDetails)!=0){ + $formResult['StudentPaidAmount']=$getStudentPaidDetails['StudentPaidAmount']; + } + else{ + $formResult['StudentPaidAmount']=''; + }*/ - public function getStudentUnivFeeCompareDetails($univCode=null,$courseCode=null){ - // echo $univID, $courseID;exit(); - $this->db->select('t1.FormID, t1.FormType, t2.SemesterYear, t2.EnrolmentNo,t2.CourseName,t2.RollNo, t4.*,t5.UniversityID, t5.UniversityName'); - $this->db->from('T_FormId_FeeDetails_Received_From_University as t1'); - $this->db->join('T_Enrolment_Received_From_University as t2', 't2.FormID = t1.FormID'); - $this->db->join('T_Student_CourseDetails as t3', 't3.EnrollmentID = t2.EnrolmentNo'); - $this->db->join('T_StudentDetails as t4', 't4.StudentID = t3.StudentID'); - $this->db->join('T_UniversityMaster as t5', 't5.UniversityID = t3.UniversityID'); - $this->db->where('t2.CourseCode', $courseCode); - $this->db->where('t2.UniversityCode', $univCode); - $details = $this->db->get(); - $detailsList = $details->result(); - if($detailsList){ - $resultArr['studentFeeCompareDetails'] = $detailsList; - $resultArr['formTypeStatus'] = true; - $resultArr['message'] = "Successfully data generated"; - } else { - $resultArr['studentFeeCompareDetails'] = []; - $resultArr['formTypeStatus'] = false; - $resultArr['message'] = "No record found"; } + $resultArr['studentFeeCompareDetails'] = $mergeFormDetails; + $resultArr['formTypeStatus'] = true; + $resultArr['message'] = "Successfully data generated"; + } else { + $resultArr['studentFeeCompareDetails'] = []; + $resultArr['formTypeStatus'] = false; + $resultArr['message'] = "No record found"; + } return $resultArr; } - /* - * form id bases get fees compare details - * created by kms - * */ - public function getFormIDFeeDetails($serachForm=null){ + /*form id bases get student paid details for getStudentUnivFeeCompareDetails methods*/ + public function getStudentsetFeesDetails($studentID=null,$courseID=null,$sem=null,$session=null){ // create array for find sem value $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"); - if($serachForm['FormID']!=''){ - $this->db->select("ENU.FormID,ENU.SemesterYear,STC.StudentID,STC.BranchID,CF.ID,CF.ProgramType,CF.Sem_Year,FFRU.Amount as UniversityPaidAmount"); - $this->db->from(ENROLMENTRECEIVEDFROMUNIV.' as ENU'); - $this->db->join(STUDENTCOURSE.' as STC', 'STC.EnrollmentID = ENU.EnrolmentNo'); - $this->db->join(COURSE_FEES.' as CF', 'CF.CourseID = STC.CourseID'); - $this->db->join(FORMFEESRECEIVEDFROMUNIV.' as FFRU', 'FFRU.FormID = ENU.FormID'); - $this->db->where('ENU.FormID',$serachForm['FormID']); - $this->db->where('ENU.EnrolmentNo',$serachForm['EnrolmentNo']); - $studentCourseDetails = $this->db->get(); - - //this is for sem year type check fees - if($studentCourseDetails->num_rows()>1){ - foreach ($studentCourseDetails->result() as $fetchRow){ - $serachKey= array_search(strtoupper($fetchRow->Sem_Year),$keyArray); - if($valueArray[$serachKey]==$fetchRow->SemesterYear){ - $this->db->select("SUM(BillAMount) as StudentPaidAmount"); - $this->db->from(STUDENTS_FEES_STATUS.' as SFS'); - $this->db->join(STUDENTS_FEES_PAID.' as SFP', 'SFP.FeesId = SFS.FeesID'); - $this->db->where('SFS.FeesType',$fetchRow->ID); - $this->db->where('SFP.IsActive','1'); + $feesArray=array(); + $this->db->select("CF.ID,CF.ProgramType,CF.Sem_Year"); + $this->db->from(COURSE_FEES . ' as CF'); + $this->db->where('CF.CourseID', $courseID); + $courseFeesDetails = $this->db->get(); + //this is for sem year type check fees + if ($courseFeesDetails->num_rows() > 1) { + foreach ($courseFeesDetails->result() as $fetchRow) { + $serachKey = array_search(strtoupper($fetchRow->Sem_Year), $keyArray); + if ($valueArray[$serachKey] == $sem) { + $this->db->select("SM.SessionName,SM.SessionID"); + $this->db->from(STUDENTS_FEES_STATUS . ' as SFS'); + $this->db->join(SESSIONMASTER . ' as SM' , 'SM.SessionID = SFS.SessionName'); + $this->db->where('SFS.FeesType', $fetchRow->ID); + $this->db->where('SFS.StudentID', $studentID); + $this->db->where('SFS.SessionName', $session); $feesDetails = $this->db->get()->last_row(); - if($feesDetails){ - $feesArray['status']=true; - $feesArray['Message']="Fees paid both student and university"; - $feesArray['Type']=$fetchRow->Sem_Year; - $feesArray['UniversityPaidAmount']=$fetchRow->UniversityPaidAmount; - $feesArray['StudentPaidAmount']=$feesDetails->StudentPaidAmount; + if ($feesDetails) { + $feesArray['status'] = true; + $feesArray['SessionName'] = $feesDetails->SessionName; + $feesArray['SessionID'] = $feesDetails->SessionID; break; - } - else{ - $feesArray['status']=true; - $feesArray['Message']="University fees paid and student fees pending"; - $feesArray['Type']=$fetchRow->Sem_Year; - $feesArray['UniversityPaidAmount']=$fetchRow->UniversityPaidAmount; - $feesArray['StudentPaidAmount']=0; + } else { + $feesArray['status'] = false; break; } } @@ -497,43 +580,222 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model { } } - else if($studentCourseDetails->num_rows()==1){ - foreach ($studentCourseDetails->result() as $fetchRow){ - $this->db->select("SUM(BillAMount) as StudentPaidAmount"); - $this->db->from(STUDENTS_FEES_STATUS.' as SFS'); - $this->db->join(STUDENTS_FEES_PAID.' as SFP', 'SFP.FeesId = SFS.FeesID'); - $this->db->where('SFS.FeesType',$fetchRow->ID); - $this->db->where('SFP.IsActive','1'); - $feesDetails = $this->db->get()->last_row(); - if($feesDetails){ - $feesArray['status']=true; - $feesArray['Message']="Fees paid both student and university"; - $feesArray['Type']=$fetchRow->Sem_Year; - $feesArray['UniversityPaidAmount']=$fetchRow->UniversityPaidAmount; - $feesArray['StudentPaidAmount']=$feesDetails->StudentPaidAmount; - break; - } - else{ - $feesArray['status']=true; - $feesArray['Message']="University fees paid and student fees pending"; - $feesArray['Type']=$fetchRow->Sem_Year; - $feesArray['UniversityPaidAmount']=$fetchRow->UniversityPaidAmount; - $feesArray['StudentPaidAmount']=0; - } + else if($courseFeesDetails->num_rows()==1){ + foreach ($courseFeesDetails->result() as $fetchRow){ + $this->db->select("SM.SessionName,SM.SessionID"); + $this->db->from(STUDENTS_FEES_STATUS.' as SFS'); + $this->db->join(SESSIONMASTER . ' as SM' , 'SM.SessionID = SFS.SessionName'); + $this->db->where('SFS.FeesType',$fetchRow->ID); + $this->db->where('SFS.StudentID',$studentID); + $this->db->where('SFS.SessionName', $session); + $feesDetails = $this->db->get()->last_row(); + if ($feesDetails) { + $feesArray['status'] = true; - } - } - else{ - $feesArray['status']=false; - $feesArray['Message']="Student record is mismatch because of enrolment number is not registered in student course details"; - - } + $feesArray['SessionName'] = $feesDetails->SessionName; + $feesArray['SessionID'] = $feesDetails->SessionID; + break; + } else { + $feesArray['status'] = false; + break; } - else{ - $feesArray['status']=false; - $feesArray['Message']="Please check form id"; - } - return $feesArray; + } + } + else{ + $feesArray['status'] = false; + } + return $feesArray; } + /** + * Unmached file details + */ + + public function getUnmatchedFormDetails($reqType){ + // $this->db->select('t1.*'); + // $this->db->from('T_Enrolment_Received_From_University as t1'); + // $this->db->join('T_Student_CourseDetails as t2', 't2.EnrollmentID = t1.EnrolmentNo'); + + if($reqType == 'EnrolmentIDFile'){ + $query = "select * + from T_Enrolment_Received_From_University as t1 + where t1.EnrolmentNo NOT IN (select EnrollmentID from T_Student_CourseDetails)"; + $details = $this->db->query($query); + $detailsList = $details->result(); + + if($detailsList){ + $resultArr['unMatchedRecordDetails'] = $detailsList; + $resultArr['unMatchedRecordStatus'] = true; + $resultArr['unMatchedRecordFor'] = 'EnrolmentIDFile'; + $resultArr['message'] = "Successfully data generated"; + } else { + $resultArr['unMatchedRecordDetails'] = []; + $resultArr['unMatchedRecordStatus'] = false; + $resultArr['unMatchedRecordFor'] = 'EnrolmentIDFile'; + $resultArr['message'] = "No record found"; + } + }else if($reqType == 'FormIDFile'){ + $query = "select * + from T_FormId_FeeDetails_Received_From_University as t1 + where t1.FormID NOT IN (select FormID from T_Enrolment_Received_From_University)"; + $details = $this->db->query($query); + $detailsList = $details->result(); + + if($detailsList){ + $resultArr['unMatchedRecordDetails'] = $detailsList; + $resultArr['unMatchedRecordStatus'] = true; + $resultArr['unMatchedRecordFor'] = 'FormIDFile'; + $resultArr['message'] = "Successfully data generated"; + } else { + $resultArr['unMatchedRecordDetails'] = []; + $resultArr['unMatchedRecordStatus'] = false; + $resultArr['unMatchedRecordFor'] = 'FormIDFile'; + $resultArr['message'] = "No record found"; + } + } + + + return $resultArr; + } + /* + * get university session details for filter + * created by kms + * */ + public function getUniversitySessionList($branchID=null){ + $this->db->select('UniversityID,UniversityName'); + $this->db->order_by('UniversityID','DESC'); + $this->db->where('IsActive','1'); + // $this->db->where('BranchCode',$branchID); + $universityDetails = $this->db->get(UNIVERSITY); + $universityResult=array(); + if($universityDetails->result()){ + $universityResult['status']=true; + foreach ($universityDetails->result() as $row){ + $this->db->select('SM.SessionID,SM.SessionName'); + $this->db->order_by('SM.SessionID','DESC'); + $this->db->where('SM.IsActive','1'); + // $this->db->where('SM.BranchCode',$branchID); + $this->db->where('SD.UniversityID',$row->UniversityID); + $this->db->from(SESSIONMASTER.' as SM'); + $this->db->join(SESSIONDETAILS.' as SD', 'SD.SessionID = SM.SessionID'); + $sessionDetails = $this->db->get(); + $fetchArray['UniversityID']=$row->UniversityID; + $fetchArray['UniversityName']=$row->UniversityName; + if($sessionDetails->result()){ + $fetchArray['SessionDetails']=$sessionDetails->result(); + } + else{ + $fetchArray['SessionDetails']=""; + } + $getResult[]=$fetchArray; + } + $universityResult['details']=$getResult; + } + else{ + $universityResult['status']=false; + $universityResult['details']=""; + } + 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; + } + } \ No newline at end of file diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index 1f2facc4..872cea01 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -177,7 +177,14 @@ from left join T_CertificationMaster cm on cm.CertificationID=app.CertificationType left join T_PickListDetails p on p.ListCode = app.ListCode left join BalFees bal on bal.student=app.StudentID and bal.course=app.CourseID - where CertificateName not like 'APPLICATION%' and app.ID IN (SELECT max(ID) FROM T_ApplicationStatus group by StudentID,CourseID,ListCode,BranchCode,CertificationType) + where CertificateName not like 'APPLICATION%' and app.ID IN (SELECT max(ID) FROM T_ApplicationStatus group by StudentID,CourseID,BranchCode,CertificationType) + group by app.ID +union +SELECT app.ID,app.StudentID as sid,app.CourseID as cid,app.BranchCode as branch,app.ListCode as lcode,p.ListName as status,AppDate as adate,app.Comments as acmts,CertificationType as ctype,app.CertificationType as certname,sum(bal.balpayable) as balance + FROM T_ApplicationStatus as app + left join T_PickListDetails p on p.ListCode = app.ListCode + left join BalFees bal on bal.student=app.StudentID and bal.course=app.CourseID + where app.CertificationType not like 'CERT%' and app.ID IN (SELECT max(ID) FROM T_ApplicationStatus group by StudentID,CourseID,BranchCode,CertificationType) group by app.ID) as sms left join (SELECT FeesID as fid,BatchCode as batch,StudentID as sid,CourseID as cid,FeesType as ftype,sum(CourseFees) as cf,Sum(STFOrWR) as stf,sum(Others) as others @@ -244,9 +251,9 @@ left join } public function mark_cert_status($bat=null,$br=null,$u=null,$from=null,$to=null){ - $sql = "select sms.ID,sms.sid,sms.cid,sms.fid,sms.sem as Sem_year,sms.certname as Certificate_name,sms.ctype, + $sql = "select sms.ID,sms.sid,sms.cid,sms.fid,sms.sem as Sem_year,ifnull(sms.certname,'-') as Certificate_name,sms.ctype, sms.issuedate,sms.istatus, -ifnull(sms.rcvedate,'-') as rdate,sms.rstatus,sms.acmts,sms.balance as Balance_fee,std.name as Student_name,std.father as Father_name,std.phone as Phone_number,cm.course as Course_name,cm.uname as University,mdate,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber +ifnull(sms.rcvedate,'-') as rdate,ifnull(sms.rstatus,'-') as rstatus,sms.acmts,ifnull(sms.balance,0) as Balance_fee,std.name as Student_name,std.father as Father_name,std.phone as Phone_number,cm.course as Course_name,cm.uname as University,mdate,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber from (select c.ID,c.StudentID as sid,sfs.CourseID as cid,sfs.BranchCode as branch,sfs.FeesID as fid,Sem as sem,c.CertificationType as certname,c.CertificationType as ctype,CDate as mdate,balpayable as balance, max(if(ListName = 'ISSUED TO STUDENT', CDate,'-')) as issuedate,max(if(ListName = 'ISSUED TO STUDENT', ListName,'-')) as istatus, @@ -258,7 +265,7 @@ left join BalFees bal on bal.student=c.StudentID and bal.course=sfs.CourseID and where CDate is not null and (list.ListName like 'ISSUED TO STUDENT' or list.ListName like 'RECEIVED%' ) group by sid,cid,sem,ctype union -select a.ID,a.StudentID as sid,a.CourseID as cid,sfs.BranchCode as branch,sfs.FeesID as fid,'-' as sem,cm.CertificateName as certname,a.CertificationType as ctype,AppDate as mdate,bal.balpayable as balance, +select a.ID,a.StudentID as sid,a.CourseID as cid,sfs.BranchCode as branch,sfs.FeesID as fid,'-' as sem,ifnull(cm.CertificateName,a.CertificationType) as certname,a.CertificationType as ctype,AppDate as mdate,bal.balpayable as balance, max(if(ListName = 'ISSUED TO STUDENT', AppDate,'-')) as issuedate,max(if(ListName = 'ISSUED TO STUDENT', ListName,'-')) as istatus, max(if(ListName = 'RECEIVED', AppDate,'-')) as rcvedate,max(if(ListName = 'RECEIVED', ListName,'-')) as rstatus,a.Comments as acmts from T_ApplicationStatus a @@ -437,7 +444,8 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se } public function app_pending($bat=null,$br=null,$u=null){ - $sql = "SELECT * FROM (SELECT + $sql = "SELECT + APFS.ID as id, APFS.Registration_Details_ID AS regid, APFS.ListCode as StatusCode, APFS.AppFormDate as StatusUpdationOn, @@ -456,14 +464,18 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se CFD.Sem_Year as Sem_Year, RD.RegistrationType as FormType, STU.StudentID as Student_id -FROM T_ApplicationFormStatus AS APFS 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 +FROM T_ApplicationFormStatus AS APFS +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 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 (SELECT FeesId AS FeeID, min(CreatedOn), BillDate AS BILL FROM T_Students_Fees_PaidDetails GROUP BY FeesId) AS sfpd ON sfpd.FeeID = RD.Student_Fee_Status_Id -where COUR.UniversityID = '$u' and RD.BatchCode = '$bat'and STU_COUR.BranchID = '$br' and STU.IsActive = '1' -ORDER BY StatusUpdationOn DESC) x -GROUP BY x.regid"; +where STU.IsActive = '1' and APFS.ID in (select max(ID) from T_ApplicationFormStatus group by Registration_Details_ID) + + "; // SELECT * FROM (SELECT APFS.Registration_Details_ID AS regid, APFS.ListCode AS StatusCode, APFS.AppFormDate AS StatusUpdationOn, APFS.Comments AS StatusComments, PKL.ListName AS StatusName, concat(STU.Firstname,' ', STU.Lastname) AS StudentName, STU.Fathername AS FatherName, STU.MobileNumber AS Phone_number, COUR.CourseName AS CourseName, UNIV.UniversityName AS UniversityName, sfpd.BILL AS InitialPayDate, RD.Student_Fee_Status_Id AS FeesStatusID, STU_COUR.EnrollmentID AS EnrollmentNumber, CFD.Sem_Year AS Sem_Year, RD.RegistrationType AS FormType, STU.StudentID // FROM T_ApplicationFormStatus AS APFS LEFT JOIN T_Registration_Details AS RD ON RD.ID = APFS.Registration_Details_ID @@ -503,6 +515,20 @@ GROUP BY x.regid"; // LEFT JOIN (Select FeesId as FeeID, min(CreatedOn), BillDate as BILL FROM T_Students_Fees_PaidDetails group by FeesId) as sfpd on sfpd.FeeID = RD.Student_Fee_Status_Id // where COUR.UniversityID = '$u' and RD.BatchCode = '$bat'and STU_COUR.BranchID = '$br' and STU.IsActive = '1' // group by APFS.Registration_Details_ID"; + + if ($bat!= ''){ + + $sql.=" and RD.BatchCode = '".$bat."'"; + + } + if ($u!= ''){ + + $sql.=" and COUR.UniversityID = '".$u."'"; + + } + $sql.=" group by regid,Student_id "; + $sql.=" ORDER BY StatusUpdationOn DESC "; + $leadDet=$this->db->query($sql); $answer = $leadDet->result(); if (count($answer) > 0) { diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json index a4b605a6..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", @@ -106,6 +107,7 @@ "STUDENTDETAILS": "Manage", "STUDENTDETAILSADDEDIT": "Manage Details", "STUDENTFEEDETAILCOMPARE": "Student University Fee", + "STUDENTFROMIDFEEDETAILS": "Student FormId Fee Details", "status" : { "MAIN": "Update Status", "STUDYMATERIAL": "Study Material", @@ -152,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 0239a568..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 * */ @@ -238,7 +242,7 @@ app.constant('JS_REQUIRES', { */ 'student_university_fee_compareCtrl':'assets/js/controllers/student_university_fee_compare.js', - + 'studentUnivFormIdFeeDetailsCtrl': 'assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js', }, //*** angularJS Modules diff --git a/Apollo/assets/js/config.router.js b/Apollo/assets/js/config.router.js index 9d81c71c..76cbf9e4 100755 --- a/Apollo/assets/js/config.router.js +++ b/Apollo/assets/js/config.router.js @@ -315,6 +315,14 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com ncyBreadcrumb: { label: 'Student University Fee Compare' } + }).state('app.student.studentUnivFormIdFeeDetails', { + url: '/studentUnivFormIdFeeDetails', + templateUrl: "assets/views/student/studentUnivFormIdFeeDetails.html", + resolve: loadSequence('ui.select', 'spin', 'ui.mask', 'monospaced.elastic', 'ladda', 'touchspin-plugin', 'angular-ladda', 'studentUnivFormIdFeeDetailsCtrl', 'ngTable'), + title: 'Student FormId Fees Details', + ncyBreadcrumb: { + label: 'Student FormId Fees Details' + } }).state('app.student.status', { url: '/status', template: '
STUDENT STATUS UPDATE
', @@ -774,7 +782,24 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com ncyBreadcrumb: { label: 'Promote Batch' } - }); + }).state('app.entry', { + url: '/entry', + template: '
ENTRY
', + title: 'entry', + ncyBreadcrumb: { + label: 'entry' + }, + + }).state('app.entry.coursecorrection', { + url: '/coursecorrection', + templateUrl: "assets/views/entry_correction.html", + resolve: loadSequence('entrycorrectionCtrl','ngTable', 'ladda', 'angular-ladda'), + title: 'coursecorrection', + ncyBreadcrumb: { + label: 'coursecorrection' + }, + + }); // $locationProvider.html5Mode(true); diff --git a/Apollo/assets/js/controllers/entrycorrectionCtrl.js b/Apollo/assets/js/controllers/entrycorrectionCtrl.js new file mode 100644 index 00000000..828f44a0 --- /dev/null +++ b/Apollo/assets/js/controllers/entrycorrectionCtrl.js @@ -0,0 +1,270 @@ +'use strict'; +/*** controller***/ +app.controller('entrycorrectionCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state","$modal","$log", + function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state,$modal,$log){ + + //function ($scope, apiPoint, $http, SweetAlert, $state,$modal, md5, ipCookie, $window, dateListDescService) { + + // DataTables configurable options + + + $scope.filters = { + + "Date": "", + //"to_date": "", + + }; + + + + // $scope.initHead = function() { + + var logcheck = JSON.parse(localStorage.getItem('localObj')); + + const LOCALTYPE = logcheck.localType; + if (logcheck != null && (LOCALTYPE == 'R003' || LOCALTYPE == 'R004' || LOCALTYPE == 'R002' || LOCALTYPE == 'R005')) { + console.log("if"); + }else { + if(logcheck != null && LOCALTYPE !='R001') { + console.log("else if"); + $state.go('app.dashboard'); + } else { + + console.log("else else"); + //ipCookie.remove('cookiechk'); + window.localStorage.clear(); + $state.go('login.signin'); + } + } + + + +$scope.universitySearchData = ''; + + $scope.init = function() + { + + // alert() + var getuniv = { + method: 'POST', + url: apiPoint.url + 'AllgetUniversity/', + headers: { + 'Content-Type': 'application/json' + }, + + data: { + + branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID, + } + + }; + + $http(getuniv).then(function (response) { + + if(response.status == 200) + { + $scope.universitySearchData=response.data.details; + + //console.log($scope.universitySearchData); + } + + }); + + + }; + + + + $scope.studentInfo=""; + $scope.getStudentDetails = function (form,myModel) + { + + if(myModel !=undefined) + { + var mobileNumber = myModel.mobileNumber; + var studentName = myModel.studentName; + var receipt = myModel.receipt; + $scope.universityId = myModel.myUnivSearch; + // console.log($scope.universityId); + // return false; + + $scope.isLoaderShow= false + + var getdetail = { + method: 'POST', + url: apiPoint.url + 'getAllstudentcoursedetail/', + headers: { + 'Content-Type': 'application/json' + }, + data :{ + studentName: myModel.studentName, + mobileNumber: myModel.mobileNumber, + receipt: myModel.receipt, + University:$scope.universityId, + requestedtBy: JSON.parse(localStorage.getItem('localObj')).localUserID, + branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID, + requestedDept: JSON.parse(localStorage.getItem('localObj')).localType, + } + + }; + + $http(getdetail).then(function (response) { + + //console.log(response) + if (response.data.status==200 && response.data.studentStatus) { + $scope.studentInfo=response.data.details; + console.log($scope.studentInfo); + + } else { + $scope.studentInfo=""; + + $scope.isLoaderShow = true; + $scope.load = "No Records Found"; + + } + + }); + + + + } + + else + { + swal('Please Enter Any Field to Continue',"",'error'); + return false; + } + + + } + + + + $scope.OpenWindowStatus = false; + $scope.editId = -1; + $scope.setEditId = function (P) + { //alert(JSON.stringify(P)); + + var feedetails = { + method: 'POST', + url: apiPoint.url + 'getAllfeedetail/', + headers: { + 'Content-Type': 'application/json' + }, + data :{ + studentId: P.StudentID, + courseId:P.CourseID, + University:$scope.universityId, + requestedtBy: JSON.parse(localStorage.getItem('localObj')).localUserID, + branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID, + requestedDept: JSON.parse(localStorage.getItem('localObj')).localType, + } + + }; + + $http(feedetails).then(function (response) { + + //console.log(response) + if (response.data.status==200 && response.data.feeStatus) { + $scope.feeInfo=response.data.details; + console.log($scope.feeInfo); + $scope.editId = P.ID; + + } else { + $scope.feeInfo=""; + $scope.loadfee = "No Records Found"; + + } + + }); + + + } + + $scope.close = function () + { + $scope.editId = -1; + } + + + + $scope.updatestatus = function(myModel, form, loading) + { + var firstError = null; + if (form.$invalid) { + + var field = null, firstError = null; + for (field in form) { + 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(); + swal("Please Enter Reason!", "", "error"); + } + else + { +//alert('else') + // return false; + var IsActive = ''; + + if(myModel.IsActive == true) + { + IsActive =1; + } + + else if(myModel.IsActive == false) + { + IsActive =0; + } + + var studentid= myModel.StudentID; + var universityid = myModel.UniversityID; + var courseId = myModel.CourseID; + + var updatecourse = { + method: 'POST', + url: apiPoint.url + 'updateCourseDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + + studentid:studentid, + universityid:universityid, + courseId:courseId, + Reason:myModel.Reason, + IsActive:IsActive, + requestedtBy: JSON.parse(localStorage.getItem('localObj')).localUserID, + branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID, + requestedDept: JSON.parse(localStorage.getItem('localObj')).localType, + } + }; + + $http(updatecourse).then(function (response) { + swal('Change Saved Successfully', response.data.message, "success"); + $scope.close(); + + }); + + + + } + } + + + + + + + + }]); + + + + diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index 0e6c4d1d..5634d7b2 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -2298,6 +2298,7 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "$timeout", $scope.BranchLogo = ""; $scope.FeesReceiptTitle = ""; $scope.myPdfView = ''; + $scope.cur_url = ''; $scope.ShowHide = function (pdfValue,print) { $timeout(()=> { //alert(this.print); @@ -2316,8 +2317,10 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "$timeout", $scope.BranchLogo = pdfValue.LogoPath; $scope.FeesReceiptTitle = pdfValue.FeesReceiptTitle; $scope.receiptNo=pdfValue.ReceiptNo; + $scope.cur_url = window.location.hostname + window.location.pathname; - + console.log($scope.cur_url); + console.log($scope.BranchLogo); } //testing for print @@ -2326,12 +2329,13 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "$timeout", var printHtml = document.getElementById(print).outerHTML; //var currentPage = document.body.innerHTML; - var elementPage = '' + printHtml + '

' + printHtml + ''; - document.body.innerHTML = elementPage; - window.print(); - document.body.innerHTML = elementPage; - window.location.reload(); - document.close(); + var popupWinindow = window.open('', '_blank', 'width=1200,height=700,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no'); + var elementPage = '' + printHtml + '





' + printHtml + ''; + popupWinindow.document.body.innerHTML = elementPage; + popupWinindow.document.body.innerHTML = elementPage; + popupWinindow.print(); + //window.location.reload(); + popupWinindow.document.close(); } // $scope.mouseLeave = function(){ diff --git a/Apollo/assets/js/controllers/report_certificateCtrl.js b/Apollo/assets/js/controllers/report_certificateCtrl.js index cd859572..6e7a1047 100755 --- a/Apollo/assets/js/controllers/report_certificateCtrl.js +++ b/Apollo/assets/js/controllers/report_certificateCtrl.js @@ -300,7 +300,7 @@ app.controller('report_certificateCtrl', ["$scope", "$filter","$rootScope","$mod //console.log(selectedStudents); var comments = []; for(var stuid=0;stuid<=selectedStudents.length-1;stuid++){ - comments [stuid] ="Call Tracking For Report Certificate Status - DocumentName:"+selectedStudents[stuid].Certificate_name + " - Status:" +selectedStudents[stuid].Certificate_status + " - Date:" +selectedStudents[stuid].Certificate_date; + comments [stuid] ="Call Tracking For Report Certificate Status - DocumentName:"+selectedStudents[stuid].certname + " - Status:" +selectedStudents[stuid].status + " - Date:" +selectedStudents[stuid].adate; } if(isNaN(myModel.date)){ $scope.nextFollowupDate = myModel.date; diff --git a/Apollo/assets/js/controllers/report_examfeeCtrl.js b/Apollo/assets/js/controllers/report_examfeeCtrl.js index 59771a17..b7f37006 100755 --- a/Apollo/assets/js/controllers/report_examfeeCtrl.js +++ b/Apollo/assets/js/controllers/report_examfeeCtrl.js @@ -98,22 +98,11 @@ app.controller('report_examfeeCtrl', ["$scope", "$filter","$rootScope","$modal", $scope.show = false; $scope.onSubmit = function (form) { - 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(); + if($scope.univModel.university !== null && $scope.univModel.university !== '' ){ + $scope.filterUniv = angular.fromJson($scope.univModel.university); }else { + $scope.filterUniv = ''; + } //alert($scope.batch.name); $scope.examfee_data = ''; $scope.message = ''; @@ -125,7 +114,7 @@ app.controller('report_examfeeCtrl', ["$scope", "$filter","$rootScope","$modal", }, data: { branch: JSON.parse(localStorage.getItem('localObj')).localBranchID, - university: $scope.univModel.university.universityID, + university: $scope.filterUniv.universityID, batch: $scope.univModel.batch } @@ -150,7 +139,7 @@ app.controller('report_examfeeCtrl', ["$scope", "$filter","$rootScope","$modal", totalf += parseFloat(item.Amount); } return totalf; } - } + } var mystyle = { sheetid: 'EXAM WRITING FEE REPORT', diff --git a/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js b/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js index aa27b2c7..6c2e48d7 100755 --- a/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js +++ b/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js @@ -175,7 +175,7 @@ app.controller('report_markcard_certificateCtrl', ["$scope", "$filter","$rootSco $scope.exportData = function () { - alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,Student_name as StudentName,Father_name as FatherName,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,course_name as CourseName,Sem_year as SemYear,Certificate_name as CertificateName,rstatus as ReceivedStatus,rcvedate as ReceivedDate,istatus as IssuedStatus,issuedate as IssuedDate,acmts as CertificateIssuedComments,CAST(Balance_fee AS NUMBER) as BalanceFee INTO XLS("Markcard/Certificate_status.xls",?) FROM ?',[mystyle,$scope.mark_cert_data]); + alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,Student_name as StudentName,Father_name as FatherName,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,course_name as CourseName,Sem_year as SemYear,Certificate_name as CertificateName,rstatus as ReceivedStatus,rdate as ReceivedDate,istatus as IssuedStatus,issuedate as IssuedDate,acmts as CertificateIssuedComments,CAST(Balance_fee AS NUMBER) as BalanceFee INTO XLS("Markcard/Certificate_status.xls",?) FROM ?',[mystyle,$scope.mark_cert_data]); }; /** * Auto Call Tracking Sriram @@ -310,7 +310,7 @@ app.controller('report_markcard_certificateCtrl', ["$scope", "$filter","$rootSco //console.log(selectedStudents); var comments = []; for(var stuid=0;stuid<=selectedStudents.length-1;stuid++){ - comments [stuid] ="Call Tracking For Report Certificate Status - SemYear:"+selectedStudents[stuid].Sem_year + " - Balance:" +selectedStudents[stuid].Balance_fee + " - CertificateName:" +selectedStudents[stuid].Certificate_name + " - ReceivedStatus:" +selectedStudents[stuid].rstatus + " - ReceivedDate:" +selectedStudents[stuid].rdate; + comments [stuid] ="Call Tracking For Report Markcard/Certificate Status - SemYear:"+selectedStudents[stuid].Sem_year + " - Balance:" +selectedStudents[stuid].Balance_fee + " - CertificateName:" +selectedStudents[stuid].Certificate_name + " - ReceivedStatus:" +selectedStudents[stuid].rstatus + " - ReceivedDate:" +selectedStudents[stuid].rdate; } if(isNaN(myModel.date)){ $scope.nextFollowupDate = myModel.date; diff --git a/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js b/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js new file mode 100644 index 00000000..7ec75d6d --- /dev/null +++ b/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js @@ -0,0 +1,362 @@ +'use strict'; +/** + * controllers for ng-table + * Simple table with sorting and filtering on AngularJS + */ + +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) { + /** + * student university fee details compare + */ + + // get local client details + var localDetail = JSON.parse(localStorage.getItem('localObj')); + var localDetails = ipCookie('cookiechk'); + + // load when html page load + $scope.init = function () { + + var logcheck = JSON.parse(localStorage.getItem('localObj')); + + const LOCALTYPE = logcheck.localType; + if (logcheck != null && (LOCALTYPE == 'R003' || LOCALTYPE == 'R004' || LOCALTYPE == 'R002' || LOCALTYPE == 'R005')) { + console.log("if"); + } else { + if (logcheck != null && LOCALTYPE != 'R001') { + console.log("else if"); + $state.go('app.dashboard'); + } else { + console.log("else else"); + window.localStorage.clear(); + $state.go('login.signin'); + } + } + + if (localDetail != null) { + if (localDetails.localType === 'R004') { + // $scope.getUniversityList(); + $scope.getUniversitySearchList(); + } else { + ipCookie.remove('cookiechk'); + $window.localStorage.clear(); + $state.go('login.signin'); + } + } else { + } + } + + + /*$scope.universityData = ''; + $scope.getUniversityList = function () { + var empListreq = { + method: 'POST', + url: apiPoint.url + 'getStudentUniversity/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: localDetails + } + }; + $http(empListreq).then(function (response) { + if (response.data.univList) { + $scope.universityData = response.data.university_details; + } else { + } + }); + }*/ + // get University List + $scope.universitySearchData = ''; + $scope.getUniversitySearchList = function () { + var empListreq = { + method: 'POST', + url: apiPoint.url + 'getUniversitySessionDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: localDetails + } + }; + $http(empListreq).then(function (response) { + if (response.data.status) { + $scope.universitySearchData = response.data.details; + } else { + $scope.universitySearchData = ""; + } + }); + }; + + + $scope.searchData = { + "University": "", + "Session": "", + "Status": "" + } + $scope.myUnivSearch = ""; + $scope.sessionData = ""; + $scope.getUniveId = function (univ) { + $scope.sessionData = ""; + if (univ === '') { + $scope.myUnivSearch = ""; + $scope.searchData.University = ''; + // $scope.searchData.Course = ''; + // $scope.searchData.Batch = ''; + // $scope.courseData = name.Course; + // $scope.batchData = name.Batch; + $scope.searchData.Session = ''; + + $scope.OpenWindowStatus = false; + } else { + let name = JSON.parse(univ); + $scope.searchData.University = name.UniversityID; + // $scope.searchData.Course = ''; + // $scope.searchData.Batch = ''; + // $scope.courseData = name.Course; + // $scope.batchData = name.Batch; + $scope.searchData.Session = ''; + $scope.sessionData = name.SessionDetails; + $scope.OpenWindowStatus = false; + } + + }; + //For session dropdown + $scope.filterSessionDetails = ""; + $scope.$watch('searchData.University', function (newValue, oldValue) { + if (newValue == undefined || newValue == '') { + $scope.filterSessionDetails = ""; + } + else { + if (angular.isString(newValue)) { + $scope.filterSessionDetails = angular.fromJson(newValue); + } + } + + }); + + + $scope.Searchloader = false; + $scope.studentData = false; + + $scope.onSubmit = function () { + $scope.Searchloader = true; + if ($scope.searchData.University !== '' && $scope.searchData.Session !== '') { + $scope.Searchloader = true; + var empListreq = { + method: 'POST', + url: apiPoint.url + 'getStudentUnivFeeCompareDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: localDetails, + search: $scope.searchData, + } + }; + $http(empListreq).then(function (response) { + if (response.data.formTypeStatus) { + $scope.Searchloader = false; + $scope.studentData = true; + $scope.data = response.data.studentFeeCompareDetails; + $scope.studentListLength = $scope.data.length; + // $scope.statusMessage = $scope.data.message; + } else { + $scope.Searchloader = false; + $scope.studentData = false; + $scope.statusMessage = $scope.data.message; + } + }); + } else { + + } + } + + $scope.editId = -1; + $scope.setEditId = function (id) { + $scope.editId = id; + } + + /*upload model*/ + $scope.uploadModel = { + university: "", + uploadFor: "", + } + /* + * upload options json + * */ + $scope.uploadOptions = [{ + id: 1, + name: 'Received Enrolment From University', + }, + { + id: 2, + name: 'Received Fees From University' + }, + ]; + /* + watch upload model for enable upload options + */ + $scope.showFile = "1"; + // $scope.$watchCollection('uploadModel', function (newValue, oldValue) { + + // if (newValue.university != '' && newValue.university != null) { + // $scope.showFile = "1"; + // } + // else { + // $scope.showFile = "0"; + // } + + // }); + + $scope.extractFormIDDetails = ""; + $scope.readXlsxFormDetails = function (workbook) { + $scope.extractFormIDDetails = ""; + /* DO SOMETHING WITH workbook HERE */ + for (var sheetName in workbook.Sheets) { + var jsonData = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName]); + if (jsonData.length != 0) { + $scope.extractFormIDDetails = jsonData; + } + + } + $scope.error = function (e) { + /* DO SOMETHING WHEN ERROR IS THROWN */ + //console.log(e); + } + + } + + $scope.receiveFormIdFeeDetails = function (details) { + console.log(details); + + var updateUniversityEnrolment = { + method: 'POST', + url: apiPoint.url + 'insertFormIdUnivFeeDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + localDetails: localDetail, + details: details + } + }; + + $http(updateUniversityEnrolment).then(function (response) { + if (response.data.stuFeeList == true) { + swal("", "Updated Successfully", "success"); + $state.go($state.current, {}, { reload: true }); + } else { + swal("", "Failed", "error"); + } + }); + } + + $scope.popupLoad = false; + $scope.popupLoadData = false; + $scope.formPaymentDetails = ""; + + // Fee compare details get + + $scope.getFeeCompareDetails = function (formId, enrolmentId) { + $scope.popupLoadData = false; + $scope.formPaymentDetails = ""; + $scope.popupLoad = true; + var getFeeCompareDetailsList = { + method: 'POST', + url: apiPoint.url + 'formIDFeeCompareDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + localDetails: localDetail, + formId: formId, + enrolmentId: enrolmentId + } + }; + + $http(getFeeCompareDetailsList).then(function (response) { + if (response.data.status == true) { + $scope.popupLoad = false; + $scope.popupLoadData = true; + $scope.formPaymentDetails = response.data; + + } else { + $scope.popupLoad = false; + $scope.popupLoadData = true; + $scope.formPaymentDetails = response.data; + } + }); + } + + $scope.unMatchedLoadingStatus = false; + // Get unmached details + $scope.getUnmatchedRecord = function (ss) { + $scope.unMatchedRecordDetails = ''; + $scope.unMatchedNoRecordFound = false; + $scope.unMatchedLoadingStatus = true; + var getDetailsFor = ss == 1 ? 'EnrolmentIDFile' : 'FormIDFile'; + var getFeeCompareDetailsList = { + method: 'POST', + url: apiPoint.url + 'getUnmatchedRecordDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + localDetails: localDetail, + getDetailsFor: getDetailsFor + } + }; + $http(getFeeCompareDetailsList).then(function (response) { + if (response.data.unMatchedRecordStatus == true) { + $scope.unMatchedLoadingStatus = false; + $scope.unMatchedNoRecordFound = false; + $scope.unMatchedRecordDetails = response.data.unMatchedRecordDetails; + $scope.unMatchedRecordDetailsType = response.data.unMatchedRecordFor; + } else { + $scope.unMatchedLoadingStatus = false; + $scope.unMatchedNoRecordFound = true; + $scope.unMatchedRecordDetails = response.data.unMatchedRecordDetails; + } + }); + } + + // get subtab details for the formid fee details get form the university + + $scope.subTabActive= function(tab){ + if( tab == 'subTabactive2'){ + getDraftFormIdDetails(); + } + } + + // get draft form id details + function getDraftFormIdDetails(){ + // $scope.unMatchedRecordDetails = ''; + // $scope.unMatchedNoRecordFound = false; + // $scope.unMatchedLoadingStatus = true; + // var getDetailsFor = ss == 1 ? 'EnrolmentIDFile' : 'FormIDFile'; + // var getFeeCompareDetailsList = { + // method: 'POST', + // url: apiPoint.url + 'getUnmatchedRecordDetails/', + // headers: { + // 'Content-Type': 'application/json' + // }, + // data: { + // localDetails: localDetail, + // getDetailsFor: getDetailsFor + // } + // }; + // $http(getFeeCompareDetailsList).then(function (response) { + // if (response.data.unMatchedRecordStatus == true) { + // $scope.unMatchedLoadingStatus = false; + // $scope.unMatchedNoRecordFound = false; + // $scope.unMatchedRecordDetails = response.data.unMatchedRecordDetails; + // $scope.unMatchedRecordDetailsType = response.data.unMatchedRecordFor; + // } else { + // $scope.unMatchedLoadingStatus = false; + // $scope.unMatchedNoRecordFound = true; + // $scope.unMatchedRecordDetails = response.data.unMatchedRecordDetails; + // } + // }); + } + +}]); diff --git a/Apollo/assets/js/controllers/student_university_fee_compare.js b/Apollo/assets/js/controllers/student_university_fee_compare.js index 6baa2a57..2ab1c705 100644 --- a/Apollo/assets/js/controllers/student_university_fee_compare.js +++ b/Apollo/assets/js/controllers/student_university_fee_compare.js @@ -15,7 +15,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil // load when html page load $scope.init = function () { - + var logcheck = JSON.parse(localStorage.getItem('localObj')); const LOCALTYPE = logcheck.localType; @@ -34,7 +34,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil if (localDetail != null) { if (localDetails.localType === 'R004') { - $scope.getUniversityList(); + // $scope.getUniversityList(); $scope.getUniversitySearchList(); } else { ipCookie.remove('cookiechk'); @@ -45,8 +45,8 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil } } - - $scope.universityData = ''; + + /*$scope.universityData = ''; $scope.getUniversityList = function () { var empListreq = { method: 'POST', @@ -64,13 +64,13 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil } else { } }); - } + }*/ // get University List $scope.universitySearchData = ''; $scope.getUniversitySearchList = function () { var empListreq = { method: 'POST', - url: apiPoint.url + 'getUniveCourseBratch/', + url: apiPoint.url + 'getUniversitySessionDetails/', headers: { 'Content-Type': 'application/json' }, @@ -79,10 +79,10 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil } }; $http(empListreq).then(function (response) { - if (response.data.univList) { - $scope.universitySearchData = response.data.university_details; - // alert() + if (response.data.status) { + $scope.universitySearchData = response.data.details; } else { + $scope.universitySearchData=""; } }); }; @@ -90,38 +90,57 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil $scope.searchData = { "University": "", - "Course": "", + "Session": "", "Status": "" } $scope.myUnivSearch = ""; + $scope.sessionData=""; $scope.getUniveId = function (univ) { + $scope.sessionData=""; if (univ === '') { $scope.myUnivSearch = ""; $scope.searchData.University = ''; - $scope.searchData.Course = ''; - $scope.searchData.Batch = ''; - $scope.courseData = name.Course; - $scope.batchData = name.Batch; + // $scope.searchData.Course = ''; + // $scope.searchData.Batch = ''; + // $scope.courseData = name.Course; + // $scope.batchData = name.Batch; + $scope.searchData.Session = ''; + $scope.OpenWindowStatus = false; } else { let name = JSON.parse(univ); $scope.searchData.University = name.UniversityID; - $scope.searchData.Course = ''; - $scope.searchData.Batch = ''; - $scope.courseData = name.Course; - $scope.batchData = name.Batch; + // $scope.searchData.Course = ''; + // $scope.searchData.Batch = ''; + // $scope.courseData = name.Course; + // $scope.batchData = name.Batch; + $scope.searchData.Session = ''; + $scope.sessionData = name.SessionDetails; $scope.OpenWindowStatus = false; } }; + //For session dropdown + $scope.filterSessionDetails=""; + $scope.$watch('searchData.University', function (newValue,oldValue) { + if(newValue==undefined || newValue==''){ + $scope.filterSessionDetails=""; + } + else{ + if(angular.isString(newValue)){ + $scope.filterSessionDetails=angular.fromJson(newValue); + } + } + + }); + - $scope.Searchloader = false; $scope.studentData = false; $scope.onSubmit = function(){ $scope.Searchloader = true; - if($scope.searchData.University !== '' && $scope.searchData.Course !==''){ + if($scope.searchData.University !== '' && $scope.searchData.Session !==''){ $scope.Searchloader = true; var empListreq = { method: 'POST', @@ -131,7 +150,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil }, data: { data: localDetails, - search: $scope.searchData + search: $scope.searchData, } }; $http(empListreq).then(function (response) { @@ -259,8 +278,6 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil } $scope.receiveFormIdFeeDetails = function(details) { - console.log(details); - var updateUniversityEnrolment = { method: 'POST', url: apiPoint.url + 'insertFormIdUnivFeeDetails/', @@ -286,6 +303,9 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil $scope.popupLoad = false; $scope.popupLoadData = false; $scope.formPaymentDetails=""; + + // Fee compare details get + $scope.getFeeCompareDetails = function(formId, enrolmentId){ $scope.popupLoadData = false; $scope.formPaymentDetails=""; @@ -315,6 +335,152 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil $scope.formPaymentDetails=response.data; } }); + } + + $scope.unMatchedLoadingStatus = false; + // Get unmached details + $scope.getUnmatchedRecord = function(ss){ + $scope.unMatchedRecordDetails = ''; + $scope.unMatchedNoRecordFound = false; + $scope.unMatchedLoadingStatus = true; + var getDetailsFor = ss == 1 ? 'EnrolmentIDFile' : 'FormIDFile'; + var getFeeCompareDetailsList = { + method: 'POST', + url: apiPoint.url + 'getUnmatchedRecordDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + localDetails: localDetail, + getDetailsFor: getDetailsFor + } + }; + $http(getFeeCompareDetailsList).then(function (response) { + if (response.data.unMatchedRecordStatus == true) { + $scope.unMatchedLoadingStatus = false; + $scope.unMatchedNoRecordFound = false; + $scope.unMatchedRecordDetails=response.data.unMatchedRecordDetails; + $scope.unMatchedRecordDetailsType= response.data.unMatchedRecordFor; + } else { + $scope.unMatchedLoadingStatus = false; + $scope.unMatchedNoRecordFound = true; + $scope.unMatchedRecordDetails=response.data.unMatchedRecordDetails; + } + }); + } + $scope.manualEnModel={ + "enrolmentNo": '', + "formID":"", + "sem":'', + }; + /* + * add manual enrolment details + * */ + $scope.enableEnrolment=false; + $scope.addManualEnrolemntDetails=function (values) { + if(values=='1'){ + $scope.enableEnrolment=!$scope.enableEnrolment; + } + else{ + $scope.enableEnrolment=!$scope.enableEnrolment; + } + + } + /* + * check enrolment exist or not in student details + * */ + $scope.semList=[]; + $scope.studentInfo=[]; + $scope.checkEnrolmentExistDetails=function (form,entryModel) { + $scope.semList=[]; + $scope.studentInfo=[]; + var getExistEnrol = { + method: 'POST', + url: apiPoint.url + 'getExistStudentEnrolmentDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + localDetails: localDetail, + enrolmentID: entryModel + } + }; + $http(getExistEnrol).then(function (response) { + if (response.data.status == true) { + if(response.data.semDetails.length==0){ + swal("Warning","Already form enrolment is created for all semester", "warning"); + } + else{ + $scope.studentInfo=response.data.StudentInfo; + $scope.semList=response.data.semDetails; + } + + } else { + $scope.semList=[]; + $scope.studentInfo=[]; + swal("Failed",response.data.message, "error"); + + } + }); + + } + /* + * cancel manual entry for enrolment details + * */ + $scope.cancelManualEntry=function (form) { + $scope.semList=[]; + $scope.enableEnrolment=!$scope.enableEnrolment; + } + /* + * submit manual entry form details + * */ + $scope.manualEnrolmentSubmit = function (form) { + if($scope.manualEnModel.enrolmentNo=='' || $scope.manualEnModel.enrolmentNo==null || $scope.manualEnModel.enrolmentNo==undefined){ + swal("Wraning","Please enter enrolment id", "warning"); + + } + else if($scope.manualEnModel.sem=='' || $scope.manualEnModel.sem==null){ + swal("Wraning","Please select sem", "warning"); + + } + else if($scope.manualEnModel.formID=='' || $scope.manualEnModel.formID==null){ + swal("Wraning","Please enter form id", "warning"); + + } + else{ + var addEntry = { + method: 'POST', + url: apiPoint.url + 'addManualEnrolmentDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + localDetails: localDetail, + enrolmentID: $scope.manualEnModel.enrolmentNo, + formID: $scope.manualEnModel.formID, + sem: $scope.manualEnModel.sem, + studentInfo:$scope.studentInfo + } + }; + $http(addEntry).then(function (response) { + if (response.data.status == true) { + $scope.studentInfo=""; + $scope.semList=[]; + form.manualFormID.$setPristine(true); + form.manualSem.$setPristine(true); + swal("Success",response.data.message, "success"); + } else { + swal("Failed",response.data.message, "error"); + + } + }); + } + + + + + + } }]); diff --git a/Apollo/assets/js/directives/convert-words.js b/Apollo/assets/js/directives/convert-words.js index 53674596..5568af9a 100755 --- a/Apollo/assets/js/directives/convert-words.js +++ b/Apollo/assets/js/directives/convert-words.js @@ -184,4 +184,21 @@ app.service('dateListDescService', function() { }); return listDetails; } +}); +app.directive('numberOnly', function () { + return { + require: 'ngModel', + restrict: 'A', + link: function (scope, element, attrs, ctrl) { + ctrl.$parsers.push(function (input) { + if (input == undefined) return '' + var inputNumber = input.toString().replace(/[^0-9]/g, ''); + if (inputNumber != input) { + ctrl.$setViewValue(inputNumber); + ctrl.$render(); + } + return inputNumber; + }); + } + }; }); \ No newline at end of file diff --git a/Apollo/assets/views/edit_course.html b/Apollo/assets/views/edit_course.html new file mode 100644 index 00000000..e165dcf6 --- /dev/null +++ b/Apollo/assets/views/edit_course.html @@ -0,0 +1,107 @@ + +
+
+
+
+
+ + Fee Paid Details + +
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
BillNOReceipt NoBill DateBill AmountMode of Payment
{{p.BillNO}}{{p.ReceiptNo}}{{p.BillDate}}{{p.BillAmount}}{{p.ModeOfPayment}}
+
+ +
+
+ +
+ + +
+ +
+ +
+ + + +
+
+ + +
+ +
+ +
+
+ +
+
+
+ + + + +
+ + +
+
+ +
+
+
+ \ No newline at end of file diff --git a/Apollo/assets/views/entry_correction.html b/Apollo/assets/views/entry_correction.html new file mode 100644 index 00000000..e399e5ed --- /dev/null +++ b/Apollo/assets/views/entry_correction.html @@ -0,0 +1,181 @@ + + + + + + +
+
+
+

COURSE CORRECTION

+
+ +
+
+ + +
+
+
+ + + +
+
+ Search +
+
+ + + + Enter a valid mobile number + + +
+ +
+ + + + Invalid student name +
+ + +
+ + + +
+ +
+
+ + +
+
+ +
+
+ +
+ +
+

{{load}}

+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
MobileNameCourseUniversityAction
{{p.MobileNumber}}{{p.Firstname}} {{p.Lastname}}{{p.CourseName}}{{p.UniversityName}}
+
+ + +
+ + + +
+ + diff --git a/Apollo/assets/views/partials/nav.html b/Apollo/assets/views/partials/nav.html index 251b04dd..c5988d12 100755 --- a/Apollo/assets/views/partials/nav.html +++ b/Apollo/assets/views/partials/nav.html @@ -221,6 +221,11 @@ STUDENT UNIV FEE COMPARE DETAILS +
  • + + STUDENT FORMID FEE DETAILS + +
  • + +
  • + +
    +
    + +
    +
    + ENTRY +
    +
    +
    + + +
  • diff --git a/Apollo/assets/views/report_mark_certificate_status.html b/Apollo/assets/views/report_mark_certificate_status.html index d1d91853..651eed4f 100755 --- a/Apollo/assets/views/report_mark_certificate_status.html +++ b/Apollo/assets/views/report_mark_certificate_status.html @@ -168,7 +168,7 @@ td,th { {{p.Sem_year}} {{p.Certificate_name}} {{p.rstatus}} - {{p.rcvedate}} + {{p.rdate}} {{p.istatus}} {{p.issuedate}} {{p.acmts}} diff --git a/Apollo/assets/views/status-update/updateFeesStatus.html b/Apollo/assets/views/status-update/updateFeesStatus.html index b633f923..fd21243b 100755 --- a/Apollo/assets/views/status-update/updateFeesStatus.html +++ b/Apollo/assets/views/status-update/updateFeesStatus.html @@ -455,14 +455,14 @@
    - APP + APP
    - APP + APP
    diff --git a/Apollo/assets/views/student/studentUnivFeeCompareDetails.html b/Apollo/assets/views/student/studentUnivFeeCompareDetails.html index 5a93b6ab..71cc90fd 100644 --- a/Apollo/assets/views/student/studentUnivFeeCompareDetails.html +++ b/Apollo/assets/views/student/studentUnivFeeCompareDetails.html @@ -43,7 +43,7 @@
    - + +
    + +
    +
    +
    +
    +
    +
    + + Add Enrolment Details + + +
    +
    +
    + + + + Enrolment no is required + Enter a valid enrolment no + +
    +
    + +
    +
    +
    +
    + + + Sem is required +
    + +
    + + + + Form id is required +
    +
    +
    + + + +
    +
    +
    + + +
    + +
    +
    +
    +
    + +
    @@ -69,20 +152,19 @@
    - + +
    - @@ -105,6 +187,8 @@ FormID + Enrolment No + Form Type Student Name @@ -117,10 +201,7 @@ Sem/Year - Enrolment ID - - Action - + @@ -128,6 +209,7 @@ {{p.FormID}} + {{p.EnrolmentNo}} {{p.FormType}} @@ -141,12 +223,12 @@ {{p.UniversityName}} {{p.CourseName}} {{p.SemesterYear}} - {{p.EnrolmentNo}} - + + - + @@ -223,6 +305,106 @@
    + + +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    +
    Loading...
    +
    +
    +
    No Record Found ...
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FormIDEnrolmentNoRollNoCentreCodeCentreStateMobileNumberStudentNameFatherNameMotherNameEmailIDUniversityCodeUniversityNameCourseCodeCourseNameSemesterYear
    {{p.FormID}}{{p.EnrolmentNo}}{{p.RollNo}}{{p.CentreCode}}{{p.CentreState}}{{p.MobileNumber}}{{p.StudentName}}{{p.FatherName}}{{p.MotherName}}{{p.EmailID}}{{p.UniversityCode}}{{p.UniversityName}}{{p.CourseCode}}{{p.CourseName}}{{p.SemesterYear}}
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    FormIDFormTypeCentreCodeCourseCodeActualCourseFeeCourseFeeAmount
    {{p.FormID}}{{p.FormType}}{{p.CentreCode}}{{p.CourseCode}}{{p.ActualCourseFee}}{{p.CourseFee}}{{p.Amount}}
    + + +
    +
    +
    +
    diff --git a/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html b/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html new file mode 100644 index 00000000..962b0e68 --- /dev/null +++ b/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html @@ -0,0 +1,323 @@ + +
    +
    +
    +

    {{ mainTitle }}

    + Student University FormId Fees Details. +
    +
    +
    +
    + + +
    + + + +
    +
    +
    + + + +
    + +
    +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    + +
    +
    + +
    +
    +

    Loading...

    +
    +

    {{statusMessage}}

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FormID + Form Type + Student Name + Father Name + University + Course + Sem/Year + Enrolment ID + University Paid + Student Paid +
    + {{p.FormID}} + + {{p.FormType}} + + + {{p.Firstname}} {{p.Lastname}} + + + {{p.Fathername}}{{p.UniversityName}}{{p.CourseName}}{{p.SemesterYear}}{{p.EnrolmentNo}}{{p.UniversityPaidAmount}}{{p.StudentPaidAmount}}
    + + + +
    +
    +
    + + + +
    +
    + +
    +
    + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    +
    Loading...
    +
    +
    +
    No Record Found ...
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FormIDEnrolmentNoRollNoCentreCodeCentreStateMobileNumberStudentNameFatherNameMotherNameEmailIDUniversityCodeUniversityNameCourseCodeCourseNameSemesterYear
    {{p.FormID}}{{p.EnrolmentNo}}{{p.RollNo}}{{p.CentreCode}}{{p.CentreState}}{{p.MobileNumber}}{{p.StudentName}}{{p.FatherName}}{{p.MotherName}}{{p.EmailID}}{{p.UniversityCode}}{{p.UniversityName}}{{p.CourseCode}}{{p.CourseName}}{{p.SemesterYear}}
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    FormIDFormTypeCentreCodeCourseCodeActualCourseFeeCourseFeeAmount
    {{p.FormID}}{{p.FormType}}{{p.CentreCode}}{{p.CourseCode}}{{p.ActualCourseFee}}{{p.CourseFee}}{{p.Amount}}
    + + +
    +
    +
    + +
    +
    +
    +
    + + \ No newline at end of file