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 459f63ab..b5be32e6 100644 --- a/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php +++ b/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php @@ -133,16 +133,22 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller { $getDetails = $this->receive_model->getFormIDFeeDetails($formData); if ($getDetails['Status']=true) { - $getDetails['status'] =REST_Controller::HTTP_OK; + $getDetails['status'] =true; // Set the response and exit $this->response($getDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } + else if($getDetails['Status']=false){ + $this->response([ + 'message' => $getDetails['Message'], + 'status' => false + ], REST_Controller::HTTP_OK); // NOT_FOUND (404) 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 + 'status' => false ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } diff --git a/Apollo/assets/js/controllers/student_university_fee_compare.js b/Apollo/assets/js/controllers/student_university_fee_compare.js index 7c6f742c..1644159e 100644 --- a/Apollo/assets/js/controllers/student_university_fee_compare.js +++ b/Apollo/assets/js/controllers/student_university_fee_compare.js @@ -301,7 +301,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil }; $http(getFeeCompareDetailsList).then(function (response) { - if (response.data.stuFeeList == true) { + if (response.data.status == true) { $scope.popupLoad = false; $scope.popupLoadData = true; } else {