student enrollment changes: kdk

This commit is contained in:
resicovenba 2018-03-22 16:52:32 +05:30
parent f0fa6f6cf6
commit 22b9a4ea94
5 changed files with 24 additions and 31 deletions

View File

@ -326,14 +326,13 @@ class Student_model extends CI_Model
// print_r($getSearchData);exit();
$this->db->select('t1.*');
$this->db->select("t1.*, IF(t3.ID > 0, '1' , '0') as Fee_paid_exist");
$this->db->from('' . STUDENTS . ' as t1');
$this->db->join('' . STUDENTCOURSE . ' as t2', 't2.StudentID = t1.StudentID', 'LEFT');
$this->db->join('' . STUDENTS_FEES_PAID . ' as t3', 't3.StudentID = t1.StudentID', 'LEFT');
$this->db->where('t2.BranchID', $loginUserBranchId);
$this->db->group_by('t2.StudentID');
// $this->db->from(STUDENTS);
$this->db->order_by('t2.CreatedOn', 'DESC');
$stuDetails = $this->db->get();
$checkArr = $stuDetails->result();
@ -366,10 +365,10 @@ class Student_model extends CI_Model
$StuStatus = $getSearchData['Status'];
if ($StuStatus == '') {
if ($University != '' && $Course == '') {
$subQuery = "SELECT S.*
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist
FROM " . STUDENTS . " as S LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID LEFT JOIN " . COURSE . " as C ON
SC.CourseID = C.CourseID
SC.CourseID = C.CourseID LEFT JOIN ". STUDENTS_FEES_PAID ." as SFP ON SFP.StudentID = S.StudentID
WHERE
SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId'
@ -377,10 +376,10 @@ class Student_model extends CI_Model
ORDER BY S.CreatedOn";
}
else if ($University != '' && $Course != '') {
$subQuery = "SELECT S.*
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist
FROM " . STUDENTS . " as S LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID LEFT JOIN " . COURSE . " as C ON
SC.CourseID = C.CourseID
SC.CourseID = C.CourseID LEFT JOIN ". STUDENTS_FEES_PAID ." as SFP ON SFP.StudentID = S.StudentID
WHERE
SC.CourseID = '$Course' AND SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId'
@ -395,10 +394,10 @@ class Student_model extends CI_Model
}
else {
if ($University != '' && $Course == '') {
$subQuery = "SELECT S.*
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist
FROM " . STUDENTS . " as S LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID LEFT JOIN " . COURSE . " as C ON
SC.CourseID = C.CourseID
SC.CourseID = C.CourseID LEFT JOIN ". STUDENTS_FEES_PAID ." as SFP ON SFP.StudentID = S.StudentID
WHERE
SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId'
@ -407,10 +406,10 @@ class Student_model extends CI_Model
ORDER BY S.CreatedOn";
}
else if ($University != '' && $Course != '') {
$subQuery = "SELECT S.*
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist
FROM " . STUDENTS . " as S LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID LEFT JOIN " . COURSE . " as C ON
SC.CourseID = C.CourseID
SC.CourseID = C.CourseID LEFT JOIN ". STUDENTS_FEES_PAID ." as SFP ON SFP.StudentID = S.StudentID
WHERE
SC.CourseID = '$Course' AND SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId'
@ -452,13 +451,16 @@ class Student_model extends CI_Model
// echo $req['localBranchID'];exit();
$this->db->select('t1.*,t2.UniversityName,t3.CourseName,t3.CourseCode,t4.SessionName');
$this->db->select("t1.*,t2.UniversityName,t3.CourseName,t3.CourseCode,t4.SessionName, IF(t6.ID > 0, '1' , '0') as Fee_paid_exist");
$this->db->from('' . STUDENTCOURSE . ' as t1');
$this->db->join('' . UNIVERSITY . ' as t2', 't2.UniversityID = t1.UniversityID', 'LEFT');
$this->db->join('' . COURSE . ' as t3', 't3.CourseID = t1.CourseID', 'LEFT');
$this->db->join('' . SESSIONMASTER . ' as t4', 't4.SessionID = t1.SessionID', 'LEFT');
$this->db->join(''.STUDENTS_FEES_STATUS.' as t5', 't5.StudentID = '.$studentId.' AND t5.CourseID = t1.CourseID', 'LEFT');
$this->db->join(''.STUDENTS_FEES_PAID.' as t6', 't6.FeesId = t5.FeesID', 'LEFT');
$this->db->where('t1.BranchID', $req['localBranchID']);
$this->db->where('StudentID', $studentId);
$this->db->where('t1.StudentID', $studentId);
$this->db->group_by('t1.StudentID');
$courseDetails = $this->db->get();
$checkArr = $courseDetails->result();
if (count($checkArr) > 0) {

View File

@ -65,7 +65,6 @@ $scope.dayBookApprovalAccess = '';
return true;
}
});
}
// $scope.getApproveLoad = function() {

View File

@ -51,6 +51,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
// load when html page load
$scope.init = function () {
$scope.localUserType = localDetails.localType;
$scope.todayDate = new Date();
var nowInMS = new Date().getTime(),
sixteenYearsInMS = 1000 * 60 * 60 * 24 * 365 * 16,
@ -1423,6 +1424,7 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
$scope.viewStudentDetailsPage = false;
// load when html page load
$scope.init = function () {
$scope.localUserType = localDetails.localType;
if (localDetail != null) {
if (localDetails.localType === 'R004') {
$scope.getBranchList();

View File

@ -44,7 +44,7 @@
<td>{{s.Specilization2}}</td>
<!--<td>{{s.SessionName}}</td>-->
<td>{{s.DOJ}}</td>
<td ng-click="getStudentCourseDetails(s.ID)"><i class="fa fa-edit"></i></td>
<td ng-hide="s.Fee_paid_exist == 1 && localUserType == 'R002'" ng-click="getStudentCourseDetails(s.ID)"><i class="fa fa-edit"></i></td>
</tr>
</tbody>
</table>

View File

@ -103,9 +103,7 @@
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 form-group" ng-class="{'has-error':Form.primaryPhone.$dirty && Form.primaryPhone.$invalid, 'has-success':Form.primaryPhone.$valid}">
@ -115,7 +113,7 @@
</label>
<input type="text" name="primaryPhone" tabindex="2000" placeholder="Enter Mobile Number" class="form-control" ng-model="p.MobileNumber"
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" ng-blur='updateCheckMobileExist(p)'
id="primaryPhone1" required/>
ng-disabled="p.Fee_paid_exist == 1 && localUserType == 'R002'" id="primaryPhone1" required/>
<span class="error text-small block" ng-if="Form.primaryPhone.$dirty && Form.primaryPhone.$invalid" ng-hide="Form.primaryPhone.$error.maxlength || Form.primaryPhone.$error.minlength || Form.primaryPhone.$error.pattern">Mobile Number is required.</span>
<span class="error text-small block" ng-if="Form.primaryPhone.$error.maxlength || Form.primaryPhone.$error.minlength || Form.primaryPhone.$error.pattern">Enter a Valid Phone Number</span>
</div>
@ -124,7 +122,7 @@
First Name <span class="symbol required"></span>
</label>
<input type="text" placeholder="Enter First Name" tabindex="2001" class="form-control" name="firstname" ng-model="p.Firstname"
capitalize-first ng-pattern="/^[a-zA-Z.\s]*$/" required/>
ng-disabled="p.Fee_paid_exist == 1 && localUserType == 'R002'" capitalize-first ng-pattern="/^[a-zA-Z.\s]*$/" required/>
<span class="error text-small block" ng-if="Form.firstname.$dirty && Form.firstname.$error.required">First Name is required</span>
<span class="error text-small block" ng-if="Form.firstname.$dirty && Form.firstname.$error.pattern">Invalid First Name </span>
</div>
@ -133,7 +131,7 @@
Last Name <span class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Last Name" tabindex="2002" class="form-control" name="lastname" ng-model="p.Lastname"
capitalize-first ng-pattern="/^[a-zA-Z.\s]*$/" required/>
ng-disabled="p.Fee_paid_exist == 1 && localUserType == 'R002'" capitalize-first ng-pattern="/^[a-zA-Z.\s]*$/" required/>
<span class="error text-small block" ng-if="Form.lastname.$dirty && Form.lastname.$error.required">Last Name is required</span>
<span class="error text-small block" ng-if="Form.lastname.$dirty && Form.lastname.$error.pattern">Invalid Last Name </span>
</div>
@ -179,7 +177,6 @@
<span class="error text-small block" ng-if="Form.secondaryPhone.$dirty && Form.secondaryPhone.$invalid" ng-hide="Form.secondaryPhone.$error.maxlength || Form.secondaryPhone.$error.minlength || Form.secondaryPhone.$error.pattern">Alternate Mobile Number is required.</span>
<span class="error text-small block" ng-if="Form.secondaryPhone.$error.maxlength || Form.secondaryPhone.$error.minlength || Form.secondaryPhone.$error.pattern">Enter a Valid Phone Number</span>
</div>
<div data-ng-controller="DatepickerDemoCtrl">
<div class="col-md-4 form-group" ng-class="{'has-error':Form.dateofbirth.$dirty && Form.dateofbirth.$invalid, 'has-success':Form.dateofbirth.$valid}">
<label>
@ -191,8 +188,6 @@
datepicker-options="dateOptions" placeholder="Select Date of Birth" close-text="Close"
required="required" ng-change="getMaxEndDate(myModel.startDate)" show-button-bar="true"
/>
<span class="error text-small block" ng-if="Form.dateofbirth.$dirty && Form.dateofbirth.$invalid" ng-hide="Form.dateofbirth.$error.maxlength">Date of Birth is required.</span>
<span class="error text-small block" ng-if="Form.dateofbirth.$error.maxlength">Enter a Valid Date of Birth</span>
</div>
@ -242,7 +237,6 @@
</div>
</div>
<div class="row">
<div class="col-md-4 form-group">
<div class="row">
<div class="col-md-6 form-group" ng-class="{'has-error':Form.otherId.$dirty && Form.otherId.$invalid}">
@ -286,7 +280,6 @@
</div>
<div class="row">
<div class="col-md-4 form-group" ng-class="{'has-error':Form.religion.$dirty && Form.religion.$invalid}">
<label>
Religion
@ -309,7 +302,6 @@
<label>
Pre Qualification
</label>
<input type="text" placeholder="Enter Qualification" tabindex="2018" class="form-control" name="qualificaion" ng-model="p.PreQualification"
/>
<span class="error text-small block" ng-if="Form.qualificaion.$dirty && Form.qualificaion.$error.pattern">Enter a Valid Qualification</span>
@ -350,7 +342,7 @@
Referred By
</label>
<input type="text" placeholder="Enter Refer's Name" tabindex="2022" class="form-control" name="referredby" ng-model="p.ReferredBy"
ng-pattern="/^[a-zA-Z.\s]*$/" />
ng-disabled="p.Fee_paid_cound > 0" ng-pattern="/^[a-zA-Z.\s]*$/" />
<span class="error text-small block" ng-if="Form.referredby.$dirty && Form.referredby.$error.pattern">Invalid Referred By </span>
</div>
<div class="col-md-4 form-group" ng-class="{'has-error':Form.referredmobilenumber.$dirty && Form.referredmobilenumber.$invalid}">
@ -358,8 +350,8 @@
Refer's Mobile Number
</label>
<input type="text" name="referredmobilenumber" tabindex="2023" placeholder="Enter Refer's Mobile Number" class="form-control"
ng-model="p.ReferersMobileNumber" ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/"
/>
ng-disabled="p.Fee_paid_cound > 0" ng-model="p.ReferersMobileNumber" ng-minlength="10"
ng-maxlength="12" ng-pattern="/^[0-9]*$/" />
<span class="error text-small block" ng-if="Form.referredmobilenumber.$dirty && Form.referredmobilenumber.$invalid" ng-hide="Form.referredmobilenumber.$error.maxlength || Form.referredmobilenumber.$error.minlength || Form.referredmobilenumber.$error.pattern">Refer's Mobile Number is required.</span>
<span class="error text-small block" ng-if="Form.referredmobilenumber.$error.maxlength || Form.referredmobilenumber.$error.minlength || Form.referredmobilenumber.$error.pattern">Enter a Valid Phone Number</span>
</div>
@ -416,7 +408,6 @@
</form>
</tab>
<tab heading="Document Details" id="documentDetails">
<tabset class="tabbable" style="border: 1px solid #c5c5c5; border-radius: 3px; box-shadow: 3px 5px #c3c3c3;">
<tab heading="Add Document Details" id="addDocumentDetails">
<div ng-init="getStuEntrollDocDetails(p.StudentID)">
@ -446,7 +437,6 @@
<span>
<input type="file" tabindex="3001" accept="/*" file-upload-document />
</span>
</div>
<div class="col-md-2">
<label>