fees changes

This commit is contained in:
gandhimathi 2018-08-31 19:17:22 +05:30
parent a50bc68d65
commit 27ce70eb22
5 changed files with 123 additions and 35 deletions

View File

@ -348,4 +348,5 @@ $route['receiveEnrolmentFromUniv'] = 'Receive_Enrolment_Fees_Univ_Controller/rec
$route['insertFormIdUnivFeeDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/insertFormIdUnivFeeDetails'; $route['insertFormIdUnivFeeDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/insertFormIdUnivFeeDetails';
$route['getStudentUnivFeeCompareDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getStudentUnivFeeCompareDetails'; $route['getStudentUnivFeeCompareDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getStudentUnivFeeCompareDetails';
$route['formIDFeeCompareDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/formIDFeeCompareDetails'; $route['formIDFeeCompareDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/formIDFeeCompareDetails';
$route['getUnmatchedRecordDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getUnmatchedRecordDetails'; $route['getUnmatchedRecordDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getUnmatchedRecordDetails';
$route['getUniversitySessionDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getUniversitySessionDetails';

View File

@ -33,6 +33,8 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller {
// Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php
$this->methods['receiveEnrolmentFromUniv_post']['limit'] = 500; // 500 requests per hour per user/key $this->methods['receiveEnrolmentFromUniv_post']['limit'] = 500; // 500 requests per hour per user/key
$this->methods['formIDFeeCompareDetails_post']['limit'] = 500; $this->methods['formIDFeeCompareDetails_post']['limit'] = 500;
$this->methods['getUniversitySessionDetails_post']['limit'] = 500;
// load the model // load the model
$this->load->model('Receive_Enrolment_Fees_Univ_model', 'receive_model'); $this->load->model('Receive_Enrolment_Fees_Univ_model', 'receive_model');
@ -103,9 +105,9 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller {
$searchData = $this->post('search'); $searchData = $this->post('search');
$univID = $searchData['University']; $univID = $searchData['University'];
$courseID = $searchData['Course']; $sessionID = $searchData['Session'];
$getUnivStudentFeeCompare = $this->receive_model->getStudentUnivFeeCompareDetails($univID,$courseID);// Check if the users data store contains users (in case the database result returns NULL) $getUnivStudentFeeCompare = $this->receive_model->getStudentUnivFeeCompareDetails($univID,$sessionID);// Check if the users data store contains users (in case the database result returns NULL)
if ($getUnivStudentFeeCompare) if ($getUnivStudentFeeCompare)
{ {
$getUnivStudentFeeCompare['status'] = REST_Controller::HTTP_OK; $getUnivStudentFeeCompare['status'] = REST_Controller::HTTP_OK;
@ -170,5 +172,27 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller {
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
} }
} }
public function getUniversitySessionDetails_post(){
$reqData = $this->post('data');
$loginUserId = $reqData['localUserID'];
$loginUserBranchId = $reqData['localBranchID'];
$loginUserType = $reqData['localType'];
$getUniversityListDetails = $this->receive_model->getUniversitySessionList($loginUserBranchId); // Check if the employee exist
if ($getUniversityListDetails['status']) {
// $getUniversityListDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getUniversityListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else if($getUniversityListDetails['status']==false){
$this->response(['message' => 'No list were found', 'status' => false], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
else {
// Set the response and exit
$this->response(['message' => 'No list were found', 'status' => false], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
} }

View File

@ -453,15 +453,16 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model {
return $results; return $results;
} }
public function getStudentUnivFeeCompareDetails($univCode=null,$courseCode=null){ public function getStudentUnivFeeCompareDetails($univCode=null,$session=null){
$this->db->select('t1.FormID, t1.FormType, t1.SemesterYear, t1.EnrolmentNo,t1.CourseName,t1.RollNo, t4.*,t5.UniversityID, t5.UniversityName,t3.CourseID,t2.Amount as UniversityPaidAmount'); $this->db->select('t1.FormID, t1.FormType, t1.SemesterYear, t1.EnrolmentNo,t1.CourseName,t1.RollNo, t4.*,t5.UniversityID, t5.UniversityName,t3.CourseID,t2.Amount as UniversityPaidAmount');
$this->db->from(ENROLMENTRECEIVEDFROMUNIV.' as t1'); $this->db->from(ENROLMENTRECEIVEDFROMUNIV.' as t1');
$this->db->join(STUDENTCOURSE.' as t3', 't3.EnrollmentID = t1.EnrolmentNo'); $this->db->join(STUDENTCOURSE.' as t3', 't3.EnrollmentID = t1.EnrolmentNo');
$this->db->join(STUDENTS.' as t4', 't4.StudentID = t3.StudentID'); $this->db->join(STUDENTS.' as t4', 't4.StudentID = t3.StudentID');
$this->db->join(UNIVERSITY.' as t5', 't5.UniversityID = t3.UniversityID'); $this->db->join(UNIVERSITY.' as t5', 't5.UniversityID = t3.UniversityID');
$this->db->join(FORMFEESRECEIVEDFROMUNIV.' as t2', 't2.FormID = t1.FormID','left'); $this->db->join(FORMFEESRECEIVEDFROMUNIV.' as t2', 't2.FormID = t1.FormID','left');
$this->db->where('t1.CourseCode', $courseCode); //$this->db->where('t1.CourseCode', $courseCode);
$this->db->where('t1.UniversityCode', $univCode); $this->db->where('t1.UniversityCode', $univCode);
$details = $this->db->get(); $details = $this->db->get();
$detailsList = $details->result(); $detailsList = $details->result();
if($detailsList){ if($detailsList){
@ -714,5 +715,45 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model {
return $resultArr; return $resultArr;
} }
/*
* get university session details for filter
* created by kms
* */
public function getUniversitySessionList($branchID=null){
$this->db->select('UniversityID,UniversityName');
$this->db->order_by('UniversityID','DESC');
$this->db->where('IsActive','1');
// $this->db->where('BranchCode',$branchID);
$universityDetails = $this->db->get(UNIVERSITY);
$universityResult=array();
if($universityDetails->result()){
$universityResult['status']=true;
foreach ($universityDetails->result() as $row){
$this->db->select('SM.SessionID,SM.SessionName');
$this->db->order_by('SM.SessionID','DESC');
$this->db->where('SM.IsActive','1');
// $this->db->where('SM.BranchCode',$branchID);
$this->db->where('SD.UniversityID',$row->UniversityID);
$this->db->from(SESSIONMASTER.' as SM');
$this->db->join(SESSIONDETAILS.' as SD', 'SD.SessionID = SM.SessionID');
$sessionDetails = $this->db->get();
$fetchArray['UniversityID']=$row->UniversityID;
$fetchArray['UniversityName']=$row->UniversityName;
if($sessionDetails->result()){
$fetchArray['SessionDetails']=$sessionDetails->result();
}
else{
$fetchArray['SessionDetails']="";
}
$getResult[]=$fetchArray;
}
$universityResult['details']=$getResult;
}
else{
$universityResult['status']=false;
$universityResult['details']="";
}
return $universityResult;
}
} }

View File

@ -34,7 +34,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
if (localDetail != null) { if (localDetail != null) {
if (localDetails.localType === 'R004') { if (localDetails.localType === 'R004') {
$scope.getUniversityList(); // $scope.getUniversityList();
$scope.getUniversitySearchList(); $scope.getUniversitySearchList();
} else { } else {
ipCookie.remove('cookiechk'); ipCookie.remove('cookiechk');
@ -45,8 +45,8 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
} }
} }
$scope.universityData = ''; /*$scope.universityData = '';
$scope.getUniversityList = function () { $scope.getUniversityList = function () {
var empListreq = { var empListreq = {
method: 'POST', method: 'POST',
@ -64,13 +64,13 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
} else { } else {
} }
}); });
} }*/
// get University List // get University List
$scope.universitySearchData = ''; $scope.universitySearchData = '';
$scope.getUniversitySearchList = function () { $scope.getUniversitySearchList = function () {
var empListreq = { var empListreq = {
method: 'POST', method: 'POST',
url: apiPoint.url + 'getUniveCourseBratch/', url: apiPoint.url + 'getUniversitySessionDetails/',
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
@ -79,10 +79,10 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
} }
}; };
$http(empListreq).then(function (response) { $http(empListreq).then(function (response) {
if (response.data.univList) { if (response.data.status) {
$scope.universitySearchData = response.data.university_details; $scope.universitySearchData = response.data.details;
// alert()
} else { } else {
$scope.universitySearchData="";
} }
}); });
}; };
@ -90,30 +90,49 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
$scope.searchData = { $scope.searchData = {
"University": "", "University": "",
"Course": "", "Session": "",
"Status": "" "Status": ""
} }
$scope.myUnivSearch = ""; $scope.myUnivSearch = "";
$scope.sessionData="";
$scope.getUniveId = function (univ) { $scope.getUniveId = function (univ) {
$scope.sessionData="";
if (univ === '') { if (univ === '') {
$scope.myUnivSearch = ""; $scope.myUnivSearch = "";
$scope.searchData.University = ''; $scope.searchData.University = '';
$scope.searchData.Course = ''; // $scope.searchData.Course = '';
$scope.searchData.Batch = ''; // $scope.searchData.Batch = '';
$scope.courseData = name.Course; // $scope.courseData = name.Course;
$scope.batchData = name.Batch; // $scope.batchData = name.Batch;
$scope.searchData.Session = '';
$scope.OpenWindowStatus = false; $scope.OpenWindowStatus = false;
} else { } else {
let name = JSON.parse(univ); let name = JSON.parse(univ);
$scope.searchData.University = name.UniversityID; $scope.searchData.University = name.UniversityID;
$scope.searchData.Course = ''; // $scope.searchData.Course = '';
$scope.searchData.Batch = ''; // $scope.searchData.Batch = '';
$scope.courseData = name.Course; // $scope.courseData = name.Course;
$scope.batchData = name.Batch; // $scope.batchData = name.Batch;
$scope.searchData.Session = '';
$scope.sessionData = name.SessionDetails;
$scope.OpenWindowStatus = false; $scope.OpenWindowStatus = false;
} }
}; };
//For session dropdown
$scope.filterSessionDetails="";
$scope.$watch('searchData.University', function (newValue,oldValue) {
if(newValue==undefined || newValue==''){
$scope.filterSessionDetails="";
}
else{
if(angular.isString(newValue)){
$scope.filterSessionDetails=angular.fromJson(newValue);
}
}
});
$scope.Searchloader = false; $scope.Searchloader = false;
@ -121,7 +140,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
$scope.onSubmit = function(){ $scope.onSubmit = function(){
$scope.Searchloader = true; $scope.Searchloader = true;
if($scope.searchData.University !== '' && $scope.searchData.Course !==''){ if($scope.searchData.University !== '' && $scope.searchData.Session !==''){
$scope.Searchloader = true; $scope.Searchloader = true;
var empListreq = { var empListreq = {
method: 'POST', method: 'POST',
@ -131,7 +150,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
}, },
data: { data: {
data: localDetails, data: localDetails,
search: $scope.searchData search: $scope.searchData,
} }
}; };
$http(empListreq).then(function (response) { $http(empListreq).then(function (response) {

View File

@ -69,20 +69,19 @@
<div class="col-md-3"> <div class="col-md-3">
<label for="form-field-select-2"> <label for="form-field-select-2">
Course Session
</label> </label>
<select ui-select2 class="form-control" tabindex="4" class="cs-select cs-skin-elastic" name="course" ng-model="searchData.Course" <select ui-select2 class="form-control" tabindex="4" class="cs-select cs-skin-elastic" name="session" ng-model="searchData.Session">
ng-change="getValueChange()"> <option value="" selected>Select Session</option>
<option value="" selected>Select Course</option> <option ng-repeat="itemSession in sessionData" value="{{itemSession.SessionID}}">{{itemSession.SessionName}}</option>
<option ng-repeat="itemCourse in courseData" value="{{itemCourse.CourseCode}}">{{itemCourse.CourseName}}<span ng-show="itemCourse.CourseCode != ''">(<strong>{{itemCourse.CourseCode}}</strong>)</span></option>
</select> </select>
</div> </div>
<div class="col-md-2" style="padding-top: 2.3%;"> <div class="col-md-2" style="padding-top: 2.3%;">
<div class="pull-right"> <div class="pull-right">
<button ng-disabled="searchData.Course == '' || searchData.University == ''" type="submit" class="btn btn-success btn-o" tabindex="8"> <button ng-disabled="searchData.Session == '' || searchData.University == ''" type="submit" class="btn btn-success btn-o" tabindex="8">
Submit Submit
</button> </button>
@ -119,7 +118,9 @@
</th> </th>
<th> Enrolment ID <th> Enrolment ID
</th> </th>
<th> Action <th> University Paid
</th>
<th> Student Paid
</th> </th>
</tr> </tr>
</thead> </thead>
@ -142,11 +143,13 @@
<td>{{p.CourseName}}</td> <td>{{p.CourseName}}</td>
<td>{{p.SemesterYear}}</td> <td>{{p.SemesterYear}}</td>
<td>{{p.EnrolmentNo}}</td> <td>{{p.EnrolmentNo}}</td>
<td> <td>{{p.UniversityPaidAmount}}</td>
<td>{{p.StudentPaidAmount}}</td>
<!-- <td>
<i class="ti-write" tooltip="View Fee Details" id="personalDetailButton" ng-click="setEditId(p.FormID);getFeeCompareDetails(p.FormID, p.EnrolmentNo)"></i> <i class="ti-write" tooltip="View Fee Details" id="personalDetailButton" ng-click="setEditId(p.FormID);getFeeCompareDetails(p.FormID, p.EnrolmentNo)"></i>
</td> </td>-->
</tr> </tr>
<tr ng-show="editId === p.FormID" ng-if="editId === p.FormID"> <!--<tr ng-show="editId === p.FormID" ng-if="editId === p.FormID">
<td colspan="9"> <td colspan="9">
<div ng-if="popupLoad"> <div ng-if="popupLoad">
<div align="center" > <div align="center" >
@ -171,7 +174,7 @@
<button class="btn btn-warning pull-right" ng-click="setEditId(-1);">Cancel</button> <button class="btn btn-warning pull-right" ng-click="setEditId(-1);">Cancel</button>
</div> </div>
</td> </td>
</tr> </tr>-->
</tbody> </tbody>
</table> </table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true"> <dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">