rollno, enrollmentid duplication
This commit is contained in:
parent
517253d8a1
commit
2bf83f5f99
@ -701,6 +701,8 @@ class Student_Controller extends REST_Controller {
|
||||
|
||||
// add new course for student
|
||||
public function insertStudentCourse_post() {
|
||||
|
||||
|
||||
$addStudent = $this->post('addStudent');
|
||||
$coursedata = $this->post('coursedata');
|
||||
$createdBy = $this->post('createdBy');
|
||||
@ -733,6 +735,9 @@ class Student_Controller extends REST_Controller {
|
||||
}
|
||||
|
||||
public function insertStudentImg_post() {
|
||||
|
||||
|
||||
|
||||
$imagename = $_FILES['idStuProof']['name'];
|
||||
$size = $_FILES['idStuProof']['size'];
|
||||
$imageSource = $_FILES['idStuProof']['tmp_name'];
|
||||
|
||||
@ -1176,10 +1176,36 @@ class Fees_status_model extends CI_Model
|
||||
* */
|
||||
public function setFees($details=null,$jsonData=null){
|
||||
|
||||
|
||||
// print_r($details);
|
||||
//echo 'in';
|
||||
// print_r($details);
|
||||
//print_r($jsonData);
|
||||
//die();
|
||||
$RollNo= $details['RollNo'];
|
||||
|
||||
|
||||
|
||||
if($RollNo !='')
|
||||
{
|
||||
|
||||
$this->db->select('*');
|
||||
$this->db->from('T_Students_Fees_Status');
|
||||
$this->db->where('RollNo',$RollNo);
|
||||
$this->db->where('CourseID',$details['CourseID']);
|
||||
$qry=$this->db->get();
|
||||
$qry=$qry->result();
|
||||
|
||||
//echo count($qry);die();
|
||||
|
||||
if(count($qry)>0)
|
||||
{
|
||||
$result['setStatus'] = false;
|
||||
$result['message'] = "RollNo Already Exists";
|
||||
|
||||
return $result;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1045,6 +1045,41 @@ class Student_model extends CI_Model {
|
||||
|
||||
// add student
|
||||
public function add_student($Arr, $courseArr, $imagename, $imageSource, $size) {
|
||||
// print_r($courseArr);die();
|
||||
|
||||
$Enrollment = $courseArr['EnrollmentID'];
|
||||
|
||||
|
||||
|
||||
|
||||
if($Enrollment !='')
|
||||
{
|
||||
|
||||
$this->db->select('*');
|
||||
$this->db->from('T_Student_CourseDetails');
|
||||
$this->db->where('EnrollmentID',$Enrollment);
|
||||
$this->db->where('UniversityID',$courseArr['UniversityID']);
|
||||
$qry=$this->db->get();
|
||||
$qry=$qry->result();
|
||||
|
||||
//print_r($this->db->last_query());die();
|
||||
|
||||
//echo count($qry);die();
|
||||
|
||||
if(count($qry)>0)
|
||||
{
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "EnrollmentID Already Exists";
|
||||
|
||||
return $result;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// echo $this->getBranchActiveStatusforStuAdd($courseArr['BranchID'])['branch_active_status'];exit();
|
||||
if ($this->getBranchActiveStatusforStuAdd($courseArr['BranchID']) ['branch_active_status'] === '1') {
|
||||
// echo 'in';exit();
|
||||
@ -1159,6 +1194,9 @@ class Student_model extends CI_Model {
|
||||
$result['message'] = "New Student cannot able to create for In-Active Branch";
|
||||
}
|
||||
return $result;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// check existing data while update
|
||||
@ -1479,6 +1517,38 @@ class Student_model extends CI_Model {
|
||||
|
||||
// Update Student Course Details
|
||||
public function update_student_course($reqArr, $id) {
|
||||
|
||||
|
||||
$Enrollment = $reqArr['EnrollmentID'];
|
||||
|
||||
|
||||
if($Enrollment !='')
|
||||
{
|
||||
|
||||
$this->db->select('*');
|
||||
$this->db->from('T_Student_CourseDetails');
|
||||
$this->db->where('EnrollmentID',$Enrollment);
|
||||
$this->db->where_not_in('StudentID', $reqArr['StudentID']);
|
||||
$this->db->where_not_in('CourseID', $reqArr['CourseID']);
|
||||
$qry=$this->db->get();
|
||||
$qry=$qry->result();
|
||||
|
||||
//echo count($qry);die();
|
||||
|
||||
if(count($qry)>0)
|
||||
{
|
||||
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "EnrollmentID Already Exists";
|
||||
return $result;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->db->select('*');
|
||||
$this->db->from(STUDENTCOURSE);
|
||||
$this->db->where('StudentID', $reqArr['StudentID']);
|
||||
|
||||
@ -728,11 +728,11 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
|
||||
//alert('set fee page');return false;
|
||||
|
||||
|
||||
//console.log(form)
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
|
||||
alert('if');
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
@ -749,7 +749,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
swal("", "Please check session details/installment details", "warning");
|
||||
} else {
|
||||
|
||||
|
||||
// alert('in')
|
||||
/* if(isNaN(installment.date)){
|
||||
$scope.pushDueDate1= $rootScope.lastInstallemtDate;
|
||||
}
|
||||
@ -775,10 +775,14 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
});
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
if(updateModel.Sem_Year!='TC' && updateModel.Sem_Year!='PPC' && updateModel.Sem_Year!='DC' && updateModel.Sem_Year!='MC' && updateModel.Sem_Year!='OTHER'){
|
||||
var checkTotamt=0;
|
||||
|
||||
angular.forEach($rootScope.updateMoreItems, function (value, key) {
|
||||
|
||||
console.log(value.Amount)
|
||||
checkTotamt=parseInt(checkTotamt)+parseInt(value.Amount);
|
||||
|
||||
if(isNaN(value.DueDate)){
|
||||
@ -791,18 +795,21 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
$rootScope.updateMoreItems[key].DueDate=$scope.pushDueDate2;
|
||||
}
|
||||
});
|
||||
if(parseInt($scope.setTotalAmount)<checkTotamt){
|
||||
var statusUpdate=false;
|
||||
swal("Please check total/installment amount ");
|
||||
}
|
||||
else if(parseInt($scope.setTotalAmount)>checkTotamt){
|
||||
var statusUpdate=false;
|
||||
swal("Please check total/installment amount ");
|
||||
}
|
||||
else if(parseInt($scope.setTotalAmount)==checkTotamt){
|
||||
|
||||
// console.log($scope.setTotalAmount);
|
||||
//console.log(checkTotamt)
|
||||
// if(parseInt($scope.setTotalAmount)<checkTotamt){
|
||||
// var statusUpdate=false;
|
||||
// swal("Please check total/installment amount ");
|
||||
// }
|
||||
// else if(parseInt($scope.setTotalAmount)>checkTotamt){
|
||||
// var statusUpdate=false;
|
||||
// swal("Please check total/installment amount ");
|
||||
// }
|
||||
// else if(parseInt($scope.setTotalAmount)==checkTotamt){
|
||||
var statusUpdate=true;
|
||||
|
||||
}
|
||||
// }
|
||||
}
|
||||
else{
|
||||
if(updateModel.Valid=='1'){
|
||||
|
||||
@ -3097,6 +3097,8 @@ $scope.getPhoneNoHistoy = function(studentId)
|
||||
$scope.studentFORM = {
|
||||
submit: function (form, myModel, myModelCourseAdd) {
|
||||
// alert(JSON.stringify(myModelCourseAdd));
|
||||
|
||||
//alert('ion');die();
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user