diff --git a/Apollo/api/application/config/database.php b/Apollo/api/application/config/database.php index 7741a6d9..ed22f21b 100755 --- a/Apollo/api/application/config/database.php +++ b/Apollo/api/application/config/database.php @@ -76,13 +76,13 @@ $query_builder = TRUE; $db['default'] = array( 'dsn' => '', 'hostname' => 'apollodec.com', - 'username' => 'apollod4_DEV', - 'password' => 'apollo1234', - 'database' => 'apollod4_ApolloDECDev', + // 'username' => 'apollod4_DEV', + // 'password' => 'apollo1234', + // 'database' => 'apollod4_ApolloDECDev', - // 'username' => 'apollod4_SIT', - // 'password' => 'apollosit1234', - // 'database' => 'apollod4_ApolloDECNEWSIT', + 'username' => 'apollod4_SIT', + 'password' => 'apollosit1234', + 'database' => 'apollod4_ApolloDECNEWSIT', // 'username' => 'apollod4_PROD', // 'password' => 'approd!2017', diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index 79bdc963..9599e408 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -353,6 +353,7 @@ $route['getCenterDetails'] = 'Center_Controller/getCenterDetails'; //subject $route['getSubjectDetails'] = 'Subject_Controller/getSubjectDetails'; +$route['getSubjectDetails1'] = 'Subject_Controller/getSubjectDetails1'; $route['updateSubjectDetails'] = 'Subject_Controller/updateSubjectDetails'; $route['addSubjectDetails'] = 'Subject_Controller/addSubjectDetails'; diff --git a/Apollo/api/application/controllers/Dashboard_Controller.php b/Apollo/api/application/controllers/Dashboard_Controller.php index 4dd3da9f..54bd5bb3 100755 --- a/Apollo/api/application/controllers/Dashboard_Controller.php +++ b/Apollo/api/application/controllers/Dashboard_Controller.php @@ -475,7 +475,10 @@ class Dashboard_Controller extends REST_Controller { //To filters public function filterYear_post(){ $branch = $this->post('branchId'); - $filterYear = $this->dashboard_model->getYear($branch); + $univ =$this->post('univ'); + + //print_r($univ); + $filterYear = $this->dashboard_model->getYear($branch,$univ); if ($filterYear) { $filterYear['status'] = REST_Controller::HTTP_OK; // Set the response and exit diff --git a/Apollo/api/application/controllers/Subject_Controller.php b/Apollo/api/application/controllers/Subject_Controller.php index cd87d7f6..94ce1f4f 100755 --- a/Apollo/api/application/controllers/Subject_Controller.php +++ b/Apollo/api/application/controllers/Subject_Controller.php @@ -18,7 +18,7 @@ class Subject_Controller extends REST_Controller { $this->methods['addSubjectDetails_delete']['limit'] = 50; // 50 requests per hour per user/key $this->methods['getSubjectDetails_post']['limit'] = 500; // 50 requests per hour per user/key $this->methods['updateSubjectDetails_post']['limit'] = 500;// 500 requests per hour per user/key - + $this->methods['getSubjectDetails1_post']['limit'] =500; // load the model $this->load->model('Subject_model', 'subject_model'); @@ -128,6 +128,32 @@ class Subject_Controller extends REST_Controller { } + } + public function getSubjectDetails1_post() + { + $requestedBy = $this->post('requestedBy'); + $branchCode = $this->post('branchCode'); + + $getSubject = $this->subject_model->getSubject1($requestedBy,$branchCode); + + + + if ($getSubject) + { + $getSubject['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getSubject, 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 + } + + } diff --git a/Apollo/api/application/models/Dashboard_model.php b/Apollo/api/application/models/Dashboard_model.php index 94b170b5..61a5a499 100755 --- a/Apollo/api/application/models/Dashboard_model.php +++ b/Apollo/api/application/models/Dashboard_model.php @@ -933,18 +933,25 @@ and BranchCode ='".$branchId."' and UniversityID ='".$univ."'"; return $results; } //To Filters - public function getYear($branch = null){ + public function getYear($branch = null,$univ = null){ $sql = "select year(CreatedOn) as year from T_StudentDetails where year(CreatedOn) != 0 group by year "; $ltd=$this->db->query($sql); $year = $ltd->result(); - //get batch - $brsql = "select BatchCode,BatchName from T_BatchMaster "; - $brf=$this->db->query($brsql); - $branchf = $brf->result(); + //get university - $usql = "select UniversityID,UniversityName from T_UniversityMaster group by UniversityID "; + $usql = "select UniversityID,UniversityName from T_UniversityMaster where BranchCode ='".$branch."' "; $uf=$this->db->query($usql); $univf = $uf->result(); + + + + //get batch + $brsql = "select BatchCode,BatchName from T_BatchMaster + + where BranchCode ='".$branch."' and UniversityID ='".$univ."'"; + $brf=$this->db->query($brsql); + $branchf = $brf->result(); + //get fiscal $ysql = "SELECT CASE WHEN MONTH(CreatedOn)>=6 THEN concat(YEAR(CreatedOn), '-',YEAR(CreatedOn)+1) diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index 92537820..4fb4a8be 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -1197,7 +1197,7 @@ $query = $this->db->query($subQuery,array('%d-%m-%Y')); $fromd= date("Y-m-d",strtotime($start_date)); $tod=date("Y-m-d",strtotime($end_date)); - //echo $det['branchId'];die() ; + //echo $det['branchId'];die() ; sum(a.BillAmount) AS Total, $this->db->select('d.UniversityID,UniversityName, sum(IF(ModeOfPayment ="CASH", BillAmount, 0)) AS Cash, @@ -1206,7 +1206,7 @@ $query = $this->db->query($subQuery,array('%d-%m-%Y')); sum(IF(ModeOfPayment ="ONLINE TRANSACTION", BillAmount, 0)) AS Onlinec, sum(IF(ModeOfPayment ="WAIVER",BillAmount, 0)) AS WAIVER, sum(IF(ModeOfPayment ="Credit/Debit Card",BillAmount, 0)) AS Card, - sum(a.BillAmount) AS Total,a.CreatedOn'); + a.CreatedOn'); $this->db->from('T_Students_Fees_PaidDetails a'); $this->db->join('T_Students_Fees_Status b','b.FeesId = a.FeesID','left'); $this->db->join('T_CourseMaster c','c.CourseID = b.CourseID','left'); @@ -1251,7 +1251,7 @@ if($feeDetails) } - // print_r( $this->db->last_query()); + // print_r( $this->db->last_query()); // die(); diff --git a/Apollo/api/application/models/Subject_model.php b/Apollo/api/application/models/Subject_model.php index cdc61da0..1e94a12b 100755 --- a/Apollo/api/application/models/Subject_model.php +++ b/Apollo/api/application/models/Subject_model.php @@ -84,11 +84,13 @@ public function updateSubject($arrayDetails=null,$SubjectID=null) public function getSubject($requestedBy=null,$branchCode=null) { $this->db->select('*'); + $this->db->where('Isactive','1'); $this->db->where('BranchCode',$branchCode); + $this->db->order_by('SubjectID','DESC'); $subjectDetails = $this->db->get(SUBJECTMASTER); - + // print_r($this->db->last_query());die(); if($subjectDetails->result()){ $result['SubjectStatus'] = true; @@ -99,6 +101,31 @@ public function updateSubject($arrayDetails=null,$SubjectID=null) $result['message'] = "No records found!"; } + + return $result; + + } + public function getSubject1($requestedBy=null,$branchCode=null) + { + $this->db->select('*'); + $this->db->where('BranchCode',$branchCode); + //$this->db->where('Isactive' !='0'); + $this->db->order_by('SubjectID','DESC'); + $subjectDetails = $this->db->get(SUBJECTMASTER); + + + + if($subjectDetails->result()){ + + $result['SubjectStatus'] = true; + $result['details'] = $subjectDetails->result(); + } + else { + $result['SubjectStatus'] = false; + $result['message'] = "No records found!"; + } + + return $result; } diff --git a/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js b/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js index b9f84ed6..89b59abf 100644 --- a/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js +++ b/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js @@ -202,6 +202,8 @@ $scope.tod = to_dt; $scope.isLoaderShow=false; $scope.isLoaderShow1 =false; $scope.Totalfee =0; + // $scope.cash=0; + // $scope.C console.log($scope.newreglist); @@ -209,9 +211,11 @@ $scope.tod = to_dt; angular.forEach(($scope.newreglist),function(newreglist,key) { - console.log(newreglist) + //console.log(newreglist) - $scope.Totalfee= parseFloat($scope.Totalfee)+parseFloat(newreglist.Total); + $scope.Totalfee= parseFloat($scope.Totalfee)+ parseFloat(newreglist.Cash)+parseFloat(newreglist.Cheque)+parseFloat(newreglist.Onlinec)+parseFloat(newreglist.Card); + //console.log( $scope.Totalfee); + }); } diff --git a/Apollo/assets/js/controllers/dashboardCtrl.js b/Apollo/assets/js/controllers/dashboardCtrl.js index c125583e..5ebd66c7 100755 --- a/Apollo/assets/js/controllers/dashboardCtrl.js +++ b/Apollo/assets/js/controllers/dashboardCtrl.js @@ -104,22 +104,42 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " }); }; + + + + + //this function used to filter the university + var univb ; + +$scope.get_uni = function() + { + + //console.log($scope.filters.univ); + univb = $scope.filters.univ; + console.log(univb) + } /*For dashboard tab*/ //To filters + $scope.filters = { "year": "", "month": "", "batch": "", "univ": "", "fout_univ": "", - "fout_year": "" + "fout_year": "", + //"univb": "" , } //to store filter data $scope.year = ''; $scope.branch = ''; $scope.univ = ''; $scope.fyr = ''; + $scope.batch =''; + // $scope.univb='', + + var fYear = { method: 'POST', url: apiPoint.url + 'filterYear/', @@ -129,7 +149,8 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " data: { requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID, branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID, - requestedDept: JSON.parse(localStorage.getItem('localObj')).localType + requestedDept: JSON.parse(localStorage.getItem('localObj')).localType, + batch: JSON.parse(localStorage.getItem('localObj')).localBatch, } }; @@ -139,6 +160,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " $scope.branch = response.data.branch; $scope.univ = response.data.univ; $scope.fyr = response.data.fyr; + $scope.batch =response.data.batch; // console.log($scope.branch); } else { @@ -471,6 +493,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " } }; + $http(admissionMonth).then(function (response) { if (response.data.lList == true) { @@ -906,6 +929,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " data: { requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID, branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID, + batch:$scope.filters.batch, univ: $scope.filters.univ } @@ -934,6 +958,14 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " // scrolling: { // mode: "virtual" // }, + fieldPanel: { + showColumnFields: true, + showDataFields: true, + showFilterFields: true, + showRowFields: true, + allowFieldDragging: true, + visible: true + }, "export": { enabled: true, fileName: "AdmissionsBatch" @@ -1025,7 +1057,14 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " fieldChooser: { enabled: false }, - +fieldPanel: { + showColumnFields: true, + showDataFields: true, + showFilterFields: true, + showRowFields: true, + allowFieldDragging: true, + visible: true + }, "export": { enabled: true, fileName: "AdmissionsBatch" @@ -2080,8 +2119,8 @@ app.controller('ModalInstanceCtrl', ["$scope", "$modalInstance", "items", "Words $scope.cancel = function () { $modalInstance.dismiss('cancel'); }; - - + + }]); app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "WordsService", function ($scope, $modalInstance, items1, WordsService) { diff --git a/Apollo/assets/js/controllers/subjectCtrl.js b/Apollo/assets/js/controllers/subjectCtrl.js index 9cc1466d..1f0e427f 100755 --- a/Apollo/assets/js/controllers/subjectCtrl.js +++ b/Apollo/assets/js/controllers/subjectCtrl.js @@ -218,9 +218,8 @@ app.controller('subjectCtrl', ["$scope", "$rootScope","toaster", "$filter", "ngT - $scope.loader=''; - - var getsubject = { + $scope.loader=''; + var getsubject = { method: 'POST', url: apiPoint.url + 'getSubjectDetails/', headers: { @@ -251,9 +250,88 @@ app.controller('subjectCtrl', ["$scope", "$rootScope","toaster", "$filter", "ngT } }); + + + + $scope.deactivevalue = 0; + + /*De Active */ + $scope.deact = function (){ + + //if(deactivevalue ==0){ + + $scope.loader=''; + + var getsubject = { + method: 'POST', + url: apiPoint.url + 'getSubjectDetails1/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID, + branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID + + } + }; + + $http(getsubject).then(function (response) { + if (response.data.status==200 && response.data.SubjectStatus) { + + $scope.emptyData=true; + $scope.loader=true; + $scope.data = response.data.details; + + } else { + $scope.emptyData=false; + $scope.loader=true; + $scope.data = response.data.details; + + + + + } + + }); + + + // }else { + // var getsubject = { + // method: 'POST', + // url: apiPoint.url + 'getSubjectDetails/', + // headers: { + // 'Content-Type': 'application/json' + // }, + // data: { + // requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID, + // branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID + + // } + // }; + + // $http(getsubject).then(function (response) { + // if (response.data.status==200 && response.data.SubjectStatus) { + + // $scope.emptyData=true; + // $scope.loader=true; + // $scope.data = response.data.details; + + // } else { + // $scope.emptyData=false; + // $scope.loader=true; + // $scope.data = response.data.details; + + + + + // } + + // }); + //} + } }; - + diff --git a/Apollo/assets/views/dashboard_tile3.html b/Apollo/assets/views/dashboard_tile3.html index 44def162..970d8e9c 100644 --- a/Apollo/assets/views/dashboard_tile3.html +++ b/Apollo/assets/views/dashboard_tile3.html @@ -113,14 +113,28 @@ University
- - + + + + + + + + + + + + + + +
diff --git a/Apollo/assets/views/feecollected.html b/Apollo/assets/views/feecollected.html index b4bd7b8d..757930ed 100644 --- a/Apollo/assets/views/feecollected.html +++ b/Apollo/assets/views/feecollected.html @@ -177,27 +177,30 @@ University Cash Cheque - Referral + Online Transaction - Waiver + Credit/Debit Card Total - + Waiver + Referral + {{p.UniversityName}} {{p.Cash}} {{p.Cheque}} - {{p.Referal}} + {{p.Onlinec}} - {{p.WAIVER}} + {{p.Card}} - {{p.Total}} - + {{p.Card -- p.Cash -- p.Cheque -- p.Onlinec }} + {{p.WAIVER}} + {{p.Referal}} @@ -208,7 +211,7 @@ style="font-size:35px;" --> - Total + Total {{Totalfee}} diff --git a/Apollo/assets/views/subjectMaster.html b/Apollo/assets/views/subjectMaster.html index e5f66e79..ec581725 100755 --- a/Apollo/assets/views/subjectMaster.html +++ b/Apollo/assets/views/subjectMaster.html @@ -52,6 +52,11 @@ id="search" autofocus tabindex="1" placeholder="Search"/>

+ +
+ + Show In-Active
+
@@ -81,7 +86,7 @@ {{p.SubjectCode}} {{p.SubjectName}} - Active De-Active + Active In-Active