Merge branch 'master' of https://bitbucket.org/venbainformationtechnology/apollodec
This commit is contained in:
commit
9e1cef3551
@ -350,4 +350,6 @@ $route['getStudentUnivFeeCompareDetails'] = 'Receive_Enrolment_Fees_Univ_Control
|
||||
$route['formIDFeeCompareDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/formIDFeeCompareDetails';
|
||||
$route['getUnmatchedRecordDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getUnmatchedRecordDetails';
|
||||
$route['getUniversitySessionDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getUniversitySessionDetails';
|
||||
$route['getUnivCourseFromFileDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getUnivCourseFromFileDetails';
|
||||
$route['getUnivCourseFromFileDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getUnivCourseFromFileDetails';
|
||||
$route['getExistStudentEnrolmentDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/getExistStudentEnrolmentDetails';
|
||||
$route['addManualEnrolmentDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/addManualEnrolmentDetails';
|
||||
|
||||
@ -34,6 +34,9 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller {
|
||||
$this->methods['receiveEnrolmentFromUniv_post']['limit'] = 500; // 500 requests per hour per user/key
|
||||
$this->methods['formIDFeeCompareDetails_post']['limit'] = 500;
|
||||
$this->methods['getUniversitySessionDetails_post']['limit'] = 500;
|
||||
$this->methods['getExistStudentEnrolmentDetails_post']['limit'] = 1000;
|
||||
|
||||
$this->methods['addManualEnrolmentDetails_post']['limit'] = 1000;
|
||||
|
||||
// load the model
|
||||
$this->load->model('Receive_Enrolment_Fees_Univ_model', 'receive_model');
|
||||
@ -193,7 +196,66 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller {
|
||||
$this->response(['message' => 'No list were found', 'status' => false], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
* get exist enrolment student details
|
||||
* created by kms
|
||||
* */
|
||||
public function getExistStudentEnrolmentDetails_post(){
|
||||
$localData = $this->post('localDetails');
|
||||
$enrolmentID=$this->post('enrolmentID');
|
||||
$getEnrolmentDetails=$this->receive_model->getExistStudentEnrolmentDetails($enrolmentID,$localData);
|
||||
if($getEnrolmentDetails['status']==true){
|
||||
$this->response($getEnrolmentDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
|
||||
}
|
||||
else if($getEnrolmentDetails['status']==false){
|
||||
$this->response($getEnrolmentDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$this->response(['message' => 'No list were found', 'status' => false], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* add manual enrolment details
|
||||
* cretaed by kms
|
||||
* */
|
||||
public function addManualEnrolmentDetails_post(){
|
||||
$now = new DateTime();
|
||||
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
|
||||
$localData = $this->post('localDetails');
|
||||
$studentInfo=$this->post('studentInfo');
|
||||
$semDetails=$this->post('sem');
|
||||
$studentInfo['CreatedOn'] = $now->format('Y-m-d H:i:s');
|
||||
$studentInfo['FormID'] = $this->post('formID');
|
||||
$studentInfo['SemesterYear'] = $semDetails['sem'];
|
||||
$studentInfo['FormType'] = $semDetails['FormType'];
|
||||
$studentInfo['SessionName'] = $semDetails['SessionName'];
|
||||
$studentInfo['EnrolmentNo'] = $this->post('enrolmentID');
|
||||
$studentInfo['CreatedBy'] = $localData['localUserID'];
|
||||
$studentInfo['BranchCode'] = $localData['localBranchID'];
|
||||
$studentInfo['ManualEntry'] = 1;
|
||||
$addEnrolmentDetails=$this->receive_model->addManualEnrolmentDetails($studentInfo);
|
||||
if($addEnrolmentDetails['status']==true){
|
||||
$this->response($addEnrolmentDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
|
||||
}
|
||||
else if($addEnrolmentDetails['status']==false){
|
||||
$this->response($addEnrolmentDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$this->response(['message' => 'No list were found', 'status' => false], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getUnivCourseFromFileDetails_post(){
|
||||
|
||||
@ -476,25 +476,31 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model {
|
||||
$results['stuFeeList_details'] = "details updated successfully.";
|
||||
return $results;
|
||||
}
|
||||
|
||||
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->from(ENROLMENTRECEIVEDFROMUNIV.' as t1');
|
||||
$this->db->join(STUDENTCOURSE.' as t3', 't3.EnrollmentID = t1.EnrolmentNo');
|
||||
$this->db->join(STUDENTS.' as t4', 't4.StudentID = t3.StudentID');
|
||||
$this->db->join(UNIVERSITY.' as t5', 't5.UniversityID = t3.UniversityID');
|
||||
$this->db->join(FORMFEESRECEIVEDFROMUNIV.' as t2', 't2.FormID = t1.FormID','left');
|
||||
//$this->db->where('t1.CourseCode', $courseCode);
|
||||
$this->db->where('t1.UniversityCode', $univCode);
|
||||
$this->db->distinct('ENU.FormID');
|
||||
$this->db->select('ENU.FormID, ENU.FormType, ENU.SemesterYear, ENU.EnrolmentNo,ENU.RollNo, ST.*,UN.UniversityID, UN.UniversityName,CM.CourseID,CM.CourseCode,CM.CourseName');
|
||||
$this->db->from(ENROLMENTRECEIVEDFROMUNIV.' as ENU');
|
||||
$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');
|
||||
// $this->db->join(FORMFEESRECEIVEDFROMUNIV.' as t2', 't2.FormID = t1.FormID','left');
|
||||
//$this->db->where('t1.CourseCode', $courseCode);
|
||||
$this->db->where('ENU.UniversityCode', $univCode);
|
||||
|
||||
$details = $this->db->get();
|
||||
$detailsList = $details->result();
|
||||
if($detailsList){
|
||||
foreach ($detailsList as $fetchStudentRow){
|
||||
$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,$session);
|
||||
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;
|
||||
@ -515,179 +521,90 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model {
|
||||
$formResult['Qualification']=$fetchStudentRow->Qualification;
|
||||
$formResult['UniversityID']=$fetchStudentRow->UniversityID;
|
||||
$formResult['UniversityName']=$fetchStudentRow->UniversityName;
|
||||
$formResult['UniversityPaidAmount']=$fetchStudentRow->UniversityPaidAmount;
|
||||
|
||||
// form id bases get student paid details
|
||||
$getStudentPaidDetails=$this->getFormIDStudentPaidDetails($fetchStudentRow->StudentID,$fetchStudentRow->CourseID,$fetchStudentRow->SemesterYear);
|
||||
if(sizeof($getStudentPaidDetails)!=0){
|
||||
$formResult['StudentPaidAmount']=$getStudentPaidDetails['StudentPaidAmount'];
|
||||
}
|
||||
else{
|
||||
$formResult['StudentPaidAmount']='';
|
||||
}
|
||||
|
||||
$mergeFormDetails[]=$formResult;
|
||||
|
||||
$mergeFormDetails[]=$formResult;
|
||||
}
|
||||
$resultArr['studentFeeCompareDetails'] = $mergeFormDetails;
|
||||
$resultArr['formTypeStatus'] = true;
|
||||
$resultArr['message'] = "Successfully data generated";
|
||||
} else {
|
||||
$resultArr['studentFeeCompareDetails'] = [];
|
||||
$resultArr['formTypeStatus'] = false;
|
||||
$resultArr['message'] = "No record found";
|
||||
/* if(sizeof($getStudentPaidDetails)!=0){
|
||||
$formResult['StudentPaidAmount']=$getStudentPaidDetails['StudentPaidAmount'];
|
||||
}
|
||||
else{
|
||||
$formResult['StudentPaidAmount']='';
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
$resultArr['studentFeeCompareDetails'] = $mergeFormDetails;
|
||||
$resultArr['formTypeStatus'] = true;
|
||||
$resultArr['message'] = "Successfully data generated";
|
||||
} else {
|
||||
$resultArr['studentFeeCompareDetails'] = [];
|
||||
$resultArr['formTypeStatus'] = false;
|
||||
$resultArr['message'] = "No record found";
|
||||
}
|
||||
return $resultArr;
|
||||
}
|
||||
/*form id bases get student paid details for getStudentUnivFeeCompareDetails methods*/
|
||||
public function getFormIDStudentPaidDetails($studentID=null,$courseID=null,$sem=null){
|
||||
public function getStudentsetFeesDetails($studentID=null,$courseID=null,$sem=null,$session=null){
|
||||
// create array for find sem value
|
||||
$keyArray = array(0 => 'SEM1', 1 => 'SEM2', 2 => 'SEM3', 3 => 'SEM4',4 => 'SEM5',5 => 'SEM6',6 => 'SEM7',7 => 'SEM8',8 => 'YEAR1',9 => 'YEAR2',10 => 'YEAR3',11 => 'YEAR4',12 => "DMC CHANGE SEM1",13 => "DMC CHANGE SEM2",14 => "DMC CHANGE SEM3",15 => "DMC CHANGE SEM4",16 => "DMC CHANGE SEM5",17 => "DMC CHANGE SEM6",18 => "DMC CHANGE SEM7",19 => "DMC CHANGE SEM8",20 => "DMC CHANGE YEAR1",21 => "DMC CHANGE YEAR2",22 => "DMC CHANGE YEAR3",23 => "DMC CHANGE YEAR4");
|
||||
$valueArray = array("1","2","3","4","5","6","7","8","1","2","3","4","1","2","3","4","5","6","7","8","1","2","3","4");
|
||||
$feesArray=array();
|
||||
$this->db->select("CF.ID,CF.ProgramType,CF.Sem_Year");
|
||||
$this->db->from(COURSE_FEES . ' as CF');
|
||||
$this->db->where('CF.CourseID', $courseID);
|
||||
$courseFeesDetails = $this->db->get();
|
||||
//this is for sem year type check fees
|
||||
if ($courseFeesDetails->num_rows() > 1) {
|
||||
foreach ($courseFeesDetails->result() as $fetchRow) {
|
||||
$serachKey = array_search(strtoupper($fetchRow->Sem_Year), $keyArray);
|
||||
if ($valueArray[$serachKey] == $sem) {
|
||||
$this->db->select("SUM(BillAMount) as StudentPaidAmount");
|
||||
$this->db->from(STUDENTS_FEES_STATUS . ' as SFS');
|
||||
$this->db->join(STUDENTS_FEES_PAID . ' as SFP', 'SFP.FeesId = SFS.FeesID');
|
||||
$this->db->where('SFS.FeesType', $fetchRow->ID);
|
||||
$this->db->where('SFS.StudentID', $studentID);
|
||||
$this->db->where('SFP.IsActive', '1');
|
||||
$feesDetails = $this->db->get()->last_row();
|
||||
if ($feesDetails) {
|
||||
$feesArray['StudentPaidAmount'] = $feesDetails->StudentPaidAmount;
|
||||
break;
|
||||
} else {
|
||||
$feesArray['StudentPaidAmount'] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else if($courseFeesDetails->num_rows()==1){
|
||||
foreach ($courseFeesDetails->result() as $fetchRow){
|
||||
$this->db->select("SUM(BillAMount) as StudentPaidAmount");
|
||||
$this->db->from(STUDENTS_FEES_STATUS.' as SFS');
|
||||
$this->db->join(STUDENTS_FEES_PAID.' as SFP', 'SFP.FeesId = SFS.FeesID');
|
||||
$this->db->where('SFS.FeesType',$fetchRow->ID);
|
||||
$this->db->where('SFS.StudentID',$studentID);
|
||||
$this->db->where('SFP.IsActive','1');
|
||||
$this->db->from(COURSE_FEES . ' as CF');
|
||||
$this->db->where('CF.CourseID', $courseID);
|
||||
$courseFeesDetails = $this->db->get();
|
||||
//this is for sem year type check fees
|
||||
if ($courseFeesDetails->num_rows() > 1) {
|
||||
foreach ($courseFeesDetails->result() as $fetchRow) {
|
||||
$serachKey = array_search(strtoupper($fetchRow->Sem_Year), $keyArray);
|
||||
if ($valueArray[$serachKey] == $sem) {
|
||||
$this->db->select("SM.SessionName,SM.SessionID");
|
||||
$this->db->from(STUDENTS_FEES_STATUS . ' as SFS');
|
||||
$this->db->join(SESSIONMASTER . ' as SM' , 'SM.SessionID = SFS.SessionName');
|
||||
$this->db->where('SFS.FeesType', $fetchRow->ID);
|
||||
$this->db->where('SFS.StudentID', $studentID);
|
||||
$this->db->where('SFS.SessionName', $session);
|
||||
$feesDetails = $this->db->get()->last_row();
|
||||
if ($feesDetails) {
|
||||
$feesArray['StudentPaidAmount'] = $feesDetails->StudentPaidAmount;
|
||||
$feesArray['status'] = true;
|
||||
$feesArray['SessionName'] = $feesDetails->SessionName;
|
||||
$feesArray['SessionID'] = $feesDetails->SessionID;
|
||||
break;
|
||||
} else {
|
||||
$feesArray['StudentPaidAmount'] = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
$feesArray['StudentPaidAmount'] = 0;
|
||||
}
|
||||
return $feesArray;
|
||||
}
|
||||
/*
|
||||
* form id bases get fees compare details
|
||||
* created by kms
|
||||
* */
|
||||
public function getFormIDFeeDetails($serachForm=null){
|
||||
// create array for find sem value
|
||||
$keyArray = array(0 => 'SEM1', 1 => 'SEM2', 2 => 'SEM3', 3 => 'SEM4',4 => 'SEM5',5 => 'SEM6',6 => 'SEM7',7 => 'SEM8',8 => 'YEAR1',9 => 'YEAR2',10 => 'YEAR3',11 => 'YEAR4',12 => "DMC CHANGE SEM1",13 => "DMC CHANGE SEM2",14 => "DMC CHANGE SEM3",15 => "DMC CHANGE SEM4",16 => "DMC CHANGE SEM5",17 => "DMC CHANGE SEM6",18 => "DMC CHANGE SEM7",19 => "DMC CHANGE SEM8",20 => "DMC CHANGE YEAR1",21 => "DMC CHANGE YEAR2",22 => "DMC CHANGE YEAR3",23 => "DMC CHANGE YEAR4");
|
||||
$valueArray = array("1","2","3","4","5","6","7","8","1","2","3","4","1","2","3","4","5","6","7","8","1","2","3","4");
|
||||
if($serachForm['FormID']!=''){
|
||||
$this->db->select("ENU.FormID,ENU.SemesterYear,STC.StudentID,STC.BranchID,CF.ID,CF.ProgramType,CF.Sem_Year,FFRU.Amount as UniversityPaidAmount");
|
||||
$this->db->from(ENROLMENTRECEIVEDFROMUNIV.' as ENU');
|
||||
$this->db->join(STUDENTCOURSE.' as STC', 'STC.EnrollmentID = ENU.EnrolmentNo');
|
||||
$this->db->join(COURSE_FEES.' as CF', 'CF.CourseID = STC.CourseID');
|
||||
$this->db->join(FORMFEESRECEIVEDFROMUNIV.' as FFRU', 'FFRU.FormID = ENU.FormID');
|
||||
$this->db->where('ENU.FormID',$serachForm['FormID']);
|
||||
$this->db->where('ENU.EnrolmentNo',$serachForm['EnrolmentNo']);
|
||||
$studentCourseDetails = $this->db->get();
|
||||
|
||||
//this is for sem year type check fees
|
||||
if($studentCourseDetails->num_rows()>1){
|
||||
foreach ($studentCourseDetails->result() as $fetchRow){
|
||||
$serachKey= array_search(strtoupper($fetchRow->Sem_Year),$keyArray);
|
||||
if($valueArray[$serachKey]==$fetchRow->SemesterYear){
|
||||
$this->db->select("SUM(BillAMount) as StudentPaidAmount");
|
||||
$this->db->from(STUDENTS_FEES_STATUS.' as SFS');
|
||||
$this->db->join(STUDENTS_FEES_PAID.' as SFP', 'SFP.FeesId = SFS.FeesID');
|
||||
$this->db->where('SFS.FeesType',$fetchRow->ID);
|
||||
$this->db->where('SFS.StudentID',$fetchRow->StudentID);
|
||||
$this->db->where('SFP.IsActive','1');
|
||||
$feesDetails = $this->db->get()->last_row();
|
||||
if($feesDetails){
|
||||
$feesArray['status']=true;
|
||||
$feesArray['Message']="Fees paid both student and university";
|
||||
$feesArray['Type']=$fetchRow->Sem_Year;
|
||||
$feesArray['UniversityPaidAmount']=$fetchRow->UniversityPaidAmount;
|
||||
$feesArray['StudentPaidAmount']=$feesDetails->StudentPaidAmount;
|
||||
break;
|
||||
}
|
||||
else{
|
||||
$feesArray['status']=true;
|
||||
$feesArray['Message']="University fees paid and student fees pending";
|
||||
$feesArray['Type']=$fetchRow->Sem_Year;
|
||||
$feesArray['UniversityPaidAmount']=$fetchRow->UniversityPaidAmount;
|
||||
$feesArray['StudentPaidAmount']=0;
|
||||
$feesArray['status'] = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if($studentCourseDetails->num_rows()==1){
|
||||
foreach ($studentCourseDetails->result() as $fetchRow){
|
||||
$this->db->select("SUM(BillAMount) as StudentPaidAmount");
|
||||
$this->db->from(STUDENTS_FEES_STATUS.' as SFS');
|
||||
$this->db->join(STUDENTS_FEES_PAID.' as SFP', 'SFP.FeesId = SFS.FeesID');
|
||||
$this->db->where('SFS.FeesType',$fetchRow->ID);
|
||||
$this->db->where('SFS.StudentID',$fetchRow->StudentID);
|
||||
$this->db->where('SFP.IsActive','1');
|
||||
$feesDetails = $this->db->get()->last_row();
|
||||
if($feesDetails){
|
||||
$feesArray['status']=true;
|
||||
$feesArray['Message']="Fees paid both student and university";
|
||||
$feesArray['Type']=$fetchRow->Sem_Year;
|
||||
$feesArray['UniversityPaidAmount']=$fetchRow->UniversityPaidAmount;
|
||||
$feesArray['StudentPaidAmount']=$feesDetails->StudentPaidAmount;
|
||||
break;
|
||||
}
|
||||
else{
|
||||
$feesArray['status']=true;
|
||||
$feesArray['Message']="University fees paid and student fees pending";
|
||||
$feesArray['Type']=$fetchRow->Sem_Year;
|
||||
$feesArray['UniversityPaidAmount']=$fetchRow->UniversityPaidAmount;
|
||||
$feesArray['StudentPaidAmount']=0;
|
||||
}
|
||||
else if($courseFeesDetails->num_rows()==1){
|
||||
foreach ($courseFeesDetails->result() as $fetchRow){
|
||||
$this->db->select("SM.SessionName,SM.SessionID");
|
||||
$this->db->from(STUDENTS_FEES_STATUS.' as SFS');
|
||||
$this->db->join(SESSIONMASTER . ' as SM' , 'SM.SessionID = SFS.SessionName');
|
||||
$this->db->where('SFS.FeesType',$fetchRow->ID);
|
||||
$this->db->where('SFS.StudentID',$studentID);
|
||||
$this->db->where('SFS.SessionName', $session);
|
||||
$feesDetails = $this->db->get()->last_row();
|
||||
if ($feesDetails) {
|
||||
$feesArray['status'] = true;
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
$feesArray['status']=false;
|
||||
$feesArray['Message']="Student record is mismatch because of enrolment number is not registered in student course details";
|
||||
|
||||
}
|
||||
$feesArray['SessionName'] = $feesDetails->SessionName;
|
||||
$feesArray['SessionID'] = $feesDetails->SessionID;
|
||||
break;
|
||||
} else {
|
||||
$feesArray['status'] = false;
|
||||
break;
|
||||
}
|
||||
|
||||
else{
|
||||
$feesArray['status']=false;
|
||||
$feesArray['Message']="Please check form id";
|
||||
}
|
||||
return $feesArray;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$feesArray['status'] = false;
|
||||
}
|
||||
return $feesArray;
|
||||
}
|
||||
/**
|
||||
* Unmached file details
|
||||
|
||||
@ -444,7 +444,8 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se
|
||||
}
|
||||
public function app_pending($bat=null,$br=null,$u=null){
|
||||
|
||||
$sql = "SELECT * FROM (SELECT
|
||||
$sql = "SELECT
|
||||
APFS.ID as id,
|
||||
APFS.Registration_Details_ID AS regid,
|
||||
APFS.ListCode as StatusCode,
|
||||
APFS.AppFormDate as StatusUpdationOn,
|
||||
@ -463,14 +464,18 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se
|
||||
CFD.Sem_Year as Sem_Year,
|
||||
RD.RegistrationType as FormType,
|
||||
STU.StudentID as Student_id
|
||||
FROM T_ApplicationFormStatus AS APFS LEFT JOIN T_Registration_Details AS RD ON RD.ID = APFS.Registration_Details_ID
|
||||
LEFT JOIN T_PickListDetails AS PKL ON PKL.ListCode = APFS.ListCode LEFT JOIN T_StudentDetails AS STU ON STU.StudentID = RD.StudentID LEFT JOIN T_CourseMaster AS COUR ON COUR.CourseID = RD.CourseID LEFT JOIN T_Student_CourseDetails AS STU_COUR ON STU_COUR.StudentID = RD.StudentID AND STU_COUR.CourseID = RD.CourseID
|
||||
FROM T_ApplicationFormStatus AS APFS
|
||||
LEFT JOIN T_Registration_Details AS RD ON RD.ID = APFS.Registration_Details_ID
|
||||
LEFT JOIN T_PickListDetails AS PKL ON PKL.ListCode = APFS.ListCode
|
||||
LEFT JOIN T_StudentDetails AS STU ON STU.StudentID = RD.StudentID
|
||||
LEFT JOIN T_CourseMaster AS COUR ON COUR.CourseID = RD.CourseID
|
||||
LEFT JOIN T_Student_CourseDetails AS STU_COUR ON STU_COUR.StudentID = RD.StudentID AND STU_COUR.CourseID = RD.CourseID
|
||||
LEFT JOIN T_Course_Fees_Details AS CFD ON CFD.ID = RD.FeeType
|
||||
LEFT JOIN T_UniversityMaster AS UNIV ON UNIV.UniversityID = COUR.UniversityID
|
||||
LEFT JOIN (SELECT FeesId AS FeeID, min(CreatedOn), BillDate AS BILL FROM T_Students_Fees_PaidDetails GROUP BY FeesId) AS sfpd ON sfpd.FeeID = RD.Student_Fee_Status_Id
|
||||
where COUR.UniversityID = '$u' and RD.BatchCode = '$bat'and STU_COUR.BranchID = '$br' and STU.IsActive = '1'
|
||||
ORDER BY StatusUpdationOn DESC) x
|
||||
GROUP BY x.regid";
|
||||
where STU.IsActive = '1' and APFS.ID in (select max(ID) from T_ApplicationFormStatus group by Registration_Details_ID)
|
||||
|
||||
";
|
||||
|
||||
// SELECT * FROM (SELECT APFS.Registration_Details_ID AS regid, APFS.ListCode AS StatusCode, APFS.AppFormDate AS StatusUpdationOn, APFS.Comments AS StatusComments, PKL.ListName AS StatusName, concat(STU.Firstname,' ', STU.Lastname) AS StudentName, STU.Fathername AS FatherName, STU.MobileNumber AS Phone_number, COUR.CourseName AS CourseName, UNIV.UniversityName AS UniversityName, sfpd.BILL AS InitialPayDate, RD.Student_Fee_Status_Id AS FeesStatusID, STU_COUR.EnrollmentID AS EnrollmentNumber, CFD.Sem_Year AS Sem_Year, RD.RegistrationType AS FormType, STU.StudentID
|
||||
// FROM T_ApplicationFormStatus AS APFS LEFT JOIN T_Registration_Details AS RD ON RD.ID = APFS.Registration_Details_ID
|
||||
@ -510,6 +515,20 @@ GROUP BY x.regid";
|
||||
// LEFT JOIN (Select FeesId as FeeID, min(CreatedOn), BillDate as BILL FROM T_Students_Fees_PaidDetails group by FeesId) as sfpd on sfpd.FeeID = RD.Student_Fee_Status_Id
|
||||
// where COUR.UniversityID = '$u' and RD.BatchCode = '$bat'and STU_COUR.BranchID = '$br' and STU.IsActive = '1'
|
||||
// group by APFS.Registration_Details_ID";
|
||||
|
||||
if ($bat!= ''){
|
||||
|
||||
$sql.=" and RD.BatchCode = '".$bat."'";
|
||||
|
||||
}
|
||||
if ($u!= ''){
|
||||
|
||||
$sql.=" and COUR.UniversityID = '".$u."'";
|
||||
|
||||
}
|
||||
$sql.=" group by regid,Student_id ";
|
||||
$sql.=" ORDER BY StatusUpdationOn DESC ";
|
||||
|
||||
$leadDet=$this->db->query($sql);
|
||||
$answer = $leadDet->result();
|
||||
if (count($answer) > 0) {
|
||||
|
||||
@ -15,7 +15,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
|
||||
|
||||
// load when html page load
|
||||
$scope.init = function () {
|
||||
|
||||
|
||||
var logcheck = JSON.parse(localStorage.getItem('localObj'));
|
||||
|
||||
const LOCALTYPE = logcheck.localType;
|
||||
@ -134,7 +134,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
$scope.Searchloader = false;
|
||||
$scope.studentData = false;
|
||||
|
||||
@ -278,8 +278,6 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
|
||||
}
|
||||
|
||||
$scope.receiveFormIdFeeDetails = function(details) {
|
||||
console.log(details);
|
||||
|
||||
var updateUniversityEnrolment = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'insertFormIdUnivFeeDetails/',
|
||||
@ -369,6 +367,120 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
|
||||
$scope.unMatchedRecordDetails=response.data.unMatchedRecordDetails;
|
||||
}
|
||||
});
|
||||
}
|
||||
$scope.manualEnModel={
|
||||
"enrolmentNo": '',
|
||||
"formID":"",
|
||||
"sem":'',
|
||||
};
|
||||
/*
|
||||
* add manual enrolment details
|
||||
* */
|
||||
$scope.enableEnrolment=false;
|
||||
$scope.addManualEnrolemntDetails=function (values) {
|
||||
if(values=='1'){
|
||||
$scope.enableEnrolment=!$scope.enableEnrolment;
|
||||
}
|
||||
else{
|
||||
$scope.enableEnrolment=!$scope.enableEnrolment;
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* check enrolment exist or not in student details
|
||||
* */
|
||||
$scope.semList=[];
|
||||
$scope.studentInfo=[];
|
||||
$scope.checkEnrolmentExistDetails=function (form,entryModel) {
|
||||
$scope.semList=[];
|
||||
$scope.studentInfo=[];
|
||||
var getExistEnrol = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getExistStudentEnrolmentDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
localDetails: localDetail,
|
||||
enrolmentID: entryModel
|
||||
}
|
||||
};
|
||||
$http(getExistEnrol).then(function (response) {
|
||||
if (response.data.status == true) {
|
||||
if(response.data.semDetails.length==0){
|
||||
swal("Warning","Already form enrolment is created for all semester", "warning");
|
||||
}
|
||||
else{
|
||||
$scope.studentInfo=response.data.StudentInfo;
|
||||
$scope.semList=response.data.semDetails;
|
||||
}
|
||||
|
||||
} else {
|
||||
$scope.semList=[];
|
||||
$scope.studentInfo=[];
|
||||
swal("Failed",response.data.message, "error");
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
/*
|
||||
* cancel manual entry for enrolment details
|
||||
* */
|
||||
$scope.cancelManualEntry=function (form) {
|
||||
$scope.semList=[];
|
||||
$scope.enableEnrolment=!$scope.enableEnrolment;
|
||||
}
|
||||
/*
|
||||
* submit manual entry form details
|
||||
* */
|
||||
$scope.manualEnrolmentSubmit = function (form) {
|
||||
if($scope.manualEnModel.enrolmentNo=='' || $scope.manualEnModel.enrolmentNo==null || $scope.manualEnModel.enrolmentNo==undefined){
|
||||
swal("Wraning","Please enter enrolment id", "warning");
|
||||
|
||||
}
|
||||
else if($scope.manualEnModel.sem=='' || $scope.manualEnModel.sem==null){
|
||||
swal("Wraning","Please select sem", "warning");
|
||||
|
||||
}
|
||||
else if($scope.manualEnModel.formID=='' || $scope.manualEnModel.formID==null){
|
||||
swal("Wraning","Please enter form id", "warning");
|
||||
|
||||
}
|
||||
else{
|
||||
var addEntry = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'addManualEnrolmentDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
localDetails: localDetail,
|
||||
enrolmentID: $scope.manualEnModel.enrolmentNo,
|
||||
formID: $scope.manualEnModel.formID,
|
||||
sem: $scope.manualEnModel.sem,
|
||||
studentInfo:$scope.studentInfo
|
||||
}
|
||||
};
|
||||
$http(addEntry).then(function (response) {
|
||||
if (response.data.status == true) {
|
||||
$scope.studentInfo="";
|
||||
$scope.semList=[];
|
||||
form.manualFormID.$setPristine(true);
|
||||
form.manualSem.$setPristine(true);
|
||||
swal("Success",response.data.message, "success");
|
||||
} else {
|
||||
swal("Failed",response.data.message, "error");
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}]);
|
||||
|
||||
@ -184,4 +184,21 @@ app.service('dateListDescService', function() {
|
||||
});
|
||||
return listDetails;
|
||||
}
|
||||
});
|
||||
app.directive('numberOnly', function () {
|
||||
return {
|
||||
require: 'ngModel',
|
||||
restrict: 'A',
|
||||
link: function (scope, element, attrs, ctrl) {
|
||||
ctrl.$parsers.push(function (input) {
|
||||
if (input == undefined) return ''
|
||||
var inputNumber = input.toString().replace(/[^0-9]/g, '');
|
||||
if (inputNumber != input) {
|
||||
ctrl.$setViewValue(inputNumber);
|
||||
ctrl.$render();
|
||||
}
|
||||
return inputNumber;
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
@ -43,7 +43,7 @@
|
||||
|
||||
<div class="row" ng-init="init()">
|
||||
<tabset id="here" class="tabbable">
|
||||
<tab tabindex="1" active="tabactive1" ng-click="tabActive('tabactive1')" heading="View Details" id="viewDetails">
|
||||
<tab tabindex="1" active="tabactive1" ng-click="tabActive('tabactive1')" heading="View Enrolment Details" id="viewDetails">
|
||||
<script>
|
||||
$("#selectBranch").change(function () {
|
||||
$("#searchIn").focus();
|
||||
@ -51,6 +51,89 @@
|
||||
$("#searchIn").focus();
|
||||
});
|
||||
</script>
|
||||
<div class="col-md-12">
|
||||
<button class="btn btn-sm btn-info" tabindex="2" style="float: right" ng-click="addManualEnrolemntDetails('1')">Add Enrolment Details</button>
|
||||
</div>
|
||||
<div class="container" ng-show="enableEnrolment==true">
|
||||
<form name="manualEnForm" id="manualEnForm" novalidate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<fieldset>
|
||||
<legend>
|
||||
Add Enrolment Details
|
||||
</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-12 form-group"
|
||||
ng-class="{'has-error':manualEnForm.manualEnrolmentNo.$dirty && manualEnForm.manualEnrolmentNo.$invalid, 'has-success':manualEnForm.manualEnrolmentNo.$valid}">
|
||||
<label>
|
||||
Enrolment ID<span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Enrolment No"
|
||||
autofocus tabindex="3" class="form-control" name="manualEnrolmentNo" id="manualEnrolmentNo" ng-minlength="6" ng-maxlength="18"
|
||||
ng-model="manualEnModel.enrolmentNo" required />
|
||||
<span class="error text-small block"
|
||||
ng-if="manualEnForm.manualEnrolmentNo.$dirty && manualEnForm.manualEnrolmentNo.$invalid"
|
||||
ng-hide="manualEnForm.manualEnrolmentNo.$error.maxlength || manualEnForm.manualEnrolmentNo.$error.minlength || manualEnForm.manualEnrolmentNo.$error.pattern">Enrolment no is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="manualEnForm.manualEnrolmentNo.$error.maxlength || manualEnForm.manualEnrolmentNo.$error.minlength || manualEnForm.manualEnrolmentNo.$error.pattern">Enter a valid enrolment no</span>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 form-group">
|
||||
<button class="btn btn-sm btn-info" tabindex="4" style="float: left" ng-click="checkEnrolmentExistDetails(Form,manualEnModel.enrolmentNo);">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8" ng-if="semList.length!=0">
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':manualEnForm.manualSem.$dirty && manualEnForm.manualSem.$invalid, 'has-success':manualEnForm.manualSem.$valid}">
|
||||
<label>
|
||||
Sem <span class="symbol required"></span>
|
||||
</label>
|
||||
<select class="form-control" name="manualSem" tabindex="5" id="manualSem"
|
||||
ng-model="manualEnModel.sem"
|
||||
ng-options="semD.sem for semD in semList"
|
||||
required>
|
||||
<option value=""> Select sem</option>
|
||||
</select>
|
||||
<span class="error text-small block"
|
||||
ng-if="manualEnForm.manualSem.$dirty && manualEnForm.manualSem.$invalid">Sem is required</span>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 form-group" ng-class="{'has-error':manualEnForm.manualFormID.$dirty && manualEnForm.manualFormID.$invalid, 'has-success':manualEnForm.manualFormID.$valid}">
|
||||
<label> Form ID <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" tabindex="6" placeholder="Enter Form ID"
|
||||
class="form-control" name="manualFormID"
|
||||
ng-model="manualEnModel.formID" required number-only/>
|
||||
<span class="error text-small block"
|
||||
ng-if="manualEnForm.manualFormID.$dirty && manualEnForm.manualFormID.$invalid">Form id is required</span>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button tabindex="14" type="button" ng-click="manualEnrolmentSubmit(manualEnForm)" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in">
|
||||
Save
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning btn-wide" tabindex="15"
|
||||
ng-click="cancelManualEntry(manualEnForm)">
|
||||
Cancel
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="container-fluid container-fullw">
|
||||
<form name="Form" id="form" novalidate ng-submit="onSubmit()" method="post">
|
||||
@ -104,6 +187,8 @@
|
||||
<tr>
|
||||
<th> FormID
|
||||
</th>
|
||||
<th> Enrolment No
|
||||
</th>
|
||||
<th> Form Type
|
||||
</th>
|
||||
<th> Student Name
|
||||
@ -116,12 +201,7 @@
|
||||
</th>
|
||||
<th> Sem/Year
|
||||
</th>
|
||||
<th> Enrolment ID
|
||||
</th>
|
||||
<th> University Paid
|
||||
</th>
|
||||
<th> Student Paid
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10| filter:query as results">
|
||||
@ -129,6 +209,7 @@
|
||||
<td>
|
||||
{{p.FormID}}
|
||||
</td>
|
||||
<td>{{p.EnrolmentNo}}</td>
|
||||
<td>
|
||||
{{p.FormType}}
|
||||
</td>
|
||||
@ -142,9 +223,7 @@
|
||||
<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>
|
||||
<i class="ti-write" tooltip="View Fee Details" id="personalDetailButton" ng-click="setEditId(p.FormID);getFeeCompareDetails(p.FormID, p.EnrolmentNo)"></i>
|
||||
</td>-->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user