diff --git a/Apollo/api/application/controllers/StatusUpdation_Controller.php b/Apollo/api/application/controllers/StatusUpdation_Controller.php index bc18a9f6..4b959d0e 100755 --- a/Apollo/api/application/controllers/StatusUpdation_Controller.php +++ b/Apollo/api/application/controllers/StatusUpdation_Controller.php @@ -218,6 +218,10 @@ class StatusUpdation_Controller extends REST_Controller { $reqData = $this->post('data'); $reqDetailsFor = $this->post('statusFor'); $reqDetails = $this->post('getDetailsFor'); + + + //print_r($reqDetails);die(); + $getPrevStatusList = $this->statusupdation_model->get_prev_status_list($reqDetailsFor, $reqDetails); // Check if the employee exist if ($getPrevStatusList) { $getPrevStatusList['status'] = REST_Controller::HTTP_OK; diff --git a/Apollo/api/application/models/StatusUpdation_model.php b/Apollo/api/application/models/StatusUpdation_model.php index a540f673..ea706ea4 100755 --- a/Apollo/api/application/models/StatusUpdation_model.php +++ b/Apollo/api/application/models/StatusUpdation_model.php @@ -108,9 +108,28 @@ class StatusUpdation_model extends CI_Model { //If condition for Check ANSWERBOOKLET_STATUS, If it is null or 'Issued to Student' for do not send sms. $answerBookletStatus = $this->getAnswerBookletStatus($arr[0]['StudentID'],$arr[0]['CourseID'],$arr[0]['BranchCode'],$arr[0]['Sem']); - //print_r($answerBookletStatus);die(); + //print_r($answerBookletStatus); + +// echo $answerBookletStatus['ListName']; +// die(); //echo "COURSE ====$arr[0]['CourseID']"; // echo "PARENT -- $answerBookletStatus"; + +$getlastansbookstatus = $this->GetLastAns_status($arr[0]['StudentID'],$arr[0]['Sem'],$arr[0]['CourseID']); + +$latestappstatus=''; + if(!empty($getlastansbookstatus)) + { + + foreach($getlastansbookstatus as $get) + { + $latestappstatus= $get->ListCode; + } + } + + +// echo $latestappstatus; +// die(); if($answerBookletStatus['isIssueToStudentExist'] == 0 && $answerBookletStatus['statusCount'] != 0) { //echo "SEND SMS"; @@ -119,8 +138,11 @@ class StatusUpdation_model extends CI_Model { $studentName = $this->getStudentName($arr[0]['StudentID']); $CmntToMsg = $arr[0]['Comments']; $statuToMsg = $this->get_status_name_ListCode($arr[0]['ListCode']); + + + // $cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']); - if( $statuToMsg == 'received' || $statuToMsg == 'Received' || $statuToMsg == 'RECEIVED'){ + if( ($statuToMsg == 'received' || $statuToMsg == 'Received' || $statuToMsg == 'RECEIVED') && $latestappstatus == 'S057'){ $cerNamtToMsg = 'Mark Card'; $getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']); $getSemYearANDType = "$getSemYearMsg $cerNamtToMsg"; @@ -128,6 +150,10 @@ class StatusUpdation_model extends CI_Model { $mesg = "$cerNamtToMsg Received - Dear $studentName, Your $getSemYearANDType had been received, Please come and collect it."; $this->smssend($arr, $mesg); $this->mailsend($arr, $mesg, $cerNamtToMsg); + + + // echo $statuToMsg; + // die(); } else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') { $cerNamtToMsg = 'Mark Card'; $getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']); @@ -214,6 +240,7 @@ class StatusUpdation_model extends CI_Model { public function get_prev_status_list($reqDetailsFor, $reqDetails) { if ($reqDetailsFor == 'STUDY_MATERIAL') { + // echo 'in stu';die(); $searchFor = 'M001'; $searchTableFor = STUDY_MATERIAL_STATUS; $this->db->select('t1.*, t4.Firstname, t5.ListName, t2.Sem_Year, t2.ProgramType'); @@ -235,16 +262,21 @@ class StatusUpdation_model extends CI_Model { $results['message'] = 'No record found'; } } else if ($reqDetailsFor == 'APPICATION_STATUS') { + //echo 'in app';die(); $searchFor = 'A001'; $searchTableFor = APPLICATION_STATUS; $this->db->select('t1.*, t4.Firstname, t5.ListName, t1.CertificationType as CertificateName'); $this->db->from('' . $searchTableFor . ' as t1'); $this->db->where('t1.StudentID', $reqDetails['student']); + $this->db->where('t1.CourseID',$reqDetails['CourseID']); $this->db->join('' . LOGIN . ' as t3', 't3.ID = t1.CreatedBy', 'LEFT'); $this->db->join('' . STAFF . ' as t4', 't4.StaffID = t3.StaffID', 'LEFT'); $this->db->join('' . PICK_LIST_DETAILS . ' as t5', 't5.ListCode = t1.ListCode', 'LEFT'); + // $this->db->join('' . CERTIFICATION . ' as t6', 't6.CertificationID = t1.CertificationType', 'LEFT'); + $this->db->order_by('t1.CreatedOn', 'DESC'); + $statusDetails = $this->db->get(); $prevStatusDetails = $statusDetails->result(); if (count($prevStatusDetails) > 0) { @@ -254,7 +286,13 @@ class StatusUpdation_model extends CI_Model { $results['preStatusDetails'] = false; $results['message'] = 'No record found'; } + + + //print_r($this->db->last_query()); } else if ($reqDetailsFor == 'CERTIFICATION_STATUS') { + + + // echo 'in cer';die(); $searchFor = 'C001'; $searchTableFor = CERTIFICATION_STATUS; $this->db->select('t1.*, t4.Firstname, t5.ListName, t2.Sem_Year, t2.ProgramType'); @@ -276,6 +314,7 @@ class StatusUpdation_model extends CI_Model { $results['message'] = 'No record found'; } } else if ($reqDetailsFor == 'ANSWERBOOKLET_STATUS') { + // echo 'in ans';die(); $searchFor = 'B001'; $searchTableFor = ANSWER_BOOKLET; $this->db->select('t1.*, t4.Firstname, t5.ListName, t2.Sem_Year, t2.ProgramType'); @@ -891,6 +930,9 @@ class StatusUpdation_model extends CI_Model { //echo "FINAL RES SEND TO PARENT"; // print_r($data); // die(); + + // print_r($this->db->last_query()); + // die(); return $data; } @@ -972,4 +1014,26 @@ class StatusUpdation_model extends CI_Model { } return $resultArr; } -} \ No newline at end of file + + + + + public function GetLastAns_status($StudentID,$Sem,$CourseID) + { + $subQuery = 'select T_AnswerBookletStatus.ListCode,ListName from T_AnswerBookletStatus + join T_PickListDetails on T_AnswerBookletStatus.ListCode=T_PickListDetails.ListCode + where T_AnswerBookletStatus.StudentID=? and + T_AnswerBookletStatus.CreatedOn=(select max(CreatedOn) from T_AnswerBookletStatus + where StudentID= ?) and Sem=? and CourseID=?'; + + $query = $this->db->query($subQuery,array($StudentID,$StudentID,$Sem,$CourseID)); + + $expense = $query->result(); + + return $expense; + + } +} + + + diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php index e418b8d6..f0fda0f6 100755 --- a/Apollo/api/application/models/Student_model.php +++ b/Apollo/api/application/models/Student_model.php @@ -74,9 +74,6 @@ class Student_model extends CI_Model { LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID - WHERE SC.UniversityID = '$University' AND SC.BranchID = '$loginUserBranchId' @@ -91,11 +88,6 @@ class Student_model extends CI_Model { LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode - - - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID - WHERE @@ -168,11 +160,7 @@ class Student_model extends CI_Model { LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID - - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID - - + WHERE SC.UniversityID = '$University' @@ -189,10 +177,7 @@ class Student_model extends CI_Model { LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID - - + WHERE SC.CourseID = '$Course' AND SC.UniversityID = '$University' @@ -210,10 +195,7 @@ class Student_model extends CI_Model { LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID - - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID - + WHERE @@ -231,9 +213,6 @@ class Student_model extends CI_Model { LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID - WHERE @@ -369,8 +348,6 @@ class Student_model extends CI_Model { LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID WHERE SC.UniversityID = '$University' @@ -384,8 +361,6 @@ class Student_model extends CI_Model { LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID WHERE SC.CourseID = '$Course' AND SC.UniversityID = '$University' @@ -449,10 +424,6 @@ class Student_model extends CI_Model { LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID - - WHERE SC.UniversityID = '$University' AND SC.BranchID = '$loginUserBranchId' @@ -468,11 +439,6 @@ class Student_model extends CI_Model { LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode - - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID - - WHERE SC.CourseID = '$Course' AND SC.UniversityID = '$University' AND SC.BranchID = '$loginUserBranchId' @@ -597,9 +563,6 @@ class Student_model extends CI_Model { LEFT JOIN " . STUDENTS_FEES_PAID . " as SFP ON SFP.StudentID = S.StudentID - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID - WHERE SC.UniversityID = '$University' AND SC.BranchID = '$loginUserBranchId' @@ -613,9 +576,7 @@ class Student_model extends CI_Model { LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . STUDENTS_FEES_PAID . " as SFP ON SFP.StudentID = S.StudentID - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID - + WHERE SC.CourseID = '$Course' AND SC.UniversityID = '$University' @@ -697,11 +658,6 @@ class Student_model extends CI_Model { LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . STUDENTS_FEES_PAID . " as SFP ON SFP.StudentID = S.StudentID - - - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID - WHERE @@ -718,10 +674,6 @@ class Student_model extends CI_Model { LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . STUDENTS_FEES_PAID . " as SFP ON SFP.StudentID = S.StudentID - - - LEFT JOIN ".STUDENTS_FEES_STATUS." as sfs on sfs.CourseID=SC.CourseID AND sfs.StudentID=SC.StudentID - and C.CourseID=sfs.CourseID WHERE SC.CourseID = '$Course' AND SC.UniversityID = '$University' diff --git a/Apollo/assets/js/controllers/certificateStatusCtrl.js b/Apollo/assets/js/controllers/certificateStatusCtrl.js index bd901815..c3b716bb 100644 --- a/Apollo/assets/js/controllers/certificateStatusCtrl.js +++ b/Apollo/assets/js/controllers/certificateStatusCtrl.js @@ -460,6 +460,11 @@ app.controller('certificateStatusCtrl', ["$scope", "toaster", "$filter", "ngTabl $scope.prevStatusListForStudentCourseLoading = false; $scope.prevStatusListForStudentCourse = response.data.preStatus_details_list; $scope.prevNoRecordFound = false; + + + console.log($scope.prevStatusListForStudentCourse) + + } else { $scope.prevStatusListForStudentCourseLoading = false; $scope.prevStatusListForStudentCourseNoRecord = true; diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index f5464221..4394b8fb 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -814,6 +814,9 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n "date":$filter('date')(new Date(), 'dd-MM-yyyy') }; + + + //console.log($scope.updateModel); /* $scope.billCurrentDate=$filter('date')(new Date(), 'dd-MM-yyyy'); alert($scope.billCurrentDate);*/ diff --git a/Apollo/assets/js/controllers/markcardStatusCtrl.js b/Apollo/assets/js/controllers/markcardStatusCtrl.js index 8fb63ce8..531e9989 100644 --- a/Apollo/assets/js/controllers/markcardStatusCtrl.js +++ b/Apollo/assets/js/controllers/markcardStatusCtrl.js @@ -242,7 +242,9 @@ app.controller('markcardStatusCtrl', ["$scope", "toaster", "$filter", "ngTablePa // Select one row in a table once $scope.setOneSelect = function (value) { - // alert(); + // alert(); + + // return false; angular.forEach($scope.searchResultDetails, function (item) { item.Selected = false; }); @@ -366,6 +368,9 @@ app.controller('markcardStatusCtrl', ["$scope", "toaster", "$filter", "ngTablePa // Update the status For Certification $scope.statusUpdate = { submit: function (form, myStatusModel, localBranchDetails) { + + // alert('in'); + // return false; var firstError = null; if (form.$invalid) { var field = null, firstError = null; diff --git a/Apollo/assets/views/partials/nav.html b/Apollo/assets/views/partials/nav.html index 0050c924..0936fc1e 100755 --- a/Apollo/assets/views/partials/nav.html +++ b/Apollo/assets/views/partials/nav.html @@ -1392,6 +1392,115 @@ + + + + +
  • + +
    +
    + +
    +
    + REPORTS +
    +
    +
    + +
  • + + + + + + + + +
  • diff --git a/Apollo/assets/views/status-update/updateFeesStatus.html b/Apollo/assets/views/status-update/updateFeesStatus.html index 1873e325..fdfcb2fb 100755 --- a/Apollo/assets/views/status-update/updateFeesStatus.html +++ b/Apollo/assets/views/status-update/updateFeesStatus.html @@ -189,7 +189,7 @@ + ng-model="updateModel.feesType.PayableFees" ng-pattern="/^[0-9]*$/" readonly/> Total amount is required @@ -283,7 +283,7 @@ - Total Payable:Rs.{{payableAmtInfo}} + Balance Payable Fee:Rs.{{payableAmtInfo}} Bill amount is required diff --git a/Apollo/assets/views/student/student_details.html b/Apollo/assets/views/student/student_details.html index 7001a8de..269b8850 100755 --- a/Apollo/assets/views/student/student_details.html +++ b/Apollo/assets/views/student/student_details.html @@ -279,7 +279,7 @@ - +
    diff --git a/Apollo/assets/views/student/student_details_SuperAdmin.html b/Apollo/assets/views/student/student_details_SuperAdmin.html index 465698ce..b9abaaf3 100755 --- a/Apollo/assets/views/student/student_details_SuperAdmin.html +++ b/Apollo/assets/views/student/student_details_SuperAdmin.html @@ -312,7 +312,7 @@ - +