diff --git a/Apollo/api/application/controllers/HallTickets_Controller.php b/Apollo/api/application/controllers/HallTickets_Controller.php index 512c022d..2b8e4480 100644 --- a/Apollo/api/application/controllers/HallTickets_Controller.php +++ b/Apollo/api/application/controllers/HallTickets_Controller.php @@ -513,9 +513,10 @@ class HallTickets_Controller extends REST_Controller { } - public function getAllSemesterSubjects_get() + public function getAllSemesterSubjects_post() { - $branchId = $this->post('branchId'); + $branchId = $this->post('BranchID'); + //echo $branchId; die(); $res = $this->Hallticket_model->getAllSemesterSubjectsmodel($branchId); //$result_array = array(); diff --git a/Apollo/api/application/models/Employee_model.php b/Apollo/api/application/models/Employee_model.php index 721f92bc..9e4faa03 100755 --- a/Apollo/api/application/models/Employee_model.php +++ b/Apollo/api/application/models/Employee_model.php @@ -277,8 +277,8 @@ class Employee_model extends CI_Model public function get_req_master_branch_detail($reqRoleId, $reqUserID,$branchId) { - $listcode="R003"; - if ($reqRoleId == SUPER_ADMIN) { + //$listcode="R002"; + if ($reqRoleId == SUPER_ADMIN ) { // res for SuperAdmin $this->db->select('BranchCode, BranchName'); $this->db->from(BRANCH); @@ -286,9 +286,10 @@ class Employee_model extends CI_Model $mBranchDetails = $this->db->get(); $results['MeasterBranchDetailStatus'] = true; $results['branch_details'] = $mBranchDetails->result(); - } else { - // res for Admin - $staffId = $this->selfGetEmpId($reqUserID); + } //else { + /////// res for Admin////////////// + // $staffId = $this->selfGetEmpId($reqUserID); + //$reqRoleId =$this-> // $subQuery = "SELECT t1.BranchCode, t1.BranchName // FROM T_BranchMaster as t1 // LEFT JOIN T_Staff_BranchAccess as t2 ON t2.StaffID = '$staffId' @@ -299,19 +300,25 @@ class Employee_model extends CI_Model // group by t1.BranchCode"; - $subQuery="SELECT t1.BranchCode, t1.BranchName - FROM T_BranchMaster as t1 - LEFT JOIN T_Staff_BranchAccess as t2 ON t2.BranchCode = t1.BranchCode - WHERE t2.StaffID='$staffId' and t2.ListCode='$listcode' AND t1.IsActive = 1 AND t2.IsActive = 1 group by t1.BranchCode"; + // $subQuery="SELECT t1.BranchCode, t1.BranchName + // FROM T_BranchMaster as t1 + // LEFT JOIN T_Staff_BranchAccess as t2 ON t2.BranchCode = t1.BranchCode + // WHERE t2.StaffID='$staffId' and t2.ListCode='$listcode' AND t1.IsActive = 1 AND t2.IsActive = 1 group by t1.BranchCode"; - $mBranchDetails = $this->db->query($subQuery); + // $mBranchDetails = $this->db->query($subQuery); + // $results['MeasterBranchDetailStatus'] = true; + // $results['branch_details'] = $mBranchDetails->result(); + // } + if ($reqRoleId == ADMIN ) { + // res for SuperAdmin + $this->db->select('BranchCode, BranchName'); + $this->db->from(BRANCH); + $this->db->where('IsActive', 1); + $mBranchDetails = $this->db->get(); $results['MeasterBranchDetailStatus'] = true; $results['branch_details'] = $mBranchDetails->result(); - } - - - // print_r($this->db->last_query());die(); + } return $results; } @@ -609,6 +616,8 @@ class Employee_model extends CI_Model // $this->db->where('t1.IsActive', 1); $branchDetails = $this->db->get(); $branchArr = $branchDetails->result(); + + //print_r($this->db->last_query());die(); if( count($branchArr) > 0 ) { $result['empBranchDetails'] = true; $result['branch_details'] = $branchArr; diff --git a/Apollo/api/application/models/Hallticket_model.php b/Apollo/api/application/models/Hallticket_model.php index d0a1ec91..4952738f 100644 --- a/Apollo/api/application/models/Hallticket_model.php +++ b/Apollo/api/application/models/Hallticket_model.php @@ -602,8 +602,10 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) $this->db->join('T_UniversityMaster','T_SemSubMap_Master.UniversityID=T_UniversityMaster.UniversityID and T_SemSubMap_Master.BranchCode=T_UniversityMaster.BranchCode') ; $this->db->join('T_CourseMaster','T_SemSubMap_Master.CourseID=T_CourseMaster.CourseID and T_SemSubMap_Master.BranchCode=T_CourseMaster.BranchCode'); $this->db->join('T_Course_Fees_Details','T_SemSubMap_Master.CourseID=T_Course_Fees_Details.CourseID and T_CourseMaster.CourseID=T_Course_Fees_Details.CourseID'); + $this->db->WHERE('T_SemSubMap_Master.BranchCode',$branchId); $this->db->group_by('T_SemSubMap_Master.UniversityID,T_SemSubMap_Master.CourseID'); $res = $this->db->get(); + //echo $this->db->last_query(); return $res->result(); @@ -621,7 +623,7 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) $this->db->where('T_SemSubMap_Master.UniversityID',$universityID); $this->db->where('T_SemSubMap_Master.CourseID',$courseID); $this->db->where('T_SemSubMap_Master.BranchCode',$branchId); - + //echo $this->db->last_query(); //$this->db->group_by('T_SemSubMap_Master.UniversityID,T_SemSubMap_Master.CourseID'); $res1 = $this->db->get(); $res['mappedSubjects'] = $res1->result(); @@ -634,7 +636,7 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) $this->db->where('T_SubjectMaster.BranchCode',$branchId); $result = $this->db->get(); $res['overAllSubjects'] = $result->result(); - + //echo $this->db->last_query(); die(); return $res; } @@ -849,9 +851,11 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) { $this->db->distinct(); - $this->db->select('T_StudentDetails.StudentID,T_StudentDetails.MobileNumber,T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails.EmailID,T_StudentDetails.ProfilePicPath,T_Student_CourseDetails.EnrollmentID,T_Hallticket_Master.HallTicket_ID,T_Hallticket_Student_Details.HallTicket_ID as isFlag'); + $this->db->select('T_StudentDetails.StudentID,T_StudentDetails.MobileNumber,T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails.EmailID,T_StudentDetails.ProfilePicPath,T_Student_CourseDetails.EnrollmentID,T_Hallticket_Master.HallTicket_ID,T_Hallticket_Student_Details.HallTicket_ID as isFlag,BalFees.balpayable'); $this->db->from('T_Students_Fees_Status'); $this->db->join('T_StudentDetails','T_Students_Fees_Status.StudentID=T_StudentDetails.StudentID and T_StudentDetails.IsActive = 1'); + $this->db->join('BalFees','BalFees.student =T_Students_Fees_Status.StudentID and BalFees.course = T_Students_Fees_Status. CourseID and BalFees.branchCode = T_Students_Fees_Status.BranchCode'); + $this->db->join('T_Student_CourseDetails','T_StudentDetails.StudentID = T_Student_CourseDetails.StudentID and T_Students_Fees_Status.CourseID = T_Student_CourseDetails.CourseID'); $this->db->join('T_Hallticket_Master','T_Students_Fees_Status.CourseID = T_Hallticket_Master.CourseID and T_Students_Fees_Status.BatchCode = T_Hallticket_Master.BatchCode and T_Students_Fees_Status.BranchCode = T_Hallticket_Master.BranchCode and T_Hallticket_Master.CenterID='.$center['CenterID'],'left'); $this->db->join('T_Hallticket_Student_Details','T_Hallticket_Master.HallTicket_ID = T_Hallticket_Student_Details.HallTicket_ID and T_Students_Fees_Status.StudentID = T_Hallticket_Student_Details.StudentID','left'); @@ -880,6 +884,7 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) $studetdetails['EnrollmentID'] = $r->EnrollmentID; $studetdetails['HallTicketMasterID'] = $r->HallTicket_ID; $studetdetails['isFlag'] = $r->isFlag; + $studetdetails['balpayable'] =$r->balpayable; $studetdetails['FeeDetails'] = $this->getFeeSemesterDetails($r->StudentID,$batch,$branchId,$courseID); $result_array[] = $studetdetails; $prestu = $r->StudentID; @@ -887,6 +892,8 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) } } + + //print_r($this->db->last_query());// die(); return $result_array; } diff --git a/Apollo/assets/js/controllers/employeeCtrl.js b/Apollo/assets/js/controllers/employeeCtrl.js index c9618f74..236ced4f 100755 --- a/Apollo/assets/js/controllers/employeeCtrl.js +++ b/Apollo/assets/js/controllers/employeeCtrl.js @@ -189,7 +189,7 @@ app.controller('staffCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$ $scope.empAddNewBranchView = false; $scope.getEmpBranchDetails = function (id) { - // alert(id); + // alert(id); $scope.empEditBranchDetails = { 'ID': '', 'StaffID': '', diff --git a/Apollo/assets/js/controllers/generateHallTicketCtrl.js b/Apollo/assets/js/controllers/generateHallTicketCtrl.js index 3011c297..8da2b931 100755 --- a/Apollo/assets/js/controllers/generateHallTicketCtrl.js +++ b/Apollo/assets/js/controllers/generateHallTicketCtrl.js @@ -36,6 +36,7 @@ $scope.generateButtonStatus = false; $scope.reverse = !$scope.reverse; //if true make it false and vice versa } + /* * init function * created by kms @@ -346,10 +347,154 @@ $scope.generateButtonStatus = false; $scope.selectedBatchName = batch.options[batch.selectedIndex].text; }; - + +}]); +/*modal controller + * */ +app.controller('studentModalDemoCtrl', ["$scope", "$modal", "$log", "API_POINTS", "$http", function ($scope, $modal, $log,apiPoint,$http) { + //Tooltip for print button + $scope.dynamicTooltip = 'Student View'; + + + + // $scope.items = ['item1', 'item2', 'item3']; + + $scope.open = function (studentDetails) { + + + + $scope.Currentdate = new Date(); + + console.log($scope.Currentdate); + // get student view details + var getcourse = { + method: 'POST', + url: apiPoint.url + 'getStudentBasicInfo/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + requestedBy :studentDetails.MobileNumber, + requestedFrom: 3, + 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 () { + $log.info('Modal dismissed at: ' + new Date()); + }); + + } 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 () { + $log.info('Modal dismissed at: ' + new Date()); + }); + }; + }]); +// 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'); + }; + + +}]); +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; + }; +}); // Controller for Hallticket Modal PDF app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", function ($scope, $modalInstance, pdfitems) { @@ -1014,6 +1159,7 @@ app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", fun });//END of For Each } + $scope.ok = function () { $modalInstance.close($scope.selected.item); diff --git a/Apollo/assets/js/controllers/semcoursemapCtrl.js b/Apollo/assets/js/controllers/semcoursemapCtrl.js index 642ad250..d93a41b3 100755 --- a/Apollo/assets/js/controllers/semcoursemapCtrl.js +++ b/Apollo/assets/js/controllers/semcoursemapCtrl.js @@ -123,14 +123,15 @@ app.controller('semcoursemapCtrl', ["$scope","$rootScope","toaster", "$filter", //For Get All Semesters and Subjetcs Info for View and Edit var getAllSemSubjects = { - method: 'GET', + method: 'POST', url: apiPoint.url + 'getAllSemSubjects/', headers: { 'Content-Type': 'application/json' }, data: { - BranchID: JSON.parse(localStorage.getItem('localObj')).localUserID, + BranchID: JSON.parse(localStorage.getItem('localObj')).localBranchID, } + }; $http(getAllSemSubjects).then(function (response) { diff --git a/Apollo/assets/views/hallticket/generatehallticket.html b/Apollo/assets/views/hallticket/generatehallticket.html index c5971a03..2bce64bb 100755 --- a/Apollo/assets/views/hallticket/generatehallticket.html +++ b/Apollo/assets/views/hallticket/generatehallticket.html @@ -124,10 +124,10 @@
- +
- + @@ -141,6 +141,10 @@ + + @@ -152,11 +156,25 @@ - - + + + + + - + + diff --git a/Apollo/assets/views/student/studentDetailsModal.html b/Apollo/assets/views/student/studentDetailsModal.html index 0673b25f..fd1cb4bc 100755 --- a/Apollo/assets/views/student/studentDetailsModal.html +++ b/Apollo/assets/views/student/studentDetailsModal.html @@ -41,7 +41,7 @@
- +

{{items.studentDetails.Firstname}} {{items.studentDetails.Lastname}}

Student Name Balance + + Status
{{p.Firstname}}{{p.Lastname}} +
+
+
+ + {{p.Firstname}}{{p.Lastname}} + {{p.EnrollmentID}}{{p.MobileNumber}} + + {{p.MobileNumber}} + + {{p.EmailID}}{{p.balpayable}} GENERATED