formid details status capture update : kdk

This commit is contained in:
dineshkumarkannan 2018-09-08 09:16:08 +05:30
parent 799b9b60d0
commit 12fdbfbf69
5 changed files with 386 additions and 50 deletions

View File

@ -370,4 +370,7 @@ $route['addManualEnrolmentDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/ad
$route['getForFormIdDraftDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getForFormIdDraftDetails';
$route['addForFormIdDraftDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/addForFormIdDraftDetails';
$route['draftMovetoList'] = 'Receive_Enrolment_Fees_Univ_Controller/draftMovetoList';
$route['editDraftFormIdFeesDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/editDraftFormIdFeesDetails';
$route['editDraftFormIdFeesDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/editDraftFormIdFeesDetails';
$route['getStudentUnivFormIdFeeDatailsList'] = 'Receive_Enrolment_Fees_Univ_Controller/getStudentUnivFormIdFeeDatailsList';
$route['getFormIdDetailsStatusUpdateList'] = 'Receive_Enrolment_Fees_Univ_Controller/getFormIdDetailsStatusUpdateList';
$route['insertStatusUpdateDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/insertStatusUpdateDetails';

View File

@ -337,5 +337,59 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller {
}
}
// get formid fee details list with status
public function getStudentUnivFormIdFeeDatailsList_post(){
$reqBranchData = $this->post('data');
$searchDetails = $this->post('search');
$getStudentUnivFormIdFeeDatailsList = $this->receive_model->getStudentUnivFormIdFeeDatailsList($reqBranchData, $searchDetails); // Check if the employee exist
if ($getStudentUnivFormIdFeeDatailsList) {
$getStudentUnivFormIdFeeDatailsList['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getStudentUnivFormIdFeeDatailsList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} else {
// Set the response and exit
$this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
public function getFormIdDetailsStatusUpdateList_post(){
$reqBranchData = $this->post('localDetails');
$statusDetailsId = $this->post('detailsID');
$getFormIdDetailsStatusUpdateList = $this->receive_model->getFormIdDetailsStatusUpdateList($reqBranchData, $statusDetailsId); // Check if the employee exist
if ($getFormIdDetailsStatusUpdateList) {
$getFormIdDetailsStatusUpdateList['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getFormIdDetailsStatusUpdateList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} else {
// Set the response and exit
$this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
public function insertStatusUpdateDetails_post(){
$reqBranchData = $this->post('localDetails');
$statusDetails = $this->post('details');
$id = $this->post('id');
$formId = $this->post('formId');
$insertStatusUpdateDetails = $this->receive_model->insertStatusUpdateDetails($reqBranchData, $statusDetails, $id, $formId ); // Check if the employee exist
if ($insertStatusUpdateDetails) {
$insertStatusUpdateDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($insertStatusUpdateDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} else {
// Set the response and exit
$this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
}

View File

@ -1083,4 +1083,109 @@ $result['updatedraftStatus'] = false;
return $result;
}
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 ,
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');
$this->db->from('T_FormId_FeeDetails_Received_From_University as FUD');
$this->db->join(ENROLMENTRECEIVEDFROMUNIV.' as ENU', 'FUD.FormID = ENU.FormID' );
$this->db->join(STUDENTCOURSE.' as STC', 'STC.EnrollmentID = ENU.EnrolmentNo');
$this->db->join(COURSE.' as CM', 'CM.CourseID = STC.CourseID');
$this->db->join(STUDENTS.' as ST', 'ST.StudentID = STC.StudentID');
// $this->db->join(UNIVERSITY.' as UN', 'UN.UniversityID = STC.UniversityID');
if($searchDetails['University']!=''){
$this->db->where('ENU.UniversityCode',$searchDetails['University']);
}
if($searchDetails['Course']!=''){
$this->db->where('ENU.CourseCode',$searchDetails['Course']);
}
if($searchDetails['Sem']!=''){
$this->db->where('ENU.SemesterYear',$searchDetails['Sem']);
}
$this->db->where('FUD.DraftStatus',0);
$details = $this->db->get();
$detailsList = $details->result();
if($detailsList){
// foreach ($detailsList as $fetchStudentRow){
// // form id bases get student paid details
// $getStudentsetFeesDetails=$this->getStudentsetFeesDetails($fetchStudentRow->StudentID,$fetchStudentRow->CourseID,$fetchStudentRow->SemesterYear);
// if(isset($getStudentsetFeesDetails['status']) AND $getStudentsetFeesDetails['status']==true ){
// $formResult['SessionName']=$getStudentsetFeesDetails['SessionName'];
// $formResult['FormID']=$fetchStudentRow->FormID;
// $formResult['FormType']=$fetchStudentRow->FormType;
// $formResult['SemesterYear']=$fetchStudentRow->SemesterYear;
// $formResult['EnrolmentNo']=$fetchStudentRow->EnrolmentNo;
// $formResult['CourseCode']=$fetchStudentRow->CourseCode;
// $formResult['CourseName']=$fetchStudentRow->CourseName;
// $formResult['RollNo']=$fetchStudentRow->RollNo;
// $formResult['StudentID']=$fetchStudentRow->StudentID;
// $formResult['MobileNumber']=$fetchStudentRow->MobileNumber;
// $formResult['Firstname']=$fetchStudentRow->Firstname;
// $formResult['Lastname']=$fetchStudentRow->Lastname;
// $formResult['Fathername']=$fetchStudentRow->Fathername;
// $formResult['MotherName']=$fetchStudentRow->MotherName;
// $formResult['EmailID']=$fetchStudentRow->EmailID;
// $formResult['AlternateNumber']=$fetchStudentRow->AlternateNumber;
// $formResult['Gender']=$fetchStudentRow->Gender;
// $formResult['DOB']=$fetchStudentRow->DOB;
// $formResult['PresentAddress']=$fetchStudentRow->PresentAddress;
// $formResult['PermanentAddress']=$fetchStudentRow->PermanentAddress;
// $formResult['AadharNumber']=$fetchStudentRow->AadharNumber;
// $formResult['OtherID']=$fetchStudentRow->OtherID;
// $formResult['OtherIDDetails']=$fetchStudentRow->OtherIDDetails;
// $formResult['Qualification']=$fetchStudentRow->Qualification;
// $formResult['UniversityID']=$fetchStudentRow->UniversityID;
// $formResult['UniversityName']=$fetchStudentRow->UniversityName;
// $mergeFormDetails[]=$formResult;
// }
// }
$resultArr['studentFeeCompareDetails'] = $detailsList;
$resultArr['formTypeStatus'] = true;
$resultArr['message'] = "Successfully data generated";
} else {
$resultArr['studentFeeCompareDetails'] = [];
$resultArr['formTypeStatus'] = false;
$resultArr['message'] = "No record found";
}
return $resultArr;
}
public function getFormIdDetailsStatusUpdateList($reqBranchData, $searchDetails){
$selectQuery = "SELECT * FROM T_FormId_FeeDetails_Received_From_University_StatusUpdate WHERE FormIdDetailsID = '$searchDetails'";
$details = $this->db->query($selectQuery);
$detailsList = $details->result();
if($detailsList) {
$result['formIdstatusListStatus'] = true;
$result['formIdstatusListDetails'] = $detailsList;
$result['formIdstatusListMessagae'] = "details generate successfully.";
} else {
$result['formIdstatusListStatus'] = false;
$result['formIdstatusListDetails'] = '';
$result['formIdstatusListMessagae'] = "No Record Found.";
}
return $result;
}
public function insertStatusUpdateDetails($reqBranchData, $statusDetails, $id, $formId ){
$newLeadDetails['FormIdDetailsID'] = $id;
$newLeadDetails['FormID'] = $formId;
$newLeadDetails['Status'] = $statusDetails['Status'];
$time = date('Y-m-d H:i:s');
$newLeadDetails['CreatedOn'] = $time;
$newLeadDetails['CreatedBy'] = $reqBranchData['localUserID'];
$this->db->insert('T_FormId_FeeDetails_Received_From_University_StatusUpdate', $newLeadDetails);
// this if for insert lead details
if ($this->db->affected_rows() == '1') {
$result['insertStatusUpdateDetailsStatus'] = true;
$result['insertStatusUpdateDetailsMessagae'] = "Status Updated successfully.";
}else {
$result['insertStatusUpdateDetailsStatus'] = false;
$result['insertStatusUpdateDetailsMessagae'] = "Something went Wrong.";
}
return $result;
}
}

View File

@ -2,6 +2,7 @@
/**
* controllers for ng-table
* Simple table with sorting and filtering on AngularJS
* kdk
*/
app.controller('studentUnivFormIdFeeDetailsCtrl', ["$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) {
@ -87,11 +88,12 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter
});
};
$scope.semDetails=["1","2","3","4","5","6","7","8"];
$scope.searchData = {
"University": "",
"Course": "",
"Status": ""
"Sem": ""
}
$scope.myUnivSearch = "";
$scope.courseData = "";
@ -134,7 +136,7 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter
$scope.Searchloader = true;
var empListreq = {
method: 'POST',
url: apiPoint.url + 'getStudentUnivFeeCompareDetails/',
url: apiPoint.url + 'getStudentUnivFormIdFeeDatailsList/',
headers: {
'Content-Type': 'application/json'
},
@ -161,6 +163,17 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter
}
}
$scope.myObj = {
// "color" : "green",
"font-size" : "inherit"
}
$scope.myObjErr = {
"text-decoration": "underline",
"text-decoration-color": "red",
"font-size" : "inherit"
}
$scope.editId = -1;
$scope.setEditId = function (id) {
$scope.editId = id;
@ -519,4 +532,70 @@ $scope.draftManualEntryDetails = {
}});
}
$scope.statusUpdateEditId = -1;
$scope.statusUpdate = function(id){
$scope.statusUpdateEditId = id;
}
$scope.StatusListDetails = '';
$scope.getFormIdDetailsStatusListLoading = false;
$scope.getFormIdDetailsStatusList = function(id){
$scope.getFormIdDetailsStatusListLoading = true;
var getFormIdDetailsStatusList = {
method: 'POST',
url: apiPoint.url + 'getFormIdDetailsStatusUpdateList/',
headers: {
'Content-Type': 'application/json'
},
data: {
localDetails: localDetail,
detailsID : id
}
};
$http(getFormIdDetailsStatusList).then(function (response) {
if (response.data.formIdstatusListStatus == true) {
$scope.getFormIdDetailsStatusListLoading = false;
$scope.StatusListDetails = response.data.formIdstatusListDetails;
} else {
$scope.getFormIdDetailsStatusListLoading = false;
$scope.StatusListDetails = response.data.formIdstatusListDetails;
$scope.StatusListDetailsApiMessage = response.data.formIdstatusListMessagae;
}});
}
$scope.statusUpdateFormIdDetails = {
"Status": "",
"Comments": ""
}
$scope.addStatusUpdateDetails = function(id, formId){
var addStatusUpdateDetailsStatusList = {
method: 'POST',
url: apiPoint.url + 'insertStatusUpdateDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
localDetails: localDetail,
details : $scope.statusUpdateFormIdDetails,
id: id,
formId : formId
}
};
$http(addStatusUpdateDetailsStatusList).then(function (response) {
if (response.data.insertStatusUpdateDetailsStatus == true) {
$scope.statusUpdateFormIdDetails = {
"Status": "",
"Comments": ""
}
$scope.statusUpdateEditId = -1;
swal("", response.data.insertStatusUpdateDetailsMessagae, "success");
} else {
swal("", response.data.insertStatusUpdateDetailsMessagae, "success");
// $scope.getFormIdDetailsStatusListLoading = false;
// $scope.StatusListDetails = response.data.formIdstatusListDetails;
// $scope.StatusListDetailsApiMessage = response.data.formIdstatusListMessagae;
}});
}
}]);

View File

@ -65,13 +65,24 @@
<label for="form-field-select-2">
Course
</label>
<select ui-select2 class="form-control" tabindex="4" class="cs-select cs-skin-elastic" name="session" ng-model="searchData.Course">
<select ui-select2 class="form-control" tabindex="4" class="cs-select cs-skin-elastic" name="course" ng-model="searchData.Course">
<option value="" selected>Select Course</option>
<option ng-repeat="itemCourse in courseData" value="{{itemCourse.CourseCode}}">{{itemCourse.CourseName}}</option>
</select>
</div>
<div class="col-md-2" style="padding-top: 2.3%;">
<div class="pull-right">
<div class="col-md-3 form-group">
<label for="form-field-select-2">
Sem
</label>
<select class="form-control" tabindex="11" class="cs-select cs-skin-elastic" name="sem" id="sem" ng-model="searchData.Sem">
<option value="" selected>Select Sem</option>
<option ng-repeat="sem in semDetails" value="{{sem}}">{{sem}}</option>
</select>
</div>
<div class="col-md-3" style="padding-top: 2.3%;">
<div class="pull-left">
<button ng-disabled="searchData.Course == '' || searchData.University == ''" type="submit" class="btn btn-success btn-o"
tabindex="8">
@ -94,30 +105,65 @@
<table class="table table-hover">
<thead>
<tr>
<th> Action
</th>
<th> FormID
</th>
<th> Form Type
</th>
<th> Student Name
<th> CentreCode
</th>
<th> Father Name
<th> Session
</th>
<th> University
<th> Year
</th>
<th> Course
<th> Semester
</th>
<th> Sem/Year
<th> Student_Name
</th>
<th> Enrolment ID
<th> Father_Name
</th>
<th> University Paid
<th> CourseCode
</th>
<th> Student Paid
<th> ActualCourseFee
</th>
<th> CourseFee
</th>
<th> ExamFee
</th>
<th> EnrollmentFee
</th>
<th> ProspectusFee
</th>
<th> ReRegFee
</th>
<th> CreditTransferFee
</th>
<th> LateralEntryFee
</th>
<th> DualSpclFee
</th>
<th> OtherFee
</th>
<th> NRIFEE
</th>
<th> ProvisionalFee
</th>
<th> MigrationFee
</th>
<th> UrgentResultDMCFee
</th>
<th> AdditionalFee
</th>
<th> Amount
</th>
</tr>
</thead>
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10| filter:query as results">
<tr>
<td>
<i class="ti-user" tooltip="Add To List" ng-click="statusUpdate(p.ID);"></i>
</td>
<td>
{{p.FormID}}
</td>
@ -125,48 +171,97 @@
{{p.FormType}}
</td>
<td>
<a class="text-dark">
{{p.Firstname}} {{p.Lastname}}
</a>
<!--tooltip="View Student" ng-click="open(p);"-->
{{p.CentreCode}}
</td>
<td>{{p.Fathername}}</td>
<td>{{p.UniversityName}}</td>
<td>{{p.CourseName}}</td>
<td>{{p.SemesterYear}}</td>
<td>{{p.EnrolmentNo}}</td>
<td>{{p.UniversityPaidAmount}}</td>
<td>{{p.StudentPaidAmount}}</td>
<td>
{{p.Session}}
</td>
<td>
{{p.Year}}
</td>
<td>
{{p.Semester}}
</td>
<td ng-style="p.StudentNameStatus == 'YES' ? myObj: myObjErr">
{{p.Student_Name}}
</td>
<td ng-style="p.FathernameStatus == 'YES' ? myObj: myObjErr">
{{p.Father_Name}}
</td>
<td ng-style="p.CourseCodeStatus == 'YES' ? myObj: myObjErr">
{{p.CourseCode}}
</td>
<td>{{p.ActualCourseFee}}</td>
<td>{{p.CourseFee}}</td>
<td>{{p.ExamFee}}</td>
<td>{{p.EnrollmentFee}}</td>
<td>{{p.ProspectusFee}}</td>
<td>{{p.ReRegFee}}</td>
<td>{{p.CreditTransferFee}}</td>
<td>{{p.LateralEntryFee}}</td>
<td>{{p.DualSpclFee}}</td>
<td>{{p.OtherFee}}</td>
<td>{{p.NRIFEE}}</td>
<td>{{p.ProvisionalFee}}</td>
<td>{{p.MigrationFee}}</td>
<td>{{p.UrgentResultDMCFee}}</td>
<td>{{p.AdditionalFee}}</td>
<td>{{p.Amount}}</td>
<!-- <td>
<i class="ti-write" tooltip="View Fee Details" id="personalDetailButton" ng-click="setEditId(p.FormID);getFeeCompareDetails(p.FormID, p.EnrolmentNo)"></i>
</td>-->
</tr>
<!--<tr ng-show="editId === p.FormID" ng-if="editId === p.FormID">
<td colspan="9">
<div ng-if="popupLoad">
<div align="center" >
<h3 style="color: blue;">Loading...</h3></div>
<h2> {{statusMessage}} </h2>
</div>
<div class="container" ng-if="formPaymentDetails!=''">
<div class="container" align="center">
<table class="table table-border">
<thead>
<th>University Fee Paid Details</th>
<th>Student Fee Paid Details</th>
</thead>
<tbody>
<tr>
<td>{{formPaymentDetails.UniversityPaidAmount}}</td>
<td>{{formPaymentDetails.StudentPaidAmount}}</td>
</tr>
</tbody>
</table>
</div>
<button class="btn btn-warning pull-right" ng-click="setEditId(-1);">Cancel</button>
</div>
<tr ng-show="statusUpdateEditId === p.ID" ng-if="statusUpdateEditId === p.ID">
<td colspan="12">
<!--<h2> {{p.ID}} </h2>-->
<div style="border: 1px solid gray; padding: 12px; margin: 4px;" ng-init="getFormIdDetailsStatusList(p.ID)">
<div ng-if="getFormIdDetailsStatusListLoading">
<div style="align: center; color: blue" align="center">
<h3>Loading...</h3></div>
</div>
<div ng-if="!getFormIdDetailsStatusListLoading">
<div class="container">
<div class="row">
<div class="col-md-3 form-group">
<label>
Select Status
</label>
<select class="form-control" ng-model="statusUpdateFormIdDetails.Status">
<option value="Ok"> Ok </option>
<option value="Not Ok"> Not Ok </option>
<option value="Not Our Student"> Not Our Student </option>
</select>
</div>
<div class="col-md-3 form-group">
<label>
Comments
</label>
<textarea placeholder="Enter Comments" class="form-control" ng-model="statusUpdateFormIdDetails.Comments"/>
</div>
</div>
<div class="row">
<div class="pull-left">
<button type="button" ladda="ldloading1.zoom_in" tabindex="2028" class="btn btn-wide btn-success"
data-style="zoom-in" ng-click="addStatusUpdateDetails(p.ID, p.FormID)">
<i class='fa fa-spinner fa-spin' ng-if="editSaveButtonDisable"> </i> Save
</button>
<button type="reset" class="btn btn-warning btn-wide" tabindex="2029" ng-click="cancel()">
Reset
</button>
</div>
</div>
</div>
<div ng-if="StatusListDetails != ''">
</div>
<div ng-if="StatusListDetails == ''">
<div>{{StatusListDetailsApiMessage}}</div>
</div>
</div>
</div>
</td>
</tr>-->
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">