From ee47ec8fbde8e1022cac9f1f85cad904b3ff27fd Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 10:17:45 +0530 Subject: [PATCH 01/17] report issues --- .../controllers/Call_Tracking_Controller.php | 8 ++- .../api/application/models/Reports_model.php | 68 +++++++++---------- .../js/controllers/report_ans_bookletCtrl.js | 30 ++++++-- .../js/controllers/report_app_pendingCtrl.js | 21 +++++- .../js/controllers/report_balfeeCtrl.js | 22 +++++- .../js/controllers/report_certificateCtrl.js | 6 +- .../js/controllers/report_doc_pendingCtrl.js | 23 ++++++- .../js/controllers/report_examfeeCtrl.js | 21 +++++- .../js/controllers/report_expenseCtrl.js | 21 +++++- .../assets/js/controllers/report_leadCtrl.js | 21 +++++- .../report_markcard_certificateCtrl.js | 6 +- .../controllers/report_markcard_statusCtrl.js | 20 +++++- .../report_study_material_statusCtrl.js | 50 ++++++-------- .../controllers/report_waiver_referalCtrl.js | 20 +++++- .../assets/views/report_answer_booklets.html | 9 ++- .../views/report_application_pending.html | 9 ++- Apollo/assets/views/report_balance_fee.html | 9 ++- .../views/report_certificate_status.html | 1 + .../assets/views/report_document_pending.html | 15 ++-- .../assets/views/report_exam_writing_fee.html | 9 ++- Apollo/assets/views/report_expense.html | 30 ++++---- Apollo/assets/views/report_lead.html | 11 +-- .../views/report_mark_certificate_status.html | 17 ++--- .../assets/views/report_markcardstatus.html | 9 ++- .../views/report_studymaterialstatus.html | 9 ++- .../assets/views/report_waiver_referal.html | 19 +++--- 26 files changed, 334 insertions(+), 150 deletions(-) diff --git a/Apollo/api/application/controllers/Call_Tracking_Controller.php b/Apollo/api/application/controllers/Call_Tracking_Controller.php index 72b913bd..412ed4d0 100755 --- a/Apollo/api/application/controllers/Call_Tracking_Controller.php +++ b/Apollo/api/application/controllers/Call_Tracking_Controller.php @@ -415,13 +415,14 @@ class Call_Tracking_Controller extends REST_Controller { */ public function autoAddlead_post(){ $student = $this->post('student'); - //print_r($student);die; + $comments = $this->post('comments'); + //print_r($comments);die; if(!empty($student)){ $now = new DateTime(); $now->setTimezone(new DateTimezone('Asia/Kolkata')); //store lead details $Student_Id = ''; - foreach($student as $student){ + foreach($student as $index =>$student){ $lead_details['LeadName'] = $student['Student_name']; @@ -444,11 +445,12 @@ class Call_Tracking_Controller extends REST_Controller { $tracking_details['CreatedBranch'] = $this->post('branchId'); //store tracking followup details $tracking_followup_details['FollowupOn'] = $this->post('date'); - $tracking_followup_details['FollowupComments'] = $this->post('comments'); + $tracking_followup_details['FollowupComments'] = $comments[$index]; $tracking_followup_details['StatusName'] = $this->post('status'); $tracking_followup_details['AssignedStaff'] = $this->post('assignedTo'); //print_r(array($lead_details,$tracking_details,$tracking_followup_details)); + $leadDetails['leadDetails'] = $this->Calltracking_model->getaddautocall($lead_details,$tracking_details,$tracking_followup_details,$CreatedBy);// Check if the users data store contains users (in case the database result returns NULL) diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index f116fba3..1fd15252 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -250,49 +250,46 @@ left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,Enrollmen } public function mark_cert_status($bat=null,$br=null,$u=null,$from=null,$to=null){ - $sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(sms.cid,'-') as Course_id,ifnull(sfs.batch,'-') as Batch_code,ifnull(sms.branch,'-') as Branch_code,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,ifnull(sfp.bdate,'-') as Document_fee_paid_date,ifnull(((sfs.cf + sfs.stf + sfs.others)-sum(sfp.bamount)),0) as Balance_fee,ifnull(cfd.syear,'-') as Sem_year,ifnull(sms.sem,'-') as Sem,ifnull(list.status,'-') as Markcard_status,ifnull(sms.mdate,'-') as Markcard_date,ifnull(sms.mcmts,'-') as Markcard_comments,ifnull(ams.certname,'-') as Certificate_name,ifnull(alist.astatus,'-') as Certificate_status,ifnull(ams.adate,'-') as Certificate_date,ifnull(ams.acmts,'-') as Certificate_comments,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber + $sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(sms.cid,'-') as Course_id,ifnull(sfs.batch,'-') as Batch_code,ifnull(sms.branch,'-') as Branch_code,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,ifnull(sfp.bdate,'-') as Document_fee_paid_date,ifnull(((sfs.cf + sfs.stf + sfs.others)-sum(sfp.bamount)),0) as Balance_fee,ifnull(cfd.syear,'-') as Sem_year,ifnull(sms.idate,'-') as idate,ifnull(sms.istatus,'-') as istatus,ifnull(sms.rdate,'-') as rdate,ifnull(sms.rstatus,'-') as rstatus,ifnull(sms.acmts,'-') as cmnts,sms.certname as Certificate_name from - (SELECT ID,StudentID as sid,CourseID as cid,BranchCode as branch,ListCode as lcode, - CertificationType as ctype,CDate as mdate,Sem as sem,Comments as mcmts - FROM T_CertificationStatus - WHERE ID IN (SELECT max(ID) FROM T_CertificationStatus group by StudentID,CourseID,BranchCode,Sem) - group by sid,sem,cid,lcode,branch) as sms -left join - (SELECT ID,StudentID as sid,CourseID as cid,app.BranchCode as branch,ListCode as lcode,AppDate as adate,Comments as acmts,CertificationType as ctype,CertificateName as certname + (SELECT c.ID as id,StudentID as sid,c.CourseID as cid,c.BranchCode as branch,c.ListCode as lcode,p.ListName as status,c.CertificationType as ctype,c.CDate as adate,c.Comments as acmts,c.CertificationType as certname,if(max(p.ListName)='ISSUED TO STUDENT',p.ListName,'-') as istatus,if(max(p.ListName)='ISSUED TO STUDENT',c.CDate,'-') as idate,if(max(p.ListName)='RECEIVED',p.ListName,'-') as rstatus,if(max(p.ListName)='RECEIVED',c.CDate,'-') as rdate +FROM T_CertificationStatus c + left join T_PickListDetails p on p.ListCode=c.ListCode + left join T_CertificationMaster cm on cm.CertificationID=c.CertificationType +WHERE c.ID IN (SELECT max(ID) FROM T_CertificationStatus group by StudentID,CourseID,BranchCode,Sem,CertificationType) + and (p.ListName like 'ISSUED TO STUDENT' or p.ListName like 'RECEIVED') +group by sid,sem,cid,branch,ctype +union +SELECT app.ID as id,app.StudentID as sid,app.CourseID as cid,app.BranchCode as branch,app.ListCode as lcode,p.ListName as status,app.CertificationType as ctype,app.AppDate as adate,app.Comments as acmts,cm.CertificateName as certname,if(max(p.ListName)='ISSUED TO STUDENT',p.ListName,'-') as istatus,if(max(p.ListName)='ISSUED TO STUDENT',app.AppDate,'-') as idate,if(max(p.ListName)='RECEIVED',p.ListName,'-') as rstatus,if(max(p.ListName)='RECEIVED',app.AppDate,'-') as rdate FROM T_ApplicationStatus as app left join T_CertificationMaster cm on cm.CertificationID=app.CertificationType - where CertificationType != 'CERT024' and ID IN (SELECT max(ID) FROM T_ApplicationStatus group by StudentID,CourseID,BranchCode) - group by sid,cid,lcode,branch) - as ams on ams.branch=sms.branch and ams.sid=sms.sid + left join T_PickListDetails p on p.ListCode=app.ListCode + where CertificateName not like 'APPLICATION%' and ID IN (SELECT max(ID) FROM T_ApplicationStatus group by StudentID,CourseID,BranchCode,CertificationType) and (p.ListName like 'ISSUED TO STUDENT' or p.ListName like 'RECEIVED') + group by sid,cid,lcode,branch,ctype) as sms + left join - (SELECT FeesID as fid,BatchCode as batch,StudentID as sid,CourseID as cid,FeesType as ftype, sum(CourseFees) as cf,Sum(STFOrWR) as stf,sum(Others) as others + (SELECT FeesID as fid,BatchCode as batch,StudentID as sid,CourseID as cid,FeesType as ftype,sum(CourseFees) as cf,Sum(STFOrWR) as stf,sum(Others) as others FROM T_Students_Fees_Status group by sid,fid,cid,batch) - as sfs on sfs.sid=sms.sid and sms.cid=sfs.ftype + as sfs on sfs.sid=sms.sid and sfs.cid=sms.cid left join (SELECT StudentID as sid,FeesId as fid,BillDate as bdate,sum(BillAmount) as bamount,BillNO as billno FROM T_Students_Fees_PaidDetails where IsActive = 1 group by sid,fid,billno) - as sfp on sfp.sid=sfs.sid and sfp.fid=sfs.fid + as sfp on sfp.sid=sms.sid and sfp.fid=sfs.fid left join - (SELECT ID as cid,CourseID as ccid,FeesType as ftype,Sem_Year as syear FROM T_Course_Fees_Details) as cfd on cfd.cid=sms.cid -left join - (SELECT ListCode as lcode,ListName as status FROM T_PickListDetails) - as list on list.lcode=sms.lcode -left join - (SELECT ListCode as lcode,ListName as astatus FROM T_PickListDetails) - as alist on alist.lcode=ams.lcode + (SELECT ID as cid,CourseID as ccid,FeesType as ftype,Sem_Year as syear FROM T_Course_Fees_Details) as cfd on cfd.ccid=sms.cid left join (SELECT CourseID as cid,cm.UniversityID as cuid,u.UniversityID as uid,CourseName as course, UniversityName as uname,cm.BranchCode as branch FROM T_CourseMaster as cm left join T_UniversityMaster as u on u.UniversityID=cm.UniversityID group by cid order by CourseID) - as cm on cm.cid=cfd.ccid + as cm on cm.cid=sms.cid left join (SELECT StudentID as sid,MobileNumber as phone,IsActive as active,FirstName 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 FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid - where std.active = 1 and sms.branch = '".$br."' +left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and scd.cid=sms.cid + where std.active = 1 and sms.branch = '".$br."' "; if ($bat!= ''){ @@ -314,7 +311,7 @@ left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,Enrollmen } - $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_year,Certificate_name"; $leadDet=$this->db->query($sql); @@ -498,19 +495,16 @@ left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,Enrollmen } public function doc_pending($bat=null,$br=null,$u=null){ - $sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(sms.cid,'-') as Course_id,ifnull(cfd.syear,'-') as Sem_year,ifnull(sfs.batch,'-') as Batch_code,ifnull(sms.branch,'-') as Branch_code,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,ifnull(sms.status,'-') as Status,sms.certname as certname,ifnull(sfp.bdate,'-') as Admission_date,sms.adate, - ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber + $sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(sfs.cid,'-') as Course_id,ifnull(sfs.batch,'-') as Batch_code,ifnull(sfs.branch,'-') as Branch_code,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,ifnull(sms.status,'-') as Status,sms.certname as certname,ifnull(sfp.bdate,'-') as Admission_date,sms.follow_date as fdate from - (SELECT ID,StudentID as sid,CourseID as cid,app.BranchCode as branch,list.ListName as status,app.ListCode as lcode,AppDate as adate,Comments as acmts,CertificationType as ctype,CertificateName as certname FROM T_ApplicationStatus as app -left join T_CertificationMaster cm on cm.CertificationID=app.CertificationType -left join T_PickListDetails list on list.ListCode=app.ListCode -where list.ListName = 'PENDING' and ID IN (SELECT max(ID) FROM T_ApplicationStatus group by StudentID,CourseID,BranchCode) -group by sid,cid,lcode,branch) as sms + (select StudentID as sid,Details as certname,DocumentDate as follow_date,StatusName as status +from T_Student_DocumentTrack_Details +where StatusName not like 'CLOSED') as sms left join - (SELECT FeesID as fid,BatchCode as batch,StudentID as sid,CourseID as cid,FeesType as ftype, sum(CourseFees) as cf,Sum(STFOrWR) as stf,sum(Others) as others + (SELECT FeesID as fid,BatchCode as batch,StudentID as sid,CourseID as cid,FeesType as ftype,BranchCode as branch FROM T_Students_Fees_Status group by sid,fid,cid,batch) - as sfs on sfs.sid=sms.sid and sms.cid=sfs.cid + as sfs on sfs.sid=sms.sid left join (SELECT ID,StudentID as sid,FeesId as fid,BillDate as bdate,sum(BillAmount) as bamount,BillNO as billno FROM T_Students_Fees_PaidDetails WHERE IsActive = 1 and ID IN (SELECT min(ID) FROM T_Students_Fees_PaidDetails group by StudentID,FeesID) @@ -527,8 +521,8 @@ left join as cm on cm.cid=cfd.ccid left join (SELECT StudentID as sid,MobileNumber as phone,IsActive as active,FirstName 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 FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and scd.cid=sms.cid and scd.branch=sms.branch - where std.active = 1 and sms.branch = '".$br."' +left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid + where std.active = 1 and sfs.branch = '".$br."' "; @@ -542,7 +536,7 @@ left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,Enrollmen $sql.=" and cm.uid = '".$u."'"; } - $sql.="group by Student_id,Course_id,Batch_code,Branch_code,Sem_year "; + $sql.="group by Student_id,Course_id,Batch_code,Branch_code"; diff --git a/Apollo/assets/js/controllers/report_ans_bookletCtrl.js b/Apollo/assets/js/controllers/report_ans_bookletCtrl.js index 90bc2c36..1f0e9b59 100755 --- a/Apollo/assets/js/controllers/report_ans_bookletCtrl.js +++ b/Apollo/assets/js/controllers/report_ans_bookletCtrl.js @@ -82,8 +82,24 @@ app.controller('report_ans_bookletCtrl', ["$scope", "$filter","$rootScope","$mod } }); } - - $scope.onSubmit = function () { + $scope.show = false; + $scope.onSubmit = function (form) { + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + $scope.show = true; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$batch; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[batch=' + firstError + ']').focus(); + }else { //alert($scope.batch.name); $scope.ans_book_data = ''; $scope.message = ''; @@ -115,6 +131,7 @@ app.controller('report_ans_bookletCtrl', ["$scope", "$filter","$rootScope","$mod }); } + } var mystyle = { sheetid: 'ANSWER BOOKLET STATUS REPORT', headers: true, @@ -405,7 +422,12 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor $scope.trackForm = { submit: function (form, myModel,loading,selectedStudents) { - //console.log(selectedStudents); + //console.log(selectedStudents);return false; + var comments = []; + for(var stuid=0;stuid<=selectedStudents.length-1;stuid++){ + comments [stuid] ="Call Tracking For Report Answer Booklet Details - BalanceFee:"+selectedStudents[stuid].balance + " - IssuedDate:" +selectedStudents[stuid].issuedate; + } + if(isNaN(myModel.date)){ $scope.nextFollowupDate = myModel.date; @@ -462,7 +484,7 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor assignedTo: myModel.assignedTo, status: myModel.status, referedBy: myModel.referedBy, - comments:"Call Tracking For Report Answer Booklet Details ", + comments:comments, enquiryStatus:myModel.enquiryStatus, createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID, diff --git a/Apollo/assets/js/controllers/report_app_pendingCtrl.js b/Apollo/assets/js/controllers/report_app_pendingCtrl.js index 8cca0fef..626616b6 100755 --- a/Apollo/assets/js/controllers/report_app_pendingCtrl.js +++ b/Apollo/assets/js/controllers/report_app_pendingCtrl.js @@ -82,8 +82,24 @@ app.controller('report_app_pendingCtrl', ["$scope", "$filter","$rootScope","$mod } }); } - - $scope.onSubmit = function () { + $scope.show = false; + $scope.onSubmit = function (form) { + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + $scope.show = true; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$batch; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[batch=' + firstError + ']').focus(); + }else { //alert($scope.batch.name); $scope.app_pending_data = ''; $scope.message = ''; @@ -115,6 +131,7 @@ app.controller('report_app_pendingCtrl', ["$scope", "$filter","$rootScope","$mod }); } + } var mystyle = { sheetid: 'APPLICAITON PENDING STUDENT LIST REPORT', headers: true, diff --git a/Apollo/assets/js/controllers/report_balfeeCtrl.js b/Apollo/assets/js/controllers/report_balfeeCtrl.js index aab98246..28a22b1f 100755 --- a/Apollo/assets/js/controllers/report_balfeeCtrl.js +++ b/Apollo/assets/js/controllers/report_balfeeCtrl.js @@ -91,8 +91,24 @@ app.controller('report_balfeeCtrl', ["$scope", "$filter","$rootScope","$modal", }); } // response data - $scope.onSubmit = function () { - + $scope.show = false; + $scope.onSubmit = function (form) { + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + $scope.show = true; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$batch; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[batch=' + firstError + ']').focus(); + }else { $scope.balfee_data = ''; $scope.message = ''; var response_data = { @@ -154,7 +170,7 @@ app.controller('report_balfeeCtrl', ["$scope", "$filter","$rootScope","$modal", } - + } //Export to excel var mystyle = { sheetid: 'BALANCE FEE STATUS REPORT', diff --git a/Apollo/assets/js/controllers/report_certificateCtrl.js b/Apollo/assets/js/controllers/report_certificateCtrl.js index 81ffff7b..e3ca57f2 100755 --- a/Apollo/assets/js/controllers/report_certificateCtrl.js +++ b/Apollo/assets/js/controllers/report_certificateCtrl.js @@ -408,6 +408,10 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor $scope.trackForm = { submit: function (form, myModel,loading,selectedStudents) { //console.log(selectedStudents); + var comments = []; + for(var stuid=0;stuid<=selectedStudents.length-1;stuid++){ + comments [stuid] ="Call Tracking For Report Certificate Status - DocumentName:"+selectedStudents[stuid].Certificate_name + " - Status:" +selectedStudents[stuid].Certificate_status + " - Date:" +selectedStudents[stuid].Certificate_date; + } if(isNaN(myModel.date)){ $scope.nextFollowupDate = myModel.date; @@ -464,7 +468,7 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor assignedTo: myModel.assignedTo, status: myModel.status, referedBy: myModel.referedBy, - comments:"Call Tracking For Report Certificate Details ", + comments:comments, enquiryStatus:myModel.enquiryStatus, createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID, diff --git a/Apollo/assets/js/controllers/report_doc_pendingCtrl.js b/Apollo/assets/js/controllers/report_doc_pendingCtrl.js index b646cb4f..a82e9624 100755 --- a/Apollo/assets/js/controllers/report_doc_pendingCtrl.js +++ b/Apollo/assets/js/controllers/report_doc_pendingCtrl.js @@ -82,8 +82,25 @@ app.controller('report_doc_pendingCtrl', ["$scope", "$filter","$rootScope","$mod } }); } - - $scope.onSubmit = function () { + $scope.show = false; + $scope.onSubmit = function (form) { + + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + $scope.show = true; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$batch; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[batch=' + firstError + ']').focus(); + }else { //alert($scope.batch.name); $scope.doc_pending_data = ''; $scope.message = ''; @@ -113,7 +130,7 @@ app.controller('report_doc_pendingCtrl', ["$scope", "$filter","$rootScope","$mod } }); - + } } var mystyle = { sheetid: 'DOCUMENT PENDING STUDENT LIST REPORT', diff --git a/Apollo/assets/js/controllers/report_examfeeCtrl.js b/Apollo/assets/js/controllers/report_examfeeCtrl.js index 35937f3b..66bca916 100755 --- a/Apollo/assets/js/controllers/report_examfeeCtrl.js +++ b/Apollo/assets/js/controllers/report_examfeeCtrl.js @@ -83,7 +83,24 @@ app.controller('report_examfeeCtrl', ["$scope", "$filter","$rootScope","$modal", }); } - $scope.onSubmit = function () { + $scope.show = false; + $scope.onSubmit = function (form) { + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + $scope.show = true; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$batch; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[batch=' + firstError + ']').focus(); + }else { //alert($scope.batch.name); $scope.examfee_data = ''; $scope.message = ''; @@ -120,7 +137,7 @@ app.controller('report_examfeeCtrl', ["$scope", "$filter","$rootScope","$modal", totalf += parseFloat(item.Amount); } return totalf; } - + } } var mystyle = { sheetid: 'EXAM WRITING FEE REPORT', diff --git a/Apollo/assets/js/controllers/report_expenseCtrl.js b/Apollo/assets/js/controllers/report_expenseCtrl.js index a70f785c..9a5d492b 100755 --- a/Apollo/assets/js/controllers/report_expenseCtrl.js +++ b/Apollo/assets/js/controllers/report_expenseCtrl.js @@ -63,7 +63,25 @@ app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAle }); } - $scope.onSubmit = function () { + $scope.show = false; + $scope.onSubmit = function (form) { + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + $scope.show = true; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$addDate; + firstError = form[field].$toDate; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[toDate=' + firstError + ']').focus(); + }else { //alert($scope.batch.name); $scope.expense_data = ''; $scope.message = ''; @@ -95,6 +113,7 @@ app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAle }); } + } var mystyle = { sheetid: 'EXPENSE REPORT', diff --git a/Apollo/assets/js/controllers/report_leadCtrl.js b/Apollo/assets/js/controllers/report_leadCtrl.js index ea0c30ca..c5716651 100644 --- a/Apollo/assets/js/controllers/report_leadCtrl.js +++ b/Apollo/assets/js/controllers/report_leadCtrl.js @@ -101,7 +101,25 @@ app.controller('report_leadCtrl', ["$scope", "$filter","$rootScope","$modal", "A }); } - $scope.onSubmit = function () { + $scope.show = false; + $scope.onSubmit = function (form) { + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + $scope.show = true; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$addDate; + firstError = form[field].$toDate; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[toDate=' + firstError + ']').focus(); + }else { //alert($scope.batch.name); $scope.lead_data = ''; $scope.message = ''; @@ -132,6 +150,7 @@ app.controller('report_leadCtrl', ["$scope", "$filter","$rootScope","$modal", "A }); } + } var mystyle = { sheetid: 'Lead REPORT', headers: true, diff --git a/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js b/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js index d4e31322..af4fe036 100755 --- a/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js +++ b/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js @@ -407,6 +407,10 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor $scope.trackForm = { submit: function (form, myModel,loading,selectedStudents) { //console.log(selectedStudents); + var comments = []; + for(var stuid=0;stuid<=selectedStudents.length-1;stuid++){ + comments [stuid] ="Call Tracking For Report Certificate Status - SemYear:"+selectedStudents[stuid].Sem_year + " - Balance:" +selectedStudents[stuid].Balance_fee + " - CertificateName:" +selectedStudents[stuid].Certificate_name + " - ReceivedStatus:" +selectedStudents[stuid].rstatus + " - ReceivedDate:" +selectedStudents[stuid].rdate; + } if(isNaN(myModel.date)){ $scope.nextFollowupDate = myModel.date; @@ -463,7 +467,7 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor assignedTo: myModel.assignedTo, status: myModel.status, referedBy: myModel.referedBy, - comments:"Call Tracking For Report MarkCard-Certificate Details ", + comments:comments, enquiryStatus:myModel.enquiryStatus, createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID, diff --git a/Apollo/assets/js/controllers/report_markcard_statusCtrl.js b/Apollo/assets/js/controllers/report_markcard_statusCtrl.js index d76fc58e..0c588387 100755 --- a/Apollo/assets/js/controllers/report_markcard_statusCtrl.js +++ b/Apollo/assets/js/controllers/report_markcard_statusCtrl.js @@ -83,7 +83,24 @@ app.controller('report_markcard_statusCtrl', ["$scope", "$filter","$rootScope", }); } - $scope.onSubmit = function () { + $scope.show = false; + $scope.onSubmit = function (form) { + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + $scope.show = true; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$batch; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[batch=' + firstError + ']').focus(); + }else { //alert($scope.batch.name); $scope.markcard_data = ''; $scope.message = ''; @@ -114,6 +131,7 @@ app.controller('report_markcard_statusCtrl', ["$scope", "$filter","$rootScope", }); } + } var mystyle = { sheetid: 'MARKCARD STATUS REPORT', headers: true, diff --git a/Apollo/assets/js/controllers/report_study_material_statusCtrl.js b/Apollo/assets/js/controllers/report_study_material_statusCtrl.js index f17415b7..ab3ec6ac 100755 --- a/Apollo/assets/js/controllers/report_study_material_statusCtrl.js +++ b/Apollo/assets/js/controllers/report_study_material_statusCtrl.js @@ -72,35 +72,26 @@ app.controller('report_study_material_statusCtrl', ["$scope", "$filter","$rootSc } }); } - //dropdown values for batch - $scope.getBatch = function(Form,filters){ - $scope.batchValue= filters.university; - - var filterBatch = { - method: 'POST', - url: apiPoint.url + 'report_BatchName/', - headers: { - 'Content-Type': 'application/json' - }, - data: { - branch : JSON.parse(localStorage.getItem('localObj')).localBranchID, - batch : $scope.batchValue - } - - }; - //console.log($scope.batchValue); - $scope.batchName = ""; - $http(filterBatch).then(function (response) { - if (response.data) { - - $scope.batchName = response.data.batchName; - console.log($scope.batchName); - } else { - } - }); - } + - $scope.onSubmit = function() { + $scope.show = false; + $scope.onSubmit = function (form) { + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + $scope.show = true; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$batch; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[batch=' + firstError + ']').focus(); + }else { //alert($scope.batch.name); $scope.study_mat_data = ''; $scope.message = ''; @@ -130,7 +121,8 @@ app.controller('report_study_material_statusCtrl', ["$scope", "$filter","$rootSc }); - } + } + } //Export to excel var mystyle = { sheetid: 'STUDY MATERIAL STATUS REPORT', diff --git a/Apollo/assets/js/controllers/report_waiver_referalCtrl.js b/Apollo/assets/js/controllers/report_waiver_referalCtrl.js index a7daf5f4..d668ee2e 100755 --- a/Apollo/assets/js/controllers/report_waiver_referalCtrl.js +++ b/Apollo/assets/js/controllers/report_waiver_referalCtrl.js @@ -50,7 +50,24 @@ app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "S }); } - $scope.onSubmit = function () { + $scope.show = false; + $scope.onSubmit = function (form) { + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + $scope.show = true; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$batch; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[batch=' + firstError + ']').focus(); + }else { //alert($scope.batch.name); $scope.waiver_referal_data = ''; $scope.message = ''; @@ -95,6 +112,7 @@ app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "S } return totalf; } } + } var mystyle = { sheetid: 'WAIVER AND REFERAL REPORT', diff --git a/Apollo/assets/views/report_answer_booklets.html b/Apollo/assets/views/report_answer_booklets.html index a9e0e5a6..eca1e330 100755 --- a/Apollo/assets/views/report_answer_booklets.html +++ b/Apollo/assets/views/report_answer_booklets.html @@ -13,6 +13,7 @@ td,th { th{ text-align:center; } + .table>tbody>tr>td { padding: 2px; } /* .sort-icon { font-size: 9px; margin-left: 5px; @@ -28,7 +29,7 @@ td,th {
-
+
@@ -40,18 +41,20 @@ td,th { University - + Please select University.
- + Please select Batch.
diff --git a/Apollo/assets/views/report_application_pending.html b/Apollo/assets/views/report_application_pending.html index 5f07d8da..9b43233e 100755 --- a/Apollo/assets/views/report_application_pending.html +++ b/Apollo/assets/views/report_application_pending.html @@ -15,6 +15,7 @@ th{ text-align:center; } + .table>tbody>tr>td { padding: 2px; } /* .sort-icon { font-size: 9px; margin-left: 5px; @@ -30,7 +31,7 @@
- +
@@ -42,18 +43,20 @@ University - + Please select University.
- + Please select Batch.
diff --git a/Apollo/assets/views/report_balance_fee.html b/Apollo/assets/views/report_balance_fee.html index b7bf6f22..00ecb0b1 100755 --- a/Apollo/assets/views/report_balance_fee.html +++ b/Apollo/assets/views/report_balance_fee.html @@ -7,6 +7,7 @@
- +
@@ -38,7 +37,8 @@ + show-button-bar="true" required/> + Please select FromDate.
@@ -49,9 +49,10 @@ To Date + show-button-bar="true" required/> + Please select ToDate.
@@ -80,10 +81,11 @@
+
-
+
@@ -102,7 +104,7 @@ - + diff --git a/Apollo/assets/views/report_lead.html b/Apollo/assets/views/report_lead.html index 3325460b..ff7fbf09 100644 --- a/Apollo/assets/views/report_lead.html +++ b/Apollo/assets/views/report_lead.html @@ -13,6 +13,7 @@ td,th { th{ text-align:center; } + .table>tbody>tr>td { padding: 2px; } /* .sort-icon { font-size: 9px; margin-left: 5px; @@ -28,7 +29,7 @@ td,th {
- +
@@ -44,7 +45,8 @@ td,th { + show-button-bar="true" required/> + Please select FromDate.
@@ -55,9 +57,10 @@ td,th { To Date + show-button-bar="true" required/> + Please select ToDate.
diff --git a/Apollo/assets/views/report_mark_certificate_status.html b/Apollo/assets/views/report_mark_certificate_status.html index 945b94a2..9b03961b 100755 --- a/Apollo/assets/views/report_mark_certificate_status.html +++ b/Apollo/assets/views/report_mark_certificate_status.html @@ -13,6 +13,7 @@ td,th { th{ text-align:center; } + .table>tbody>tr>td { padding: 2px; } /* .sort-icon { font-size: 9px; margin-left: 5px; @@ -131,8 +132,6 @@ td,th { - - @@ -153,21 +152,19 @@ td,th { - - - + - - - - - + + + + + diff --git a/Apollo/assets/views/report_markcardstatus.html b/Apollo/assets/views/report_markcardstatus.html index dbcb0ab4..f9ac019a 100755 --- a/Apollo/assets/views/report_markcardstatus.html +++ b/Apollo/assets/views/report_markcardstatus.html @@ -13,13 +13,14 @@ th{ text-align:center; } + .table>tbody>tr>td { padding: 2px; }
- +
@@ -31,18 +32,20 @@ University - + Please select University.
- + Please select Batch.
-
- -
-
-
-
-

University Registration

+
+
+
+
+
-
-
-
-
-
No university details!
-
-
-
-
- -
- -
- + + +
+
+
+
No Followup!
+
+
+ +
{{p.SL_NO}} {{p.Expense_name}}{{p.Amount}}{{p.Amount}}
SL.NoDocument Fee Paid DateEnrollment ID Student Name Father Name Course
{{p.SL_NO}}{{p.Document_fee_paid_date}}{{p.Enrollment_id}} {{p.Student_name}} {{p.Father_name}} {{p.course_name}} {{p.Sem_year}} {{p.Phone_number}} {{p.University}}{{p.Balance_fee}}{{p.Balance_fee}} {{p.Certificate_name}}{{p.received_status}}{{p.received_date}}{{p.issued_status}}{{p.issued_date}}{{p.issued_comments}}{{p.rstatus}}{{p.rdate}}{{p.istatus}}{{p.idate}}{{p.cmnts}}
+ + + + + + + + + + + + + + + + + + + + + + +
ID NameMobile Activity
{{today.TrackingID}}{{today.LeadName}}{{today.MobileNumber}}{{today.ActivityName}}
+ + +
+
+
+
No Pending Followup!
+
+
+ + + + + + + + + + + + - - - + + + - - - - + + + + + + + + + - -
-
-
-
-
- -
-
-

Follow Ups For Today : {{todayFolloupDetails.length}}

- -
-
-
-
-
No Followup!
-
-
-
-
ID NameMobile ActivityFollowup
{{pending.TrackingID}}{{pending.LeadName}}{{pending.MobileNumber}}{{pending.ActivityName}}{{pending.FollowupOn}}
- - - - - - - - - - - - - - - - - - - - - - - - - - -
ID NameMobile Activity
{{today.TrackingID}}{{today.LeadName}}{{today.MobileNumber}}{{today.ActivityName}}
-
-
-
-
- -
-
-
-

Leads Created Today :{{leadDetails.length}}

- +
-
+ + +
No Lead Created By Today!
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
ID NameMobile ActivityFollowup
{{lead.TrackingID}}{{lead.LeadName}}{{lead.MobileNumber}}{{lead.ActivityName}}{{lead.FollowupOn}}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID NameMobile ActivityFollowup
{{lead.TrackingID}}{{lead.LeadName}}{{lead.MobileNumber}}{{lead.ActivityName}}{{lead.FollowupOn}}
-
-
+ + +
-
-
-
-

Pending Follow Ups :{{pendingFolloupDetails.length}}

- -
-
-
-
-
No Pending Followup!
-
-
-
- - - - - - - - - - - - - - + +
+
+
-
- - - - - - - - +
-
ID NameMobile ActivityFollowup
{{pending.TrackingID}}{{pending.LeadName}}{{pending.MobileNumber}}{{pending.ActivityName}}{{pending.FollowupOn}}
-
+ + +
+ + + + + + + + + + + + + + +
University ID{{registration.UniversityID}}University Name{{registration.UniversityName | uppercase}}No of Registration{{registration.StudentCounts}}
+
+
+ +
+ + + + + + + + + + + +
University ID{{univFees.UniversityID}}University Name{{univFees.UniversityName}}Payable Fees{{univFees.PayableFees}}Paid Fees{{univFees.PaidFees}}Balance Fees{{univFees.PayableFees-univFees.PaidFees}}
+
+
+
- -
-
-
\ No newline at end of file From d7f52f08e27a2ee5f4e69907076d07fca0b7f3b4 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 12:10:01 +0530 Subject: [PATCH 03/17] dashboard changes --- Apollo/assets/js/controllers/dashboardCtrl.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Apollo/assets/js/controllers/dashboardCtrl.js b/Apollo/assets/js/controllers/dashboardCtrl.js index d27167a3..e98ad427 100755 --- a/Apollo/assets/js/controllers/dashboardCtrl.js +++ b/Apollo/assets/js/controllers/dashboardCtrl.js @@ -291,6 +291,7 @@ app.controller('OnotherCtrl', ["$scope", "toaster", "$filter", "$http", "API_POI * */ $scope.getUniversityRegisteredDetails = function () { $scope.registerdStudentDetails=""; + $scope.universityFeesDetails=""; $scope.notEmptyRegistration=true; var req = { method: 'POST', @@ -306,9 +307,11 @@ app.controller('OnotherCtrl', ["$scope", "toaster", "$filter", "$http", "API_POI if (response.data) { $scope.notEmptyRegistration=response.data.resultStatus; $scope.registerdStudentDetails=response.data.details; + $scope.universityFeesDetails=response.data.universityFeesDetails; } else { $scope.registerdStudentDetails=""; + $scope.universityFeesDetails=""; $scope.notEmptyRegistration=false; } }); From 64017631d69a25999506d5a0af4fa841f4195dba Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 12:10:16 +0530 Subject: [PATCH 04/17] dashboard changes --- .../application/models/Dashboard_model.php | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/Apollo/api/application/models/Dashboard_model.php b/Apollo/api/application/models/Dashboard_model.php index bd127be4..0c4b2b77 100755 --- a/Apollo/api/application/models/Dashboard_model.php +++ b/Apollo/api/application/models/Dashboard_model.php @@ -97,8 +97,10 @@ class Dashboard_model extends CI_Model $fetchDetails['StudentCounts']=0; } $getArray[]=$fetchDetails; + $getFeesArray[]= $this->getUniversityFeesPending($rows->UniversityName,$rows->UniversityID,$details['localBranchID']); } $resultDetails['details']=$getArray; + $resultDetails['universityFeesDetails']=$getFeesArray; } else{ $resultDetails['resultStatus']=false; @@ -106,6 +108,51 @@ class Dashboard_model extends CI_Model } return $resultDetails; } + /* + * get university pending fees details + * created by kms + * */ + public function getUniversityFeesPending($universityName=null,$universityID=null,$branchCode=null){ + $feesDetails=array(); + $feesDetails['UniversityID']=$universityID; + $feesDetails['UniversityName']=$universityName; + + $this->db->select("SUM(SFS.CourseFees) as PayableFees"); + $this->db->from( STUDENTS_FEES_STATUS . ' as SFS'); + $this->db->join( COURSE . ' as CU', 'CU.CourseID = SFS.CourseID'); + $this->db->where('CU.UniversityID',$universityID); + $this->db->where('CU.BranchCode',$branchCode); + $this->db->order_by('CU.CourseID','DESC'); + $getUnivFeesDetails = $this->db->get(); + if($getUnivFeesDetails->result()){ + foreach ($getUnivFeesDetails->result() as $payableRow){ + $feesDetails['PayableFees']=$payableRow->PayableFees; + } + } + else{ + $feesDetails['PayableFees']=0; + } + $this->db->select("SUM(SFP.BillAmount) as PaidFees"); + $this->db->from( STUDENTS_FEES_PAID . ' as SFP'); + $this->db->join( STUDENTS_FEES_STATUS . ' as SFS', 'SFS.FeesID = SFP.FeesId'); + $this->db->join( COURSE . ' as CU', 'CU.CourseID = SFS.CourseID'); + $this->db->where('CU.UniversityID',$universityID); + $this->db->where('CU.BranchCode',$branchCode); + $this->db->order_by('CU.CourseID','DESC'); + $getUnivPaidFeesDetails = $this->db->get(); + if($getUnivPaidFeesDetails->result()){ + foreach ($getUnivPaidFeesDetails->result() as $paidRow){ + $feesDetails['PaidFees']=$paidRow->PaidFees; + } + } + else{ + $feesDetails['PaidFees']=0; + } + + return $feesDetails; + + + } } \ No newline at end of file From ce30d74d6830da534350e1a187af27d9f4af2f8d Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 12:28:05 +0530 Subject: [PATCH 05/17] dashboard changes --- Apollo/assets/views/dashboard.html | 124 ++++++++++++++++++++++++++++- 1 file changed, 120 insertions(+), 4 deletions(-) diff --git a/Apollo/assets/views/dashboard.html b/Apollo/assets/views/dashboard.html index 47efdb81..b7ca4661 100755 --- a/Apollo/assets/views/dashboard.html +++ b/Apollo/assets/views/dashboard.html @@ -24,7 +24,43 @@ -
+
+
+
+
No Followup!
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
ID NameMobile Activity
{{today.TrackingID}}{{today.LeadName}}{{today.MobileNumber}}{{today.ActivityName}}
+
+
No Followup!
@@ -62,13 +98,54 @@
-
+ +
No Pending Followup!
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID NameMobile ActivityFollowup
{{pending.TrackingID}}{{pending.LeadName}}{{pending.MobileNumber}}{{pending.ActivityName}}{{pending.FollowupOn}}
+
+
+ +
+
+
No Pending Followup!
+
+
+
view more @@ -103,7 +180,46 @@
-
+
+
+
+
No Lead Created By Today!
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID NameMobile ActivityFollowup
{{lead.TrackingID}}{{lead.LeadName}}{{lead.MobileNumber}}{{lead.ActivityName}}{{lead.FollowupOn}}
+
+
No Lead Created By Today!
From 83304f1c31ba948e4e73cd31493d54b12b32e32a Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 13:16:16 +0530 Subject: [PATCH 06/17] day book super admin changes --- .../assets/js/controllers/daybooksuperadminCtrl.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Apollo/assets/js/controllers/daybooksuperadminCtrl.js b/Apollo/assets/js/controllers/daybooksuperadminCtrl.js index 2400ee6c..a993a2da 100755 --- a/Apollo/assets/js/controllers/daybooksuperadminCtrl.js +++ b/Apollo/assets/js/controllers/daybooksuperadminCtrl.js @@ -14,7 +14,7 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi //In controller $scope.exportAction = function(){ alert(); - switch('excel'){ + switch('excel'){ case 'pdf': $scope.$broadcast('export-pdf', {}); break; case 'excel': $scope.$broadcast('export-excel', {}); @@ -233,10 +233,6 @@ $scope.dayBookApprovalAccess = ''; $scope.incomeExpenseName = response.data.typeList; $scope.incomeExpenseType = response.data.typeNameList; - console.log($scope.incomeExpenseName) - - console.log($scope.incomeExpenseType); - } else { } }); } @@ -272,7 +268,6 @@ $scope.dayBookApprovalAccess = ''; $scope.myModelAdd.type = ''; $scope.getTypes = type === 'I002' ? $scope.getIncomeTypes : $scope.getExpenseTypes; - console.log($scope.getTypes) }; $scope.editId = -1; @@ -316,7 +311,6 @@ $scope.dayBookApprovalAccess = ''; $scope.copyModel = function (p) { var inc = $scope.incomeExpenseType.filter((inc)=>inc.ID == p.Type); - console.log(inc); $scope.incexp = inc[0]; $scope.myModel = { "id": p.ID, @@ -537,12 +531,10 @@ $scope.dayBookApprovalAccess = ''; $scope.daybookeditUpdate = { submit: function (form, myModel) { - console.log(myModel.type); //return false; var firstError = null; if (form.$invalid) { - alert(); var field = null, firstError = null; for (field in form) { if (field[0] != '$') { @@ -601,7 +593,7 @@ $scope.dayBookApprovalAccess = ''; style:'font-size:11px; color:blue;' } }; - return mystyle + return mystyle; } $scope.exportData = function () { alasql('SELECT Date as Date, ListName as IncomeExpense, VoucherNumber as VoucherNumberBillNumber, PaidTo as PaidToReceivedFrom,FeePaymentDetails as Sem, CourseName as Course,UniversityName as University,TypeName as Type, ReceiptNo as Receipt_No, ReceiptNoComments as Comments, ModeOfPayment as Mode_of_Payment,Amount as Amount,Balance as Balance, Reason, Activity INTO XLS("daybook_details.xls",?) FROM ?',[styleXl(),$scope.data]); From ce5f6c9af5e404c643245e57f942450f7a605e0b Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 13:16:29 +0530 Subject: [PATCH 07/17] day book admin changes --- .../assets/js/controllers/daybookadminCtrl.js | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Apollo/assets/js/controllers/daybookadminCtrl.js b/Apollo/assets/js/controllers/daybookadminCtrl.js index b607258e..9e747f14 100755 --- a/Apollo/assets/js/controllers/daybookadminCtrl.js +++ b/Apollo/assets/js/controllers/daybookadminCtrl.js @@ -151,7 +151,6 @@ $scope.dayBookApprovalAccess = ''; if (response.data.typeNameStatus) { $scope.incomeExpenseName = response.data.typeList; $scope.incomeExpenseType = response.data.typeNameList; - } else { } }); } @@ -208,9 +207,7 @@ $scope.dayBookApprovalAccess = ''; } $scope.copyModel = function (p) { - //console.log(p); var inc = $scope.incomeExpenseType.filter((inc)=>inc.ID == p.Type); - console.log(inc); $scope.incexp = inc[0]; $scope.myModel = { @@ -447,6 +444,26 @@ $scope.dayBookApprovalAccess = ''; } } } + function styleXl(){ + var mystyle = { + sheetid: 'DAYBOOK DETAILS', + headers: true, + caption: { + title:'DAYBOOK DETAILS'+ '('+ $scope.searchData.date + ' - ' + $scope.searchData.dateTo +')', + width: '300px', + style:'font-size:50px;color:blue;' + }, + // style:'background:#00FF00', + column: { + style:'font-size:11px; color:blue;' + } + }; + return mystyle; + } + $scope.exportData = function () { + + alasql('SELECT Date as Date, ListName as IncomeExpense, VoucherNumber as VoucherNumberBillNumber, PaidTo as PaidToReceivedFrom,FeePaymentDetails as Sem, CourseName as Course,UniversityName as University,TypeName as Type, ReceiptNo as Receipt_No, ReceiptNoComments as Comments, ModeOfPayment as Mode_of_Payment,Amount as Amount,Balance as Balance, Reason, Activity INTO XLS("daybook_details.xls",?) FROM ?',[styleXl(),$scope.data]); + }; }]); From b0e7d3eebf8a069fe9a18b189f66e90ad9dfa073 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 13:16:50 +0530 Subject: [PATCH 08/17] day book admin changes --- Apollo/assets/views/daybook/daybookadmin.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Apollo/assets/views/daybook/daybookadmin.html b/Apollo/assets/views/daybook/daybookadmin.html index f9e72a7f..29321ca0 100755 --- a/Apollo/assets/views/daybook/daybookadmin.html +++ b/Apollo/assets/views/daybook/daybookadmin.html @@ -119,7 +119,8 @@ /*font-size: 16px;*/ } - + +
Date From a1eee9243679abbab9adfd20acc45ff668b67d25 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 13:31:16 +0530 Subject: [PATCH 09/17] day book changes in staff --- Apollo/assets/js/controllers/daybookCtrl.js | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Apollo/assets/js/controllers/daybookCtrl.js b/Apollo/assets/js/controllers/daybookCtrl.js index 79229cb4..e1260b31 100755 --- a/Apollo/assets/js/controllers/daybookCtrl.js +++ b/Apollo/assets/js/controllers/daybookCtrl.js @@ -452,6 +452,29 @@ $scope.dayBookApprovalAccess = ''; } } } + function styleXl(){ + var mystyle = { + sheetid: 'DAYBOOK DETAILS', + headers: true, + caption: { + title:'DAYBOOK DETAILS'+ '('+ $scope.searchData.date + ' - ' + $scope.searchData.dateTo +')', + width: '300px', + style:'font-size:50px;color:blue;' + }, + // style:'background:#00FF00', + column: { + style:'font-size:25px; color:blue;' + } + }; + return mystyle; + } + + $scope.exportData = function () { + + alasql('SELECT Date as Date, ListName as IncomeExpense, VoucherNumber as VoucherNumberBillNumber, PaidTo as PaidToReceivedFrom,FeePaymentDetails as Sem, CourseName as Course,UniversityName as University,TypeName as Type, ReceiptNo as Receipt_No, ReceiptNoComments as Comments, ModeOfPayment as Mode_of_Payment,Amount as Amount,Balance as Balance, Reason, Activity INTO XLS("daybook_details.xls",?) FROM ?',[styleXl(),$scope.data]); + }; + + }]); From 16ca77019c6726688814448307c6ba4712b99785 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 13:31:39 +0530 Subject: [PATCH 10/17] day book changes in staff --- Apollo/assets/views/daybook/daybook.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Apollo/assets/views/daybook/daybook.html b/Apollo/assets/views/daybook/daybook.html index 525a296b..fb7d062c 100755 --- a/Apollo/assets/views/daybook/daybook.html +++ b/Apollo/assets/views/daybook/daybook.html @@ -119,7 +119,8 @@ /*font-size: 16px;*/ } - + +
Date From 8c38f284b3326dc1f67afb735b4384559b500de0 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 13:32:22 +0530 Subject: [PATCH 11/17] day book changes in staff --- Apollo/assets/js/controllers/daybookCtrl.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Apollo/assets/js/controllers/daybookCtrl.js b/Apollo/assets/js/controllers/daybookCtrl.js index e1260b31..b2567df9 100755 --- a/Apollo/assets/js/controllers/daybookCtrl.js +++ b/Apollo/assets/js/controllers/daybookCtrl.js @@ -210,12 +210,8 @@ $scope.dayBookApprovalAccess = ''; $scope.copyModel = function (p) { var inc = $scope.incomeExpenseType.filter((inc)=>inc.ID == p.Type); - console.log(inc); $scope.incexp = inc[0]; - console.log($scope.incexp.ID); - - console.log(p); $scope.myModel = { "id": p.ID, "date": p.Date, From df6e009c09bba44e3078d3cbc26a9dd748621d66 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 13:33:35 +0530 Subject: [PATCH 12/17] db changes for local envirnment --- Apollo/api/application/config/database.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Apollo/api/application/config/database.php b/Apollo/api/application/config/database.php index b7898b18..3f18384a 100755 --- a/Apollo/api/application/config/database.php +++ b/Apollo/api/application/config/database.php @@ -76,12 +76,12 @@ $query_builder = TRUE; $db['default'] = array( 'dsn' => '', 'hostname' => 'apollodec.com', - 'username' => 'apollod4_SIT', - 'password' => 'apollosit1234', - 'database' => 'apollod4_ApolloDECNEWSIT', - // 'username' => 'apollod4_DEV', - // 'password' => 'apollo1234', - // 'database' => 'apollod4_ApolloDECDev', +// 'username' => 'apollod4_SIT', +// 'password' => 'apollosit1234', +// 'database' => 'apollod4_ApolloDECNEWSIT', + 'username' => 'apollod4_DEV', + 'password' => 'apollo1234', + 'database' => 'apollod4_ApolloDECDev', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, From ada1ff5217cbdcf17fc12899aba5813e3416fc40 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 14:09:43 +0530 Subject: [PATCH 13/17] constant REGISTRATIONDETAILS table added --- Apollo/api/application/config/constants.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index 04c7ea41..b3370401 100755 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -154,6 +154,8 @@ defined('SESSIONSCHEDULE') OR define('SESSIONSCHEDULE','T_SessionSchedule_Master defined('SESSIONSCHEDULEDETAILS') OR define('SESSIONSCHEDULEDETAILS','T_SessionSchedule_Details'); defined('STUDENTDOCUMENTDETAILS') OR define('STUDENTDOCUMENTDETAILS','T_StudentDocumentsDetails'); defined('STUDENTDOCUMENTTRACKDETAILS') OR define('STUDENTDOCUMENTTRACKDETAILS','T_Student_DocumentTrack_Details'); +defined('REGISTRATIONDETAILS') OR define('REGISTRATIONDETAILS','T_Registration_Details'); + // define APPLICATION certificate type constant defined('APPLICATION_CONST') OR define('APPLICATION_CONST','APPLICATION'); From 5f4ea6b0dafba9803c212c4bff65f389aa84bbc3 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Mon, 20 Aug 2018 17:35:15 +0530 Subject: [PATCH 14/17] new registration report --- Apollo/api/application/config/constants.php | 7 +- Apollo/api/application/config/routes.php | 4 + Apollo/api/application/controllers/Report.php | 59 +++++ .../api/application/models/Reports_model.php | 77 +++++++ Apollo/assets/i18n/en.json | 3 +- Apollo/assets/js/config.constant.js | 4 + Apollo/assets/js/config.router.js | 8 + .../js/controllers/newreg_reportCtrl.js | 193 ++++++++++++++++ Apollo/assets/views/newreg_report.html | 210 ++++++++++++++++++ Apollo/assets/views/partials/nav.html | 14 ++ 10 files changed, 577 insertions(+), 2 deletions(-) create mode 100644 Apollo/assets/js/controllers/newreg_reportCtrl.js create mode 100644 Apollo/assets/views/newreg_report.html diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index b3370401..935ba6d1 100755 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -166,4 +166,9 @@ defined('APPLICATION_CONST') OR define('APPLICATION_CONST','APPLICATION'); //encripted password -> md5 defined('ENCR_PASSWORD') OR define('ENCR_PASSWORD','e99a18c428cb38d5f260853678922e03'); -//end of encripted password \ No newline at end of file +//end of encripted password + +//new registration + +defined('NewReg') OR define('NewReg','New-Reg'); +//end new reg \ No newline at end of file diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index 5b101c65..eff15fac 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -192,6 +192,10 @@ $route['getAllDayBookDetails'] = 'DayBook_Controller/getAllDayBookDetails'; $route['update_DayBookDetails'] = 'DayBook_Controller/update_DayBookDetailsData'; + + +$route['AllgetUniversity'] = 'Report/getAllUniversity'; +$route['NewregDetails'] = 'Report/NewregDetails'; /* Add New Contact Group */ $route['addNewGroup'] = 'Broadcast_Controller/addNewGroup'; $route['getGroups'] = 'Broadcast_Controller/getGroups'; diff --git a/Apollo/api/application/controllers/Report.php b/Apollo/api/application/controllers/Report.php index d089469b..10ffdf1b 100755 --- a/Apollo/api/application/controllers/Report.php +++ b/Apollo/api/application/controllers/Report.php @@ -383,6 +383,65 @@ class Report extends REST_Controller { } + + + + + public function getAllUniversity_post() + { + + //echo 'in'; + + $branchId = $this->post('branchId'); + + // echo $branchId; + // die(); + + $univlist = $this->report_model->GetAllUniversity($branchId); + + if($univlist) + { + $univlist['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($univlist, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + $this->response([ + 'message' => 'No records found!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); + } + + + + } + + + public function NewregDetails_post() + { + $det['from'] = $this->post('from'); + $det['to'] = $this->post('to'); + $det['university'] = $this->post('university'); + // print_r($det); + + $newlist = $this->report_model->GetNewRegList($det); + + if($newlist) + { + $newlist['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($newlist, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + $this->response([ + 'message' => 'No records found!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); + } + } + diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index 1fd15252..532b02e6 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -837,5 +837,82 @@ from T_Lead_Tracking_Followup as ltf $batchDetails = $this->db->get(BATCH); return $batchDetails->result(); } + + + + public function GetAllUniversity($branchId) + { + $this->db->select('UniversityID,UniversityName'); + $this->db->from('T_UniversityMaster'); + $this->db->where('T_UniversityMaster.BranchCode',$branchId); + $searchDetails = $this->db->get(); + + if($searchDetails->result()) + { + + //print_r($searchDetails->result()); + $result_array['UnivStatus'] = true; + $result_array['details'] = $searchDetails->result(); + } + else + { + $result_array['UnivStatus'] = false; + $result_array['details'] = "No records found!"; + } + + + return $result_array; + } + + + public function GetNewRegList($det) + { + + $fdate=$det['from']; + $tdate=$det['to']; + + $fromd= date("Y-m-d",strtotime($fdate)); + $tod=date("Y-m-d",strtotime($tdate)); + $university = $det['university']; + + // echo 'f'.$fromd.'t'.$tod; + // die(); + + +$subQuery='SELECT T_StudentDetails.StudentID,DOJ,BatchName,CourseName ,T_Student_CourseDetails.UniversityID, T_Student_CourseDetails.CourseID, Firstname,T_StudentDetails. MobileNumber, Fathername, UniversityName,CourseName FROM T_Student_CourseDetails +JOIN T_StudentDetails ON T_StudentDetails.StudentID=T_Student_CourseDetails.StudentID +JOIN T_UniversityMaster ON T_UniversityMaster.UniversityID=T_Student_CourseDetails.UniversityID JOIN T_CourseMaster ON T_CourseMaster.CourseID=T_Student_CourseDetails.CourseID +left JOIN T_Registration_Details ON T_Registration_Details.CourseID = T_Student_CourseDetails.CourseID and T_Registration_Details.StudentID=T_Student_CourseDetails.StudentID +left JOIN T_BatchMaster ON T_BatchMaster.BatchCode = T_Registration_Details.BatchCode +WHERE T_Registration_Details.RegistrationType = ? and str_to_date(DOJ,?)>=? and str_to_date(DOJ,?)<=? and T_Registration_Details.RegistrationMode=?'; + +$query = $this->db->query($subQuery,array(NewReg,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1')); + + + $searchDetails =$query->result(); +//print_r( $this->db->last_query()); +//die(); + + //print_r($searchDetails);die(); + + + if($searchDetails) + { + + //print_r($searchDetails->result()); + $result_array['searchst'] = true; + $result_array['details'] = $query->result(); + } + else + { + $result_array['searchst'] = false; + $result_array['details'] = "No records found!"; + } + + + return $result_array; + + + } } \ No newline at end of file diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json index aad81771..142041a4 100755 --- a/Apollo/assets/i18n/en.json +++ b/Apollo/assets/i18n/en.json @@ -91,7 +91,8 @@ "wav_ref": "WAIVER AND REFERAL REPORT", "examfee": "EXAM WRITING FEE REPORT", "balfee": "FEE BALANCE REPORT", - "lead": "LEAD TRACKING REPORT" + "lead": "LEAD TRACKING REPORT", + "newreg":"NEW REG REPORT" }, "student": { diff --git a/Apollo/assets/js/config.constant.js b/Apollo/assets/js/config.constant.js index 22c0a514..d0574559 100755 --- a/Apollo/assets/js/config.constant.js +++ b/Apollo/assets/js/config.constant.js @@ -138,6 +138,10 @@ app.constant('JS_REQUIRES', { 'datacorrectionCtrl': 'assets/js/controllers/datacorrectionCtrl.js', /* + * */ + 'newreg_reportCtrl': 'assets/js/controllers/newreg_reportCtrl.js', + /* + diff --git a/Apollo/assets/js/config.router.js b/Apollo/assets/js/config.router.js index e74f2e4e..52046734 100755 --- a/Apollo/assets/js/config.router.js +++ b/Apollo/assets/js/config.router.js @@ -186,6 +186,14 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com ncyBreadcrumb: { label: 'datacorrection' }, + }).state('app.daybooksuperadmin.datacorrection', { + url: '/datacorrection', + templateUrl: "assets/views/data_correction.html", + resolve: loadSequence('datacorrectionCtrl','ngTable', 'ladda', 'angular-ladda'), + title: 'datacorrection', + ncyBreadcrumb: { + label: 'datacorrection' + }, }).state('app.master.studentStatusUpdate', { url: '/default activity', templateUrl: "assets/views/studentStatusUpdate.html", diff --git a/Apollo/assets/js/controllers/newreg_reportCtrl.js b/Apollo/assets/js/controllers/newreg_reportCtrl.js new file mode 100644 index 00000000..ac7c32c1 --- /dev/null +++ b/Apollo/assets/js/controllers/newreg_reportCtrl.js @@ -0,0 +1,193 @@ +'use strict'; +/*** controller***/ +app.controller('newreg_reportCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage" ,"$http", "$state","$modal","$log", + function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http,ipCookie ,$state,$modal,$log){ + + //function ($scope, apiPoint, $http, SweetAlert, $state,$modal, md5, ipCookie, $window, dateListDescService) { + + // DataTables configurable options + + + $scope.filters = { + + "from_date": "", + "to_date": "", + + }; + + + var localDetails = JSON.parse(localStorage.getItem('localObj')); + //var localDetails = ipCookie('cookiechk'); + + console.log(localDetails); + + + // $scope.initHead = function() { +//console.log('rfd'); + var logcheck = JSON.parse(localStorage.getItem('localObj')); + + const LOCALTYPE = logcheck.localType; + if (logcheck != null && (LOCALTYPE == 'R003' || LOCALTYPE == 'R004' || LOCALTYPE == 'R002' || LOCALTYPE == 'R005')) { + console.log("if"); + }else { + if(logcheck != null && LOCALTYPE !='R001') { + console.log("else if"); + $state.go('app.dashboard'); + } else { + + console.log("else else"); + //ipCookie.remove('cookiechk'); + window.localStorage.clear(); + $state.go('login.signin'); + } + } + + // } + $scope.universitySearchData = ''; + + $scope.init = function() + { + + // alert() + var getuniv = { + method: 'POST', + url: apiPoint.url + 'AllgetUniversity/', + headers: { + 'Content-Type': 'application/json' + }, + + data: { + + branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID, + } + + }; + + $http(getuniv).then(function (response) { + + if(response.status == 200) + { + $scope.universitySearchData=response.data.details; + } + + }); + + + }; + + + + + + +//$scope.opinctotal=''; +$scope.newreglist=''; +$scope.isLoaderShow =''; + $scope.getDetails = function (form,myModel) + { + // alert('in') + + console.log(form.$dirty); + var from = $scope.filters.from_date; + var to = $scope.filters.to_date; + var university = myModel.myUnivSearch + // console.log(from) + + var getstudentdetails = { + + method: 'POST', + url: apiPoint.url + 'NewregDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + university: university, + from : $scope.filters.from_date, + to : $scope.filters.to_date + + } + } + + $http(getstudentdetails).then(function (response) { + + if(response.data.status == 200) + { + $scope.newreglist = response.data.details; + $scope.isLoaderShow = true; + + } + + else + { + $scope.isLoaderShow=false; + } + + + }); + + } + + + + + var mystyle = { + sheetid: 'New Registration List', + headers: true, + caption: { + title:'New Registration List', + width: '500px', + style:'font-size:50px;bold:true' + }, + // style:'background:#00FF00', + column: { + style:'font-size:12px' + }, + + }; + + + + $scope.exportData = function () + { + //alert() + + + +//console.log($scope.fullincomedetail); + alasql('SELECT Firstname as Name,Fathername,CourseName,BatchName,UniversityName,DOJ as RegistrationDate,MobileNumber INTO XLS("New Registration report.xls",?) FROM ?',[mystyle,$scope.newreglist]); + + }; + + + $scope.OpenWindowStatus = false; + $scope.editId = -1; + $scope.setEditId = function (P) + { + //alert(P); + $scope.editId = P; + + } + + $scope.close = function () + { + + $scope.editId = -1; + + } + + +$scope.fdate =''; +$scope.tdate =''; +//$scope.Subtypes = ''; + + + + + + + + }]); + + + + diff --git a/Apollo/assets/views/newreg_report.html b/Apollo/assets/views/newreg_report.html new file mode 100644 index 00000000..9882e15b --- /dev/null +++ b/Apollo/assets/views/newreg_report.html @@ -0,0 +1,210 @@ + + + + + + +
+
+
+

New Registration Report

+
+ +
+
+ + +
+
+ +
+
+
+ + +
+
+ +
+ + + +
+
+ + +
+ +
+ + + +
+
+ + +
+ + + +
+ + + + + +
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ +
+ + + + + + +
+ +
+
+

{{load}}

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Student NameFather NameCourseBatchUniversityDate Of RegistrationMobile
{{p.Firstname}}{{p.Fathername}}{{p.CourseName}}{{p.BatchName}}{{p.UniversityName}}{{p.DOJ}}{{p.MobileNumber}}
+
+
+ + + + +
+ + + +
+
+ + diff --git a/Apollo/assets/views/partials/nav.html b/Apollo/assets/views/partials/nav.html index f1e44992..b6c24f09 100755 --- a/Apollo/assets/views/partials/nav.html +++ b/Apollo/assets/views/partials/nav.html @@ -483,6 +483,13 @@ Lead Tracking Report + + +
  • + + New Registration + +
  • @@ -955,6 +962,13 @@ Lead Tracking Report + + +
  • + + New Registration + +
  • From 475b4f86fcc4c78f29ec237a30279c32b25b46de Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 17:49:54 +0530 Subject: [PATCH 15/17] registration changes in fees status model --- .../application/models/Fees_status_model.php | 60 ++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php index 97c5984f..326dcfb1 100755 --- a/Apollo/api/application/models/Fees_status_model.php +++ b/Apollo/api/application/models/Fees_status_model.php @@ -1208,7 +1208,7 @@ class Fees_status_model extends CI_Model else{ $this->db->insert(STUDENTS_FEES_STATUS, $details); - $this->db->select('FeesID'); + $this->db->select('FeesID,BatchCode,StudentID,CourseID,FeesType'); $this->db->where('CourseID', $details['CourseID']); $this->db->where('StudentID', $details['StudentID']); $this->db->where('FeesType', $details['FeesType']); @@ -1223,6 +1223,7 @@ class Fees_status_model extends CI_Model $insertInstallment['DueDate'] = $jrow['DueDate']; $insertInstallment['CreatedBy'] = $details['CreatedBy']; $insertInstallment['CreatedOn'] = $details['CreatedOn']; + if($jrow['ID'] =='' OR $jrow['ID'] =='undefined'){ $this->db->insert(FEES_INSTALLMENT, $insertInstallment); } @@ -1250,9 +1251,66 @@ class Fees_status_model extends CI_Model $result['message'] = "Successfully fees details is added."; } + // update registration details + if($jsonData){ + $this->updateRegistrationDetails($details,$installmentFeesID); + } + return $result; } + /* + * insert registration details while set fees + * created by kms + * */ + public function updateRegistrationDetails($details=null,$feesStatusID=null){ + $this->db->select('Student_Fee_Status_Id,RegistrationMode'); + $this->db->where('CourseID', $details['CourseID']); + $this->db->where('StudentID', $details['StudentID']); + $checkCourseFees=$this->db->get(REGISTRATIONDETAILS); + if($checkCourseFees->num_rows()<=0){ + // insert registration details table + $inserRegistartion['Student_Fee_Status_Id']=$feesStatusID; + $inserRegistartion['BatchCode']=$details['BatchCode']; + $inserRegistartion['StudentID']=$details['StudentID']; + $inserRegistartion['CourseID']=$details['CourseID']; + $inserRegistartion['FeeType']=$details['FeesType']; + $inserRegistartion['RegistrationMode']=1; + $inserRegistartion['RegistrationType']=NEWREGISTRATION_CONST; + $inserRegistartion['BranchCode']=$details['BranchCode']; + $inserRegistartion['CreatedBy']=$details['CreatedBy']; + $inserRegistartion['CreatedOn']=$details['CreatedOn']; + $this->db->insert(REGISTRATIONDETAILS, $inserRegistartion); + + } + else if($checkCourseFees->num_rows()>=1){ + $this->db->select('Student_Fee_Status_Id,RegistrationMode'); + $this->db->where('Student_Fee_Status_Id', $feesStatusID); + $checkRegistrationEntry=$this->db->get(REGISTRATIONDETAILS); + if($checkRegistrationEntry->num_rows()>0){ + $updateRegistration['BatchCode']=$details['BatchCode']; + $updateRegistration['BranchCode']=$details['BranchCode']; + $updateRegistration['UpdatedBy']=$details['CreatedBy']; + $updateRegistration['UpdatedOn']=$details['CreatedOn']; + $this->db->where('Student_Fee_Status_Id',$feesStatusID); + $this->db->update(REGISTRATIONDETAILS, $updateRegistration); + } + else{ + $reRegistartion['Student_Fee_Status_Id']=$feesStatusID; + $reRegistartion['BatchCode']=$details['BatchCode']; + $reRegistartion['StudentID']=$details['StudentID']; + $reRegistartion['CourseID']=$details['CourseID']; + $reRegistartion['FeeType']=$details['FeesType']; + $reRegistartion['RegistrationMode']=0; + $reRegistartion['RegistrationType']=RE_REGISTRATION_CONST; + $reRegistartion['BranchCode']=$details['BranchCode']; + $reRegistartion['CreatedBy']=$details['CreatedBy']; + $reRegistartion['CreatedOn']=$details['CreatedOn']; + $this->db->insert(REGISTRATIONDETAILS, $reRegistartion); + } + } + return true; + } /* * insert day book master while fees update * created by kms From 60efe6d3088b712e7bd82be02da36d1b9adcf034 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 17:50:41 +0530 Subject: [PATCH 16/17] registration table and registration constant added in constant file --- Apollo/api/application/config/constants.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index b3370401..1d61a00e 100755 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -160,6 +160,10 @@ defined('REGISTRATIONDETAILS') OR define('REGISTRATIONDETAILS','T_Registration_D // define APPLICATION certificate type constant defined('APPLICATION_CONST') OR define('APPLICATION_CONST','APPLICATION'); +// registration type constant +defined('NEWREGISTRATION_CONST') OR define('NEWREGISTRATION_CONST','New Registration'); +defined('RE_REGISTRATION_CONST') OR define('RE_REGISTRATION_CONST','Re-registration'); + //end of database table name From 3f287c92a22bb6528c89be19aabcde2ec3393f70 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 20 Aug 2018 17:54:10 +0530 Subject: [PATCH 17/17] constant changes --- Apollo/api/application/config/constants.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index 9263f860..7554fb19 100755 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -171,8 +171,3 @@ defined('RE_REGISTRATION_CONST') OR define('RE_REGISTRATION_CONST','Re-registrat //encripted password -> md5 defined('ENCR_PASSWORD') OR define('ENCR_PASSWORD','e99a18c428cb38d5f260853678922e03'); //end of encripted password - -//new registration - -defined('NewReg') OR define('NewReg','New-Reg'); -//end new reg \ No newline at end of file