issues fixes : ps

This commit is contained in:
Sanjeev 2020-12-01 22:20:51 +05:30
parent 56a4b89abd
commit b47e1ce6d2
6 changed files with 53 additions and 36 deletions

View File

@ -153,7 +153,7 @@ order by CourseID) as cm
on cm.cid=cfd.ccid on cm.cid=cfd.ccid
left join left join
(SELECT StudentID as sid,MobileNumber as phone,IsActive as active,concat(FirstName,' ',Lastname) as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid (SELECT StudentID as sid,MobileNumber as phone,IsActive as active,concat(FirstName,' ',Lastname) as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid
left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch,ifnull(Status,'-') as coursestatus FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and (scd.coursestatus != 'Cancelled' or scd.coursestatus != 'Discontinued' or scd.coursestatus != 'Refund_issued') left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch,ifnull(Status,'-') as coursestatus FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid
left join (select ID,StudentID as sid,Sem, left join (select ID,StudentID as sid,Sem,
if(ListName = 'SENT TO UNIVERSITY', AnsDate,'-') as ansdate,CourierDetails as courierdetails if(ListName = 'SENT TO UNIVERSITY', AnsDate,'-') as ansdate,CourierDetails as courierdetails
from T_AnswerBookletStatus abs from T_AnswerBookletStatus abs
@ -215,7 +215,7 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se
LEFT JOIN (SELECT StudentID AS sid,UniversityID AS uid,CourseID AS cid,EnrollmentID AS eid,BranchID AS branch,ifnull(STATUS,'-') AS coursestatus FROM T_Student_CourseDetails) AS scd LEFT JOIN (SELECT StudentID AS sid,UniversityID AS uid,CourseID AS cid,EnrollmentID AS eid,BranchID AS branch,ifnull(STATUS,'-') AS coursestatus FROM T_Student_CourseDetails) AS scd
ON scd.sid=sfs.sid AND (scd.coursestatus IS NULL OR (scd.coursestatus != 'Refund_issued' AND scd.coursestatus != 'Discontinued' AND scd.coursestatus != 'Cancelled')) ON scd.sid=sfs.sid
LEFT JOIN (SELECT ID,StudentID AS sid,Sem, LEFT JOIN (SELECT ID,StudentID AS sid,Sem,
IF(ListName = 'SENT TO UNIVERSITY', AnsDate,'-') AS ansdate,CourierDetails AS courierdetails IF(ListName = 'SENT TO UNIVERSITY', AnsDate,'-') AS ansdate,CourierDetails AS courierdetails
@ -234,7 +234,7 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se
GROUP BY sid,sem) AS apdate GROUP BY sid,sem) AS apdate
ON apdate.sid=sfs.sid AND apdate.sem=cfd.syear ON apdate.sid=sfs.sid AND apdate.sem=cfd.syear
LEFT JOIN BalFees bal ON bal.student=sfs.sid AND bal.feestype=sfs.ftype AND bal.semyr=sms.sem LEFT JOIN BalFees bal ON bal.student=sfs.sid AND bal.feestype=sfs.ftype AND bal.semyr=sms.sem AND bal.totalpayable is not null
where std.active = 1 and sfs.branch = '".$br."' "; where std.active = 1 and sfs.branch = '".$br."' ";
if ($bat!= ''){ if ($bat!= ''){
@ -258,7 +258,9 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se
$tod=date("Y-m-d",strtotime($to)); $tod=date("Y-m-d",strtotime($to));
$sql.=" and sms.CreatedOn <= '".$tod."'"; $sql.=" and sms.CreatedOn <= '".$tod."'";
} }
$sql.=" AND (scd.coursestatus IS NULL OR (scd.coursestatus != 'Refund_issued' AND scd.coursestatus != 'Discontinued' AND scd.coursestatus != 'Cancelled'))";
$sql.=" group by Student_id,Course_id,Batch_code,Branch_code,Sem,Sem_year"; $sql.=" group by Student_id,Course_id,Batch_code,Branch_code,Sem,Sem_year";
// print_r($sql);die();
$leadDet=$this->db->query($sql); $leadDet=$this->db->query($sql);
$mstatusDetails = $leadDet->result(); $mstatusDetails = $leadDet->result();
if (count($mstatusDetails) > 0) { if (count($mstatusDetails) > 0) {
@ -351,7 +353,7 @@ LEFT JOIN
(SELECT StudentID AS sid,MobileNumber AS phone,IsActive AS active,concat(FirstName,' ',Lastname) AS NAME,Fathername AS father,PermanentAddress AS address,AlternateNumber FROM T_StudentDetails) AS std ON std.sid=sms.sid (SELECT StudentID AS sid,MobileNumber AS phone,IsActive AS active,concat(FirstName,' ',Lastname) AS NAME,Fathername AS father,PermanentAddress AS address,AlternateNumber FROM T_StudentDetails) AS std ON std.sid=sms.sid
LEFT JOIN LEFT JOIN
(SELECT StudentID AS sid,UniversityID AS uid,CourseID AS cid,EnrollmentID AS eid,BranchID AS branch,ifnull(Status,'-') as coursestatus (SELECT StudentID AS sid,UniversityID AS uid,CourseID AS cid,EnrollmentID AS eid,BranchID AS branch,ifnull(Status,'-') as coursestatus
FROM T_Student_CourseDetails) AS scd ON scd.sid=sms.sid AND scd.cid=sms.cid And (scd.coursestatus IS NULL OR (scd.coursestatus != 'Refund_issued' AND scd.coursestatus != 'Discontinued' AND scd.coursestatus != 'Cancelled')) FROM T_Student_CourseDetails) AS scd ON scd.sid=sms.sid AND scd.cid=sms.cid
where sms.branch = '".$br."'"; where sms.branch = '".$br."'";
$sql = "SELECT $sql = "SELECT
@ -412,7 +414,7 @@ LEFT JOIN
LEFT JOIN T_PickListDetails p ON p.ListCode = app.ListCode LEFT JOIN T_PickListDetails p ON p.ListCode = app.ListCode
LEFT JOIN BalFees bal ON bal.student = app.StudentID LEFT JOIN BalFees bal ON bal.student = app.StudentID
AND bal.course = app.CourseID AND bal.course = app.CourseID
AND bal.feestype = app.CertificationType AND bal.feestype = app.CertificationType AND bal.totalpayable is not null
WHERE WHERE
app.CertificationType NOT LIKE 'CERT%' app.CertificationType NOT LIKE 'CERT%'
AND app.ID IN (SELECT AND app.ID IN (SELECT
@ -470,10 +472,9 @@ LEFT JOIN
IFNULL(Status, '-') AS coursestatus IFNULL(Status, '-') AS coursestatus
FROM FROM
T_Student_CourseDetails) AS scd ON scd.sid = sfs.sid AND scd.cid = sfs.cid T_Student_CourseDetails) AS scd ON scd.sid = sfs.sid AND scd.cid = sfs.cid
AND (scd.coursestatus IS NULL OR (scd.coursestatus != 'Refund_issued' AND scd.coursestatus != 'Discontinued' AND scd.coursestatus != 'Cancelled'))
where sfs.branch = '".$br."'"; where sfs.branch = '".$br."'";
$sql.=" AND (scd.coursestatus IS NULL OR (scd.coursestatus != 'Refund_issued' AND scd.coursestatus != 'Discontinued' AND scd.coursestatus != 'Cancelled'))";
if ($bat!= ''){ if ($bat!= ''){
$sql.=" and sfs.batch = '".$bat."'"; $sql.=" and sfs.batch = '".$bat."'";
@ -904,7 +905,7 @@ 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_PickListDetails AS PKL ON PKL.ListCode = APFS.ListCode
LEFT JOIN T_StudentDetails AS STU ON STU.StudentID = RD.StudentID 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_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 and (STU_COUR.Status != 'Cancelled' or STU_COUR.Status != 'Discontinued' or STU_COUR.Status != 'Refund_issued') 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_Course_Fees_Details AS CFD ON CFD.ID = RD.FeeType
LEFT JOIN T_UniversityMaster AS UNIV ON UNIV.UniversityID = COUR.UniversityID LEFT JOIN T_UniversityMaster AS UNIV ON UNIV.UniversityID = COUR.UniversityID
LEFT JOIN BalFees AS BALFEE ON BALFEE.student = STU.StudentID LEFT JOIN BalFees AS BALFEE ON BALFEE.student = STU.StudentID
@ -946,7 +947,7 @@ LEFT JOIN T_Student_CourseDetails AS STU_COUR ON STU_COUR.StudentID = sfs.Studen
AND STU_COUR.CourseID = sfs.CourseID AND STU_COUR.CourseID = sfs.CourseID
LEFT JOIN T_Course_Fees_Details AS CFD ON CFD.ID = sfs.FeesType LEFT JOIN T_Course_Fees_Details AS CFD ON CFD.ID = sfs.FeesType
LEFT JOIN T_UniversityMaster AS UNIV ON UNIV.UniversityID = sfs.CourseID LEFT JOIN T_UniversityMaster AS UNIV ON UNIV.UniversityID = sfs.CourseID
LEFT JOIN BalFees AS BALFEE ON BALFEE.student = sfs.StudentID LEFT JOIN BalFees AS BALFEE ON BALFEE.student = sfs.StudentID AND BALFEE.totalpayable is not null
LEFT JOIN LEFT JOIN
(SELECT (SELECT
FeesId AS FeeID, FeesId AS FeeID,

View File

@ -121,13 +121,32 @@ $scope.generateButtonStatus = false;
}); });
$scope.onSubmit = function () { $scope.onSubmit = function (form) {
$scope.isLoaderShow1 =true; $scope.isLoaderShow1 =true;
if($scope.univModel.university !== null && $scope.univModel.university !== '' ){ if($scope.univModel.university !== null && $scope.univModel.university !== '' ){
$scope.filterUniv = angular.fromJson($scope.univModel.university); $scope.filterUniv = angular.fromJson($scope.univModel.university);
}else { }else {
$scope.filterUniv = ''; $scope.filterUniv = '';
} }
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
$scope.show = true;
for (field in form) {
console.log('field',field);
if (field[0] != '$') {
if (firstError === null && !form[field].$valid) {
firstError = form[field].$name;
}
if (form[field].$pristine) {
form[field].$dirty = true;
}
}
}
angular.element('.ng-invalid[name=' + firstError + ']').focus();
}else{
//alert($scope.batch.name); //alert($scope.batch.name);
$scope.cert_data = ''; $scope.cert_data = '';
$scope.message = ''; $scope.message = '';
@ -167,7 +186,7 @@ $scope.generateButtonStatus = false;
} }
}); });
}
} }
var mystyle = { var mystyle = {
sheetid: 'CERTIFICATE STATUS REPORT', sheetid: 'CERTIFICATE STATUS REPORT',

View File

@ -122,24 +122,21 @@ $scope.generateButtonStatus = false;
$scope.show = false; $scope.show = false;
$scope.onSubmit = function (form) { $scope.onSubmit = function (form) {
$scope.isLoaderShow1 =true; $scope.isLoaderShow1 =true;
console.log(form);
var firstError = null; var firstError = null;
if (form.$invalid) { if (form.$invalid) {
var field = null, firstError = null; var field = null, firstError = null;
$scope.show = true; $scope.show = true;
for (field in form) { for (field in form) {
console.log('field',field);
console.log($batch);
if (field[0] != '$') { if (field[0] != '$') {
if (firstError === null && !form[field].$valid) { if (firstError === null && !form[field].$valid) {
firstError = form[field].$batch; firstError = form[field].$name;
} }
if (form[field].$pristine) { if (form[field].$pristine) {
form[field].$dirty = true; form[field].$dirty = true;
} }
} }
} }
angular.element('.ng-invalid[batch=' + firstError + ']').focus(); angular.element('.ng-invalid[name=' + firstError + ']').focus();
}else { }else {
//alert($scope.batch.name); //alert($scope.batch.name);
$scope.filterUniv = angular.fromJson($scope.univModel.university); $scope.filterUniv = angular.fromJson($scope.univModel.university);

View File

@ -43,10 +43,10 @@
<div class="col-md-3"> <div class="col-md-3">
<label> <label>
University University<span style="color:red;"> *</span>
</label><br> </label><br>
<select ui-select2 class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="university" ng-model="univModel.university" required> <select ui-select2 class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="university" ng-model="univModel.university" ng-required="true">
<option value="" selected>Select University</option> <option value="" selected>Select University</option>
<!--details.universityName for details in university--> <!--details.universityName for details in university-->
<option ng-repeat="details in university" value="{{details}}">{{details.universityName}}</option> <option ng-repeat="details in university" value="{{details}}">{{details.universityName}}</option>
@ -66,9 +66,9 @@
<!-- <span style="color:red;" ng-if="show" ng-show="Form.batch.$dirty && Form.batch.$error.required">Please select Batch.</span> --> <!-- <span style="color:red;" ng-if="show" ng-show="Form.batch.$dirty && Form.batch.$error.required">Please select Batch.</span> -->
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Status</label><br> <label>Status<span style="color:red;"> *</span></label><br>
<select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="status" ng-model="univModel.status" required> <select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="status" ng-model="univModel.status" ng-required="true">
<option value="" selected>Select Status</option> <option value="" selected>Select Status</option>
<option ng-repeat="details in statuslist" value="{{details.ListCode}}">{{details.ListName}}</option> <option ng-repeat="details in statuslist" value="{{details.ListCode}}">{{details.ListName}}</option>
</select> </select>

View File

@ -30,7 +30,7 @@ td,th {
</script> </script>
<div class="container-fluid container-fullw bg-white"> <div class="container-fluid container-fullw bg-white">
<div ng-controller="report_certificateCtrl" ng-init="filters()"> <div ng-controller="report_certificateCtrl" ng-init="filters()">
<form name="Form" id="form" novalidate ng-submit="onSubmit()" method="post"> <form name="Form" id="form" novalidate ng-submit="onSubmit(Form)" method="post">
<fieldset> <fieldset>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
@ -39,10 +39,10 @@ td,th {
<div class="col-md-4"> <div class="col-md-4">
<label for="form-field-select-2"> <label for="form-field-select-2">
University University <span style="color:red;">*</span>
</label><br> </label><br>
<select ui-select2 class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="university" ng-model="univModel.university" required> <select ui-select2 class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="university" ng-model="univModel.university" ng-required="true">
<option value="" selected>Select University</option> <option value="" selected>Select University</option>
<!--details.universityName for details in university--> <!--details.universityName for details in university-->
<option ng-repeat="details in university" value="{{details}}">{{details.universityName}}</option> <option ng-repeat="details in university" value="{{details}}">{{details.universityName}}</option>
@ -65,10 +65,10 @@ td,th {
</div> --> </div> -->
<div class="col-md-4"> <div class="col-md-4">
<label for="form-field-select-2"> <label for="form-field-select-2">
Status Status<span style="color:red;">*</span>
</label><br> </label><br>
<select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="status" ng-model="univModel.status" required> <select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="status" ng-model="univModel.status" ng-required="true">
<option value="" selected>Select Status</option> <option value="" selected>Select Status</option>
<option ng-repeat="details in certificatestatus" value="{{details.ListCode}}">{{details.ListName}}</option> <option ng-repeat="details in certificatestatus" value="{{details.ListCode}}">{{details.ListName}}</option>

View File

@ -26,10 +26,10 @@
<div class="col-md-3"> <div class="col-md-3">
<label> <label>
University University <span style="color:red;">*</span>
</label><br> </label><br>
<select ui-select2 class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="university" ng-model="univModel.university" required> <select ui-select2 class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="university" ng-model="univModel.university" ng-required="true">
<option value="" selected>Select University</option> <option value="" selected>Select University</option>
<!--details.universityName for details in university--> <!--details.universityName for details in university-->
<option ng-repeat="details in university" value="{{details}}">{{details.universityName}}</option> <option ng-repeat="details in university" value="{{details}}">{{details.universityName}}</option>
@ -49,8 +49,8 @@
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Mark Card Status</label><br> <label>Mark Card Status <span style="color:red;">*</span></label><br>
<select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="status" ng-model="univModel.status" required> <select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="status" ng-model="univModel.status" ng-required="true">
<option value="" selected>Select Status</option> <option value="" selected>Select Status</option>
<option ng-repeat="details in markcardstatus" value="{{details.ListCode}}">{{details.ListName}}</option> <option ng-repeat="details in markcardstatus" value="{{details.ListCode}}">{{details.ListName}}</option>
</select> </select>