diff --git a/Apollo/api/application/models/Data_correction.php b/Apollo/api/application/models/Data_correction.php index 179d3bd6..ac128551 100644 --- a/Apollo/api/application/models/Data_correction.php +++ b/Apollo/api/application/models/Data_correction.php @@ -30,20 +30,17 @@ group by Student_id,cid"; Public function getMobile($deleteNo=null,$mergeNo=null) { - $sql = "call SP_MERGE_STUDENT_DATA('".$deleteNo."','".$mergeNo."',@countRow); + $sql = "call SP_MERGE_STUDENT_DATA('".$deleteNo."','".$mergeNo."',@re_message); "; - $a=$this->db->query($sql); - $sqlOut = " select @countRow as counts;"; - $b=$this->db->query($sqlOut); - $batch = $b->result(); - //echo $batch[0]->counts; - if ($batch[0]->counts > 0) { + $a=$this->db->query($sql); + $sp_res = $a->result(); + + if ($sp_res[0]->re_message = 1) { $results['MergeStatus'] = true; - $results['after_Merge'] = $batch; - $results['message'] = 'Student details successfully merged'; + $results['message'] = 'Student merged Successfully'; } else { $results['MergeStatus'] = false; - $results['message'] = 'Can not Merge'; + $results['message'] = 'Can not merge'; } return $results; } 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 2a9f6068..2f7a686a 100644 --- a/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php +++ b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php @@ -860,7 +860,7 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model { } else{ - $arrayResultStudent['message']="This enrolment either don't register in student course or set fees.please check to update details."; + $arrayResultStudent['message']="This enrollment either don't registered in student course or set fees.please check to update details."; $arrayResultStudent['status']=false; } return $arrayResultStudent; @@ -1100,7 +1100,7 @@ $result['updatedraftStatus'] = false; // kdk public function getStudentUnivFormIdFeeDatailsList($reqBranchData, $searchDetails){ - $this->db->select('FUD.*, concat(ST.FirstName," ", ST.Lastname) as app_StudentName, IF(concat(ST.FirstName," " , ST.Lastname) = FUD.Student_Name, "YES", "NO") as StudentNameStatus , + $this->db->select('FUD.*, ST.MobileNumber, ST.StudentID, concat(ST.FirstName," ", ST.Lastname) as app_StudentName, IF(concat(ST.FirstName," " , ST.Lastname) = FUD.Student_Name, "YES", "NO") as StudentNameStatus , ST.Fathername as app_FatherName, IF(ST.Fathername = FUD.Father_Name, "YES", "NO") as FathernameStatus, CM.CourseCode as app_CourseCode, IF(CM.CourseCode = FUD.CourseCode, "YES", "NO" ) as CourseCodeStatus, IF(ENU.SemesterYear = FUD.Semester, "YES", "NO" ) as SemesterStatus'); @@ -1171,7 +1171,7 @@ $result['updatedraftStatus'] = false; // get formid status list for that particular record // kdk public function getFormIdDetailsStatusUpdateList($reqBranchData, $searchDetails){ - $selectQuery = "SELECT * , concat(t3.Firstname, '', t3.Lastname) as CreatedByName + $selectQuery = "SELECT t1.* , concat(t3.Firstname, '', t3.Lastname) as CreatedByName FROM T_FormId_FeeDetails_Received_From_University_StatusUpdate as t1 LEFT JOIN T_Login as t2 ON t1.CreatedBy = t2.ID LEFT JOIN T_StaffDetails as t3 ON t2.StaffID = t3.StaffID @@ -1197,6 +1197,8 @@ $result['updatedraftStatus'] = false; $newLeadDetails['FormIdDetailsID'] = $id; $newLeadDetails['FormID'] = $formId; $newLeadDetails['Status'] = $statusDetails['Status']; + $newLeadDetails['Comments'] = $statusDetails['Comments']; + $time = date('Y-m-d H:i:s'); $newLeadDetails['CreatedOn'] = $time; $newLeadDetails['CreatedBy'] = $reqBranchData['localUserID']; @@ -1360,7 +1362,7 @@ $result['updatedraftStatus'] = false; $this->db->join(FORMFEESRECEIVEDFROMUNIV.' as UNFR', 'UNFR.ID = UNCD.FormMapID','left'); $this->db->join(UNIVERSITYPAYMENT.' as UNP', 'UNP.PID = UNCD.PaymentMapID','left'); $this->db->join(ENROLMENTRECEIVEDFROMUNIV.' as ENU', 'ENU.FormID = UNFR.FormID','left'); - $this->db->order_by('UNCD.ApprovedDate','DESC'); + $this->db->order_by('UNCD.ApprovedDate','ASC'); $this->db->where('UNCD.UniversityCode',$search['UniversityCode']); $this->db->order_by('UNCD.UniversityName',$search['UniversityName']); $details = $this->db->get(); diff --git a/Apollo/api/application/models/Studentview_model.php b/Apollo/api/application/models/Studentview_model.php index 384bffba..bf5d2a51 100755 --- a/Apollo/api/application/models/Studentview_model.php +++ b/Apollo/api/application/models/Studentview_model.php @@ -73,13 +73,31 @@ class Studentview_model extends CI_Model $result['studentInfo'] = ""; } } + // requestedFrom 4 for based on form get student details + else if ($requestFrom =='4'){ + $this->db->select('ST.*'); + $this->db->from( LOGIN . ' as LO'); + $this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID'); + $this->db->join( STUDENTCOURSE . ' as STC', 'STC.StudentID = ST.StudentID'); + $this->db->where('ST.MobileNumber', $requestedBy); + $studentDetails = $this->db->get()->first_row(); + if($studentDetails){ + $result['studentStatus'] = true; + $result['studentDetails'] = $studentDetails; + // get student course details + $result['courseDetails'] = $this->getFormStudentCourse($studentDetails->StudentID,$requestFrom); + } + else{ + $result['studentStatus'] = false; + $result['studentInfo'] = ""; + } + } return $result; } public function getStudentCourseStudentLogin($studentId=null,$requestFrom=null,$requestedBranch=null,$accessFrom=null){ - // this sub query for avoid university duplicate id $this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName'); $this->db->from( STUDENTCOURSE . ' as SCU'); @@ -189,6 +207,53 @@ class Studentview_model extends CI_Model return $studentCourseStatus; } + /* + * get student course details + * created by kms + * */ + public function getFormStudentCourse($studentId=null,$requestFrom=null){ + $this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName'); + $this->db->from( STUDENTCOURSE . ' as SCU'); + $this->db->join( COURSE . ' as CU', 'CU.CourseID = SCU.CourseID'); + $this->db->join( UNIVERSITY . ' as US', 'US.UniversityID = SCU.UniversityID AND SCU.BranchID=US.BranchCode'); + $this->db->where('SCU.StudentID',$studentId); + $courseDetails = $this->db->get(); + if($courseDetails->result()){ + $studentCourseStatus['status'] = true; + foreach ($courseDetails->result() as $row){ + $fetchData['CourseID']=$row->CourseID; + $fetchData['CourseName']=$row->CourseName; + $fetchData['UniversityID']=$row->UniversityID; + $fetchData['UniversityName']=$row->UniversityName; + $fetchData['UniveShortName'] = $row->UniversityShortName; + // $fetchData['SessionName']=$row->SessionName; + $fetchData['EnrollmentID']=$row->EnrollmentID; + // get student fees details + $fetchData['feesDetails']=$this->getStudentFeesDetails($studentId,$row->CourseID); + // get student boollet details + $fetchData['studyMaterialDetails']=$this->getStudentMaterialDetails($studentId,$row->CourseID); + // get application details + if($requestFrom!='2'){ + $fetchData['applicationDetails']=$this->getStudentApplicationDetails($studentId,$row->CourseID); + $fetchData['answerbookletDetails']=$this->getStudentAnswerbookletDetails($studentId,$row->CourseID); + } + $fetchData['certificateDetails']=$this->getStudentCertificateDetails($studentId,$row->CourseID); + + // get student Mark crad details + $fetchData['markCardDetails']=$this->getMarkcardDetails($studentId,$row->CourseID); + + $CourseArray[]=$fetchData; + + + } + $studentCourseStatus['courseStatus'] = $CourseArray; + } + else{ + $studentCourseStatus['status'] = false; + } + + return $studentCourseStatus; + } /* * get student fees details diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json index 610733c7..a5c1a988 100755 --- a/Apollo/assets/i18n/en.json +++ b/Apollo/assets/i18n/en.json @@ -121,7 +121,7 @@ "formupload": { "MAIN": "UNIVERSITY FORMS", "ENROLLMENT": "Enrollment", - "STUDENTFEEDETAILCOMPARE": "Form Enrolment", + "STUDENTFEEDETAILCOMPARE": "Form Enrollment", "STUDENTFROMIDFEEDETAILS": "Form Fees", "UNIVERSITYFORMPAYMENT": "Payment" }, diff --git a/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js b/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js index 7b561b1e..f9668e5a 100644 --- a/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js +++ b/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js @@ -726,3 +726,134 @@ $scope.exportDataTab3 = function () { } }]); +/*modal controller + * */ +app.controller('studentModalDemoCtrl', ["$scope", "$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope, $rootScope, $modal, $log,apiPoint,$http) { + //Tooltip for print button + $scope.dynamicTooltip = 'Student View'; + + + + // $scope.items = ['item1', 'item2', 'item3']; + + $scope.open = function (studentDetails) { + // get student view details + var getcourse = { + method: 'POST', + url: apiPoint.url + 'getStudentBasicInfo/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + requestedBy :studentDetails.MobileNumber, + requestedFrom: 4, + branchCode : JSON.parse(localStorage.getItem('localObj')).localBranchID + + } + }; + $http(getcourse).then(function (response) { + + if (response.data.status == 200 && response.data.studentStatus== true) { + $scope.courseEditLoading = false; + // $scope.studentDetails = response.data.studentDetails; + $scope.studentDetails = response.data; + // $scope.courseDetails = response.data.courseDetails; + var modalInstance = $modal.open({ + templateUrl: 'assets/views/student/studentDetailsModal.html', + controller: 'ModalInstanceCtrl', + // size: size, + resolve: { + items: function () { + return $scope.studentDetails; + } + } + }); + + modalInstance.result.then(function (selectedItem) { + $scope.selected = selectedItem; + }, function () { + modalInstance.close(); + }); + + } else { + swal("Failed!", "This student is not registerd", "warning"); + $scope.courseEditLoading = false; + $scope.studentDetails = ""; + $scope.courseDetails = ""; + + } + }); + }; + $scope.open1 = function (values,type) { + + var modalInstance1 = $modal.open({ + templateUrl: 'assets/views/student/studentPaymentModal.html', + controller: 'ModalInstanceCtrl1', + // size: size, + resolve: { + items1: function () { + var myvalues = + { + "values":values, + "type":type + }; + return myvalues; + } + + } + }); + + modalInstance1.result.then(function (selectedItem) { + $scope.selected = selectedItem; + }, function () { + modalInstance1.close(); + }); + }; + $scope.printStudentDetails = function (details) { + $rootScope.pdfItems = details; + + var printInstance = $modal.open({ + templateUrl: 'assets/views/student/studentPdf.html', + controller: 'studentModalDemoCtrl', + }); + }; + // generate pdf for student view + $scope.export = function(getName) { + kendo.drawing.drawDOM($("#exportthis")).then(function(group) { + kendo.drawing.pdf.saveAs(group, getName+".pdf"); + }); + } + +}]); +// Please note that $modalInstance represents a modal window (instance) dependency. +// It is not the same as the $modal service used above. + +app.controller('ModalInstanceCtrl', ["$scope", "$modalInstance", "items","WordsService", function ($scope, $modalInstance, items,WordsService) { + + $scope.items = items; + $scope.selected = { + item: $scope.items[0] + }; + + $scope.ok = function () { + $modalInstance.close($scope.selected.item); + }; + + $scope.cancel = function () { + $modalInstance.dismiss('cancel'); + }; +}]); +app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1","WordsService", function ($scope, $modalInstance, items1,WordsService) { + + $scope.items1 = items1.values; + $scope.selectedtype = items1.type; + + $scope.ok = function () { + $modalInstance.close($scope.selected.item); + }; + + $scope.cancel = function () { + $modalInstance.dismiss('cancel'); + }; + +}]); diff --git a/Apollo/assets/js/controllers/student_university_fee_compare.js b/Apollo/assets/js/controllers/student_university_fee_compare.js index 7da5390d..66c211a4 100644 --- a/Apollo/assets/js/controllers/student_university_fee_compare.js +++ b/Apollo/assets/js/controllers/student_university_fee_compare.js @@ -4,7 +4,7 @@ * Simple table with sorting and filtering on AngularJS */ -app.controller('student_university_fee_compareCtrl', ["$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) { +app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', "flowFactory", "$interval", 'SweetAlert', '$modal', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window, flowFactory, $interval, SweetAlert, $modal) { /** * student university fee details compare */ @@ -408,7 +408,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil $scope.semList=[]; $scope.studentInfo=[]; if(entryModel=='' || entryModel==null || entryModel==undefined){ - swal("Warning","Please enter enrolment id", "error"); + swal("Warning","Please enter enrollment id", "error"); } else{ var getExistEnrol = { @@ -425,7 +425,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil $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"); + swal("Warning","In this enrollment have form id for all the semester", "warning"); } else{ $scope.studentInfo=response.data.StudentInfo; @@ -457,7 +457,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil * */ $scope.manualEnrolmentSubmit = function (form) { if($scope.manualEnModel.enrolmentNo=='' || $scope.manualEnModel.enrolmentNo==null || $scope.manualEnModel.enrolmentNo==undefined){ - swal("Wraning","Please enter enrolment id", "warning"); + swal("Wraning","Please enter enrollment id", "warning"); } else if($scope.manualEnModel.sem=='' || $scope.manualEnModel.sem==null){ @@ -499,4 +499,137 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil } + }]); +/*modal controller + * */ +app.controller('studentModalDemoCtrl', ["$scope", "$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope, $rootScope, $modal, $log,apiPoint,$http) { + //Tooltip for print button + $scope.dynamicTooltip = 'Student View'; + + + + // $scope.items = ['item1', 'item2', 'item3']; + + $scope.open = function (studentDetails) { + // get student view details + var getcourse = { + method: 'POST', + url: apiPoint.url + 'getStudentBasicInfo/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + requestedBy :studentDetails.MobileNumber, + requestedFrom: 4, + branchCode : JSON.parse(localStorage.getItem('localObj')).localBranchID + + } + }; + $http(getcourse).then(function (response) { + + if (response.data.status == 200 && response.data.studentStatus== true) { + $scope.courseEditLoading = false; + // $scope.studentDetails = response.data.studentDetails; + $scope.studentDetails = response.data; + // $scope.courseDetails = response.data.courseDetails; + var modalInstance = $modal.open({ + templateUrl: 'assets/views/student/studentDetailsModal.html', + controller: 'ModalInstanceCtrl', + // size: size, + resolve: { + items: function () { + return $scope.studentDetails; + } + } + }); + + modalInstance.result.then(function (selectedItem) { + $scope.selected = selectedItem; + }, function () { + modalInstance.close(); + }); + + } else { + swal("Failed!", "This student is not registerd", "warning"); + $scope.courseEditLoading = false; + $scope.studentDetails = ""; + $scope.courseDetails = ""; + + } + }); + }; + $scope.open1 = function (values,type) { + + var modalInstance1 = $modal.open({ + templateUrl: 'assets/views/student/studentPaymentModal.html', + controller: 'ModalInstanceCtrl1', + // size: size, + resolve: { + items1: function () { + var myvalues = + { + "values":values, + "type":type + }; + return myvalues; + } + + } + }); + + modalInstance1.result.then(function (selectedItem) { + $scope.selected = selectedItem; + }, function () { + modalInstance1.close(); + }); + }; + $scope.printStudentDetails = function (details) { + $rootScope.pdfItems = details; + + var printInstance = $modal.open({ + templateUrl: 'assets/views/student/studentPdf.html', + controller: 'studentModalDemoCtrl', + }); + }; + // generate pdf for student view + $scope.export = function(getName) { + kendo.drawing.drawDOM($("#exportthis")).then(function(group) { + kendo.drawing.pdf.saveAs(group, getName+".pdf"); + }); + } + +}]); +// Please note that $modalInstance represents a modal window (instance) dependency. +// It is not the same as the $modal service used above. + +app.controller('ModalInstanceCtrl', ["$scope", "$modalInstance", "items","WordsService", function ($scope, $modalInstance, items,WordsService) { + + $scope.items = items; + $scope.selected = { + item: $scope.items[0] + }; + + $scope.ok = function () { + $modalInstance.close($scope.selected.item); + }; + + $scope.cancel = function () { + $modalInstance.dismiss('cancel'); + }; +}]); +app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1","WordsService", function ($scope, $modalInstance, items1,WordsService) { + + $scope.items1 = items1.values; + $scope.selectedtype = items1.type; + + $scope.ok = function () { + $modalInstance.close($scope.selected.item); + }; + + $scope.cancel = function () { + $modalInstance.dismiss('cancel'); + }; + +}]); + diff --git a/Apollo/assets/js/directives/compare-to.js b/Apollo/assets/js/directives/compare-to.js index 5b4ddb8d..1ec7a225 100755 --- a/Apollo/assets/js/directives/compare-to.js +++ b/Apollo/assets/js/directives/compare-to.js @@ -48,4 +48,22 @@ app.directive('disallowSpaces', function() { }); } }; +}); +app.filter('unique', function() { + return function(collection, primaryKey, secondaryKey) { //optional secondary key + var output = [], + keys = []; + + angular.forEach(collection, function(item) { + var key; + secondaryKey === undefined ? key = item[primaryKey] : key = item[primaryKey][secondaryKey]; + + if(keys.indexOf(key) === -1) { + keys.push(key); + output.push(item); + } + }); + + return output; + }; }); \ No newline at end of file diff --git a/Apollo/assets/views/student/studentUnivFeeCompareDetails.html b/Apollo/assets/views/student/studentUnivFeeCompareDetails.html index 08d5c891..172b4636 100644 --- a/Apollo/assets/views/student/studentUnivFeeCompareDetails.html +++ b/Apollo/assets/views/student/studentUnivFeeCompareDetails.html @@ -43,7 +43,7 @@
| FormID + | Form ID | Enrollment ID | @@ -239,15 +239,13 @@||
|---|---|---|---|---|
| - {{p.FormID}} - | +{{p.FormID}} | {{p.EnrolmentNo}} | {{p.FormType}} |
-
+
{{p.Firstname}} {{p.Lastname}}
@@ -295,7 +293,7 @@
- |