form upload details changes : kdk

This commit is contained in:
dineshkumarkannan 2018-09-06 09:15:48 +05:30
parent 9e1cef3551
commit bae8d8a311
5 changed files with 496 additions and 29 deletions

View File

@ -353,3 +353,6 @@ $route['getUniversitySessionDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/
$route['getUnivCourseFromFileDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getUnivCourseFromFileDetails';
$route['getExistStudentEnrolmentDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getExistStudentEnrolmentDetails';
$route['addManualEnrolmentDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/addManualEnrolmentDetails';
$route['getForFormIdDraftDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getForFormIdDraftDetails';
$route['addForFormIdDraftDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/addForFormIdDraftDetails';
$route['draftMovetoList'] = 'Receive_Enrolment_Fees_Univ_Controller/draftMovetoList';

View File

@ -274,5 +274,52 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller {
}
}
public function getForFormIdDraftDetails_post(){
$reqBranch = $this->post('localDetails');
$getForFormIdDraftDetails = $this->receive_model->getForFormIdDraftDetails(); // Check if the employee exist
if ($getForFormIdDraftDetails) {
$getForFormIdDraftDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getForFormIdDraftDetails, 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 addForFormIdDraftDetails_post(){
$reqBranch = $this->post('localDetails');
$details = $this->post('details');
$addForFormIdDraftDetails = $this->receive_model->addForFormIdDraftDetails($details, $reqBranch); // Check if the employee exist
if ($addForFormIdDraftDetails) {
$addForFormIdDraftDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($addForFormIdDraftDetails, 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 draftMovetoList_post(){
$reqBranch = $this->post('localDetails');
$details = $this->post('details');
$draftMovetoList = $this->receive_model->draftMovetoList($details, $reqBranch); // Check if the employee exist
if ($draftMovetoList) {
$draftMovetoList['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($draftMovetoList, 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

@ -442,9 +442,9 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model {
if(count($queryDetails->result()) == 0){
$query = "INSERT INTO T_FormId_FeeDetails_Received_From_University
(FormID, FormType, CentreCode,Session,Year,Semester,Student_Name,Father_Name,CourseCode, ActualCourseFee, CourseFee, ExamFee, EnrollmentFee, ProspectusFee, ReRegFee, CreditTransferFee, LateralEntryFee, DualSpclFee, OtherFee, NRIFEE, ProvisionalFee, MigrationFee, UrgentResultDMCFee, AdditionalFee, Amount, CreatedBy, CreatedOn, BranchCode)
(FormID, FormType, CentreCode,Session,Year,Semester,Student_Name,Father_Name,CourseCode, ActualCourseFee, CourseFee, ExamFee, EnrollmentFee, ProspectusFee, ReRegFee, CreditTransferFee, LateralEntryFee, DualSpclFee, OtherFee, NRIFEE, ProvisionalFee, MigrationFee, UrgentResultDMCFee, AdditionalFee, Amount, CreatedBy, CreatedOn, BranchCode, DraftStatus)
VALUES
( '$formIds', '$formType', '$CentreCode','$Session','$Year','$Semester','$Student_Name','$Father_Name', '$CourseCode', '$ActualCourseFee', '$CourseFee', '$ExamFee', '$EnrollmentFee', '$ProspectusFee', '$ReRegFee', '$CreditTransferFee', '$LateralEntryFee', '$DualSpclFee', '$OtherFee', '$NRIFEE', '$ProvisionalFee', '$MigrationFee', '$UrgentResultDMCFee', '$AdditionalFee', '$Amount', '$localUserID', '$CreatedOn', '$localBranchID' )";
( '$formIds', '$formType', '$CentreCode','$Session','$Year','$Semester','$Student_Name','$Father_Name', '$CourseCode', '$ActualCourseFee', '$CourseFee', '$ExamFee', '$EnrollmentFee', '$ProspectusFee', '$ReRegFee', '$CreditTransferFee', '$LateralEntryFee', '$DualSpclFee', '$OtherFee', '$NRIFEE', '$ProvisionalFee', '$MigrationFee', '$UrgentResultDMCFee', '$AdditionalFee', '$Amount', '$localUserID', '$CreatedOn', '$localBranchID' , 0)";
$queryDetails = $this->db->query($query);
} else {
echo 'else con';
@ -697,4 +697,135 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model {
return $universityResult;
}
public function getForFormIdDraftDetails(){
$selectQuery = "SELECT * FROM T_FormId_FeeDetails_Received_From_University WHERE DraftStatus = 1";
$details = $this->db->query($selectQuery);
$detailsList = $details->result();
if($detailsList) {
$result['draftStatus'] = true;
$result['draftDetails'] = $detailsList;
$result['draftDetailsMessagae'] = "details generate successfully.";
} else {
$result['draftStatus'] = false;
$result['draftDetails'] = '';
$result['draftDetailsMessagae'] = "No Record Found.";
}
return $result;
}
public function addForFormIdDraftDetails($details, $local){
$localBranchID = $local['localBranchID'];
$localUserID = $local['localUserID'];
$time = date('Y-m-d H:i:s');
$CreatedOn = $time;
$formIds = $details['FormID'];
$formType = $details['FormType'];
$CentreCode = $details['CentreCode'];
$Session = $details['Session'];
$Year = $details['Year'];
$Semester = $details['Semester'];
$Student_Name = $details['Student_Name'];
$Father_Name = $details['Father_Name'];
$CourseCode = $details['CourseCode'];
$ActualCourseFee = $details['ActualCourseFee'];
$CourseFee = $details['CourseFee'];
$ExamFee = $details['ExamFee'];
$EnrollmentFee = $details['EnrollmentFee'];
$ProspectusFee = $details['ProspectusFee'];
$ReRegFee = $details['ReRegFee'];
$CreditTransferFee = $details['CreditTransferFee'];
$LateralEntryFee = $details['LateralEntryFee'];
$DualSpclFee = $details['DualSpclFee'];
$OtherFee = $details['OtherFee'];
$NRIFEE = $details['NRIFEE'];
$ProvisionalFee = $details['ProvisionalFee'];
$MigrationFee = $details['MigrationFee'];
$UrgentResultDMCFee = $details['UrgentResultDMCFee'];
$AdditionalFee = $details['AdditionalFee'];
$Amount = $details['Amount'];
$selectQuery = "SELECT * FROM T_FormId_FeeDetails_Received_From_University WHERE
FormID = '$formIds' AND
FormType = '$formType' AND
CentreCode = '$CentreCode' AND
Session = '$Session' AND
Year = '$Year' AND
Semester = '$Semester' AND
Student_Name = '$Student_Name' AND
Father_Name = '$Father_Name' AND
CourseCode = '$CourseCode' AND
ActualCourseFee = '$ActualCourseFee' AND
CourseFee = '$CourseFee' AND
ExamFee = '$ExamFee' AND
EnrollmentFee = '$EnrollmentFee' AND
ProspectusFee = '$ProspectusFee' AND
ReRegFee = '$ReRegFee' AND
CreditTransferFee = '$CreditTransferFee' AND
LateralEntryFee = '$LateralEntryFee' AND
DualSpclFee = '$DualSpclFee' AND
OtherFee = '$OtherFee' AND
NRIFEE = '$NRIFEE' AND
ProvisionalFee = '$ProvisionalFee' AND
MigrationFee = '$MigrationFee' AND
UrgentResultDMCFee = '$UrgentResultDMCFee' AND
AdditionalFee = '$AdditionalFee' AND
Amount = '$Amount'";
$queryDetails = $this->db->query($selectQuery);
if(count($queryDetails->result()) == 0){
$query = "INSERT INTO T_FormId_FeeDetails_Received_From_University
(FormID, FormType, CentreCode,Session,Year,Semester,Student_Name,Father_Name,CourseCode, ActualCourseFee, CourseFee, ExamFee, EnrollmentFee, ProspectusFee, ReRegFee, CreditTransferFee, LateralEntryFee, DualSpclFee, OtherFee, NRIFEE, ProvisionalFee, MigrationFee, UrgentResultDMCFee, AdditionalFee, Amount, CreatedBy, CreatedOn, BranchCode, DraftStatus)
VALUES
( '$formIds', '$formType', '$CentreCode','$Session','$Year','$Semester','$Student_Name','$Father_Name', '$CourseCode', '$ActualCourseFee', '$CourseFee', '$ExamFee', '$EnrollmentFee', '$ProspectusFee', '$ReRegFee', '$CreditTransferFee', '$LateralEntryFee', '$DualSpclFee', '$OtherFee', '$NRIFEE', '$ProvisionalFee', '$MigrationFee', '$UrgentResultDMCFee', '$AdditionalFee', '$Amount', '$localUserID', '$CreatedOn', '$localBranchID' , 1)";
$queryDetails = $this->db->query($query);
if($queryDetails){
$result['draftStatus'] = true;
$result['draftDetailsMessagae'] = "Updated Successfully.";
}else{
$result['draftStatus'] = false;
$result['draftDetailsMessagae'] = "Something went wrong.";
}
} else {
$result['draftStatus'] = false;
$result['draftDetailsMessagae'] = "This record already exist.";
}
return $result;
}
public function draftMovetoList($detail, $local){
// print_r($details);exit();
foreach($detail as $row) {
// echo $row['ID'];exit();
$data[] = array(
'ID' => $row['ID'],
'FormType'=> 'Hello'
);
}
// $data = array(
// array(
// 'ID' => 1,
// 'FormType' => 'Hello'
// ),
// array(
// 'ID' => 2,
// 'FormType' => 'World'
// )
// );
// print_r($data);exit();
$this->db->update_batch('T_FormId_FeeDetails_Received_From_University', $data, 'ID');
$detailsList = $details->result();
if($detailsList){
$result['draftStatus'] = true;
$result['draftDetailsMessagae'] = "Updated Successfully.";
} else {
$result['draftStatus'] = false;
$result['draftDetailsMessagae'] = "Something went wrong.";
}
}
}

View File

@ -327,36 +327,174 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter
getDraftFormIdDetails();
}
}
$scope.draftManualEntryDetails = {
'FormID': '',
'FormType': 'NEW',
'CentreCode': '',
'Session':'',
'Year':'',
'Semester':'',
'Student_Name':'',
'Father_Name':'',
'CourseCode':'',
'ActualCourseFee':'0',
'CourseFee':'0',
'ExamFee': '0',
'EnrollmentFee': '0',
'ProspectusFee': '0',
'ReRegFee': '0',
'CreditTransferFee': '0',
'LateralEntryFee': '0',
'DualSpclFee': '0',
'OtherFee': '0',
'NRIFEE':'0',
'ProvisionalFee': '0',
'MigrationFee': '0',
'UrgentResultDMCFee': '0',
'AdditionalFee': '0',
'Amount': '0'
}
$scope.draftListDetails = '';
$scope.draftListDetailsNoRecordFound = false;
$scope.draftListDetailsLoading = false;
// get draft form id details
function getDraftFormIdDetails(){
// $scope.unMatchedRecordDetails = '';
// $scope.unMatchedNoRecordFound = false;
// $scope.unMatchedLoadingStatus = true;
// var getDetailsFor = ss == 1 ? 'EnrolmentIDFile' : 'FormIDFile';
// var getFeeCompareDetailsList = {
// method: 'POST',
// url: apiPoint.url + 'getUnmatchedRecordDetails/',
// headers: {
// 'Content-Type': 'application/json'
// },
// data: {
// localDetails: localDetail,
// getDetailsFor: getDetailsFor
// }
// };
// $http(getFeeCompareDetailsList).then(function (response) {
// if (response.data.unMatchedRecordStatus == true) {
// $scope.unMatchedLoadingStatus = false;
// $scope.unMatchedNoRecordFound = false;
// $scope.unMatchedRecordDetails = response.data.unMatchedRecordDetails;
// $scope.unMatchedRecordDetailsType = response.data.unMatchedRecordFor;
// } else {
// $scope.unMatchedLoadingStatus = false;
// $scope.unMatchedNoRecordFound = true;
// $scope.unMatchedRecordDetails = response.data.unMatchedRecordDetails;
// }
// });
$scope.draftListDetailsLoading = true;
$scope.draftListDetailsNoRecordFound = false;
$scope.draftListDetails = '';
var getFormIdDraftDetailsList = {
method: 'POST',
url: apiPoint.url + 'getForFormIdDraftDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
localDetails: localDetail
}
};
$http(getFormIdDraftDetailsList).then(function (response) {
if (response.data.draftStatus == true) {
$scope.draftListDetailsLoading = false;
$scope.draftListDetails = response.data.draftDetails;
$scope.draftListDetailsNoRecordFound = false;
} else {
$scope.draftListDetailsLoading = false;
$scope.draftListDetailsNoRecordFound = true;
}
});
}
// manual entry details add
$scope.addManualData = function() {
alert(JSON.stringify($scope.draftManualEntryDetails));
var addDraftDetailsList = {
method: 'POST',
url: apiPoint.url + 'addForFormIdDraftDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
localDetails: localDetail,
details : $scope.draftManualEntryDetails
}
};
$http(addDraftDetailsList).then(function (response) {
if (response.data.draftStatus == true) {
swal("", response.data.draftDetailsMessagae, "success");
getDraftFormIdDetails();
getEmptycall();
} else {
swal("", response.data.draftDetailsMessagae, "warning");
getDraftFormIdDetails();
getEmptycall();
}
});
}
function getEmptycall(){
$scope.draftManualEntryDetails = {
'FormID': '',
'FormType': 'NEW',
'CentreCode': '',
'Session':'',
'Year':'',
'Semester':'',
'Student_Name':'',
'Father_Name':'',
'CourseCode':'',
'ActualCourseFee':'0',
'CourseFee':'0',
'ExamFee': '0',
'EnrollmentFee': '0',
'ProspectusFee': '0',
'ReRegFee': '0',
'CreditTransferFee': '0',
'LateralEntryFee': '0',
'DualSpclFee': '0',
'OtherFee': '0',
'NRIFEE':'0',
'ProvisionalFee': '0',
'MigrationFee': '0',
'UrgentResultDMCFee': '0',
'AdditionalFee': '0',
'Amount': '0'
}
return 0;
}
$scope.addToList = function(id){
swal({
title: "Are you sure?",
text: "You Want to Add this Record to List!",
type: "warning",
showCancelButton: true,
confirmButtonColor: '#DD6B55',
confirmButtonText: 'Yes',
cancelButtonText: "No",
closeOnConfirm: false,
closeOnCancel: false
},
function(isConfirm){
if (isConfirm){
var selectedItems = [];
function getUpdateDetails(id) {
this.ID = id;
this.DraftStatus = 0;
}
let itemGetID = new getUpdateDetails(id);
selectedItems.push(itemGetID);
var draftMoveToList = {
method: 'POST',
url: apiPoint.url + 'draftMovetoList/',
headers: {
'Content-Type': 'application/json'
},
data: {
localDetails: localDetail,
details : selectedItems
}
};
$http(draftMoveToList).then(function (response) {
if (response.data.draftStatus == true) {
// swal("", response.data.draftDetailsMessagae, "success");
// getDraftFormIdDetails();
// getEmptycall();
} else {
// swal("", response.data.draftDetailsMessagae, "warning");
// getDraftFormIdDetails();
// getEmptycall();
}
});
} else {
swal("Cancelled", "Your record not added to list :)", "error");
}
});
}
}]);

View File

@ -202,6 +202,154 @@
</tab>
<tab tabindex="2" active="subTabactive2" ng-click="subTabActive('subTabactive2')" heading="Upload Data Manualy" id="uploadDataManualy">
<div class="container-fluid">
<div class="container">
<div class="table-responsive">
<table class="table">
<thead>
<th>FormID</th>
<th>FormType</th>
<th>CentreCode</th>
<th>Session</th>
<th>Year</th>
<th>Semester</th>
<th>Student_Name</th>
<th>Father_Name</th>
<th>CourseCode</th>
<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>
</thead>
<tbody>
<tr>
<td>
<input type="text" required ng-model="draftManualEntryDetails.FormID">
</td>
<td><select ng-model="draftManualEntryDetails.FormType" ng-disabled="!draftManualEntryDetails.FormID">
<option value="NEW"> NEW </option>
<option value="RE"> RE </option>
</select>
</td>
<td><input type="text" ng-model="draftManualEntryDetails.CentreCode" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.Session" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.Year" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.Semester" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.Student_Name" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.Father_Name" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.CourseCode" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.ActualCourseFee"
ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.CourseFee" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.ExamFee" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.EnrollmentFee" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.ProspectusFee" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.ReRegFee" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.CreditTransferFee"
ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.LateralEntryFee"
ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.DualSpclFee" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.OtherFee" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.NRIFEE" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.ProvisionalFee"
ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.MigrationFee" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.UrgentResultDMCFee"
ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.AdditionalFee" ng-disabled="!draftManualEntryDetails.FormID"></td>
<td><input type="text" ng-model="draftManualEntryDetails.Amount" ng-disabled="!draftManualEntryDetails.FormID"></td>
</tr>
</tbody>
</table>
</div>
<button class="btn btn-success pull-right" ng-disabled="!draftManualEntryDetails.FormID" ng-click="addManualData()">Add</button>
</div>
<div class="container">
<div ng-if="draftListDetailsLoading">
Loading...
</div>
</div>
<div class="container">
<div ng-if="draftListDetails && !draftListDetailsLoading" class="table-responsive">
<table class="table table-border table-hover">
<thead>
<th>FormID</th>
<th>FormType</th>
<th>CentreCode</th>
<th>Session</th>
<th>Year</th>
<th>Semester</th>
<th>Student Name</th>
<th>Father Name</th>
<th>CourseCode</th>
<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>
<th>Action</th>
</thead>
<tbody dir-paginate="p in draftListDetails|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10| filter:query as results">
<tr>
<td>{{p.FormID}}</td>
<td>{{p.FormType}}</td>
<td>{{p.CentreCode}}</td>
<td>{{p.Session}}</td>
<td>{{p.Year}}</td>
<td>{{p.Semester}}</td>
<td>{{p.Student_Name}}</td>
<td>{{p.Father_Name}}</td>
<td>{{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-user" tooltip="Add To List" ng-click="addToList(p.ID);"></i>
</td>
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</div>
</div>
<!--<div class="row">
<div class="col-md-4 form-group">
<label>