From df217d5013d3daa199590c0f5bd636bae8de9680 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Mon, 22 Oct 2018 15:06:13 +0530 Subject: [PATCH 1/6] pc to ppc --- .../controllers/Fees_Status_Controller.php | 2 ++ .../application/models/Fees_status_model.php | 27 ++++++++++++++++--- .../assets/js/controllers/feesStatusCtrl.js | 26 +++++++++++++++--- 3 files changed, 47 insertions(+), 8 deletions(-) diff --git a/Apollo/api/application/controllers/Fees_Status_Controller.php b/Apollo/api/application/controllers/Fees_Status_Controller.php index 6afbc0a6..0e2fb5c4 100755 --- a/Apollo/api/application/controllers/Fees_Status_Controller.php +++ b/Apollo/api/application/controllers/Fees_Status_Controller.php @@ -93,6 +93,8 @@ class Fees_Status_Controller extends REST_Controller { $student['StudentID'] = $this->post('studentID'); $student['BranchCode'] = $this->post('branchCode'); $getStudentFeesDetails = $this->Fees_model->getStudentFeesStructure($student); + + if ($getStudentFeesDetails) { $getStudentFeesDetails['status'] = REST_Controller::HTTP_OK; diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php index 93f41c9c..5185b3fe 100755 --- a/Apollo/api/application/models/Fees_status_model.php +++ b/Apollo/api/application/models/Fees_status_model.php @@ -94,6 +94,8 @@ class Fees_status_model extends CI_Model $this->db->where('BA.BranchCode',$student['BranchCode']); $this->db->order_by('SFS.FeesID','DESC'); $enrolledFeesDetails = $this->db->get(); +//print_r($enrolledFeesDetails->result());die(); + if($enrolledFeesDetails->result()){ $result_array['feesStatus']=true; foreach ($enrolledFeesDetails->result() as $row) { @@ -130,24 +132,37 @@ class Fees_status_model extends CI_Model else{ $fetchData['BalanceAmount']=$fetchData['PayableFees'] - $paidBillAmount[0]->PaidBillAmount; } - $fetchData['PC'] = $row->PC; + $fetchData['PPC'] = $row->PC; $fetchData['TC'] = $row->TC; $fetchData['DC'] = $row->DC; $fetchData['MC'] = $row->MC; $fetchData['OtherFees'] = $row->OtherFees; $CourseFeesArray[]=$fetchData; + + + } + + + $getDefaultCourseFees = $this->getDefaultCourseFees($student); + // print_r($getDefaultCourseFees);die(); if($getDefaultCourseFees!=false){ + + $result_array['feesDetails']=array_merge($getDefaultCourseFees,$CourseFeesArray); } else{ + $result_array['feesDetails']=$CourseFeesArray; } + // print_r($result_array['feesDetails']);die(); + + // $result_array['getFeesUpdateStatus']=$this->getFeesUpdateStatus(FEESUPDATE); $result_array['getExistStudentFeesDetails']=$this->existStudentFeesDetails($student); @@ -183,7 +198,7 @@ class Fees_status_model extends CI_Model * */ public function getDefaultCourseFees($student=null) { - $serachArray = ["PC","TC","DC","MC","OTHER"]; + $serachArray = ["PPC","TC","DC","MC","OTHER"]; $this->db->select('SFS.FeesID,SFS.FeesType,SFS.CourseID,SFS.CourseFees,SFS.STFOrWR,SFS.Comments,SFS.Waiver,SFS.Others,SFS.SessionName,SFS.RollNo,CU.PC,CU.TC,CU.DC,CU.MC,CU.OtherFees'); $this->db->from(STUDENTS_FEES_STATUS . ' as SFS'); @@ -224,7 +239,7 @@ class Fees_status_model extends CI_Model } else { $fetchData['BalanceAmount'] = $fetchData['PayableFees'] - $paidBillAmount[0]->PaidBillAmount; } - $fetchData['PC'] = $row->PC; + $fetchData['PPC'] = $row->PC; $fetchData['TC'] = $row->TC; $fetchData['DC'] = $row->DC; $fetchData['MC'] = $row->MC; @@ -368,7 +383,7 @@ class Fees_status_model extends CI_Model * */ public function existStudentCourseDefaultFees($student=null){ - $serachArray = ["PC","TC","DC","MC","OTHER"]; + $serachArray = ["PPC","TC","DC","MC","OTHER"]; $this->db->distinct(); $this->db->select('SFS.FeesID,SFS.FeesType,SFS.Comments,SFS.SessionName,SFS.ToSessionName,SFS.RollNo,ifnull(SFS.CourseFees,0) as CourseFees,ifnull(SFS.STFOrWR,0) as STFOrWR,ifnull(SFS.Waiver,0) as Waiver,ifnull(SFS.Others,0) as Others,ST.Firstname,ST.MobileNumber,ST.Fathername,CU.CourseName,CU.CourseID,STC.EnrollmentID,US.UniversityName,US.UniversityShortName'); $this->db->from(STUDENTS_FEES_PAID.' as SFP'); @@ -456,7 +471,11 @@ class Fees_status_model extends CI_Model } + // print_r($mergeResult); + return $mergeResult; + + } else { return false; diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index a1d399c6..ed38f803 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -892,10 +892,10 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $http(getFees).then(function (response) { if (response.data.status==200 && response.data.feesStatus) { $scope.studentFeesInfo=response.data.feesDetails; - //console.log( $scope.studentFeesInfo); + //console.log($scope.studentFeesInfo); $scope.existStudentFeesDetails = response.data.getExistStudentFeesDetails; $scope.getFeesUpdateStatus = response.data.getFeesUpdateStatus; - + console.log($scope.existStudentFeesDetails); $scope.updateModel = { "feesType": $scope.studentFeesInfo[0], //User wants to manually enter fees amount @@ -1282,8 +1282,11 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n * */ $scope.changeInstallemt = function (model,form) { - //alert('in') + + if(model.Sem_Year!='TC' && model.Sem_Year!='PPC' && model.Sem_Year!='DC' && model.Sem_Year!='MC' && model.Sem_Year!='OTHER'){ + + $scope.BatchDetails=[]; $rootScope.updateMoreItems=[]; angular.forEach(model.batchDetails,function (values,key) { @@ -1349,9 +1352,13 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } $scope.setFeesTotalAmount(model,'1',model,'1'); } + + else{ $scope.setFeesTotalAmount(model,'3',model,'1'); + + } // form.$setPristine(true); @@ -1390,8 +1397,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n * get set fees total amount * */ $scope.setFeesTotalAmount = function (values,type,beforeValues,from) { - if(type==3 || values.Sem_Year=='TC' || values.Sem_Year=='PC' || values.Sem_Year=='DC' || values.Sem_Year=='MC' || values.Sem_Year=='OTHER'){ + //alert('set fee') + + + if(type==3 || values.Sem_Year=='TC' || values.Sem_Year=='PPC' || values.Sem_Year=='DC' || values.Sem_Year=='MC' || values.Sem_Year=='OTHER'){ +//alert('if') if(values.Valid=='0'){ swal("", "Course fees are not paid so unable to set course fees", "warning"); @@ -1424,11 +1435,16 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.setTotalAmount= parseInt($scope.actFees) + parseInt($scope.stfFees) + parseInt($scope.othersFees) - parseInt($scope.wiverFees); $scope.setModel.feesType.BatchCode = "Not applicable"; $scope.setModel.feesType.SessionName = "Not applicable"; + $scope.setModel.feesType.BatchName = "Not applicable"; $rootScope.updateMoreItems=[]; + $scope.BatchDetails=''; + } else{ + + if($scope.setTotalAmount=='' || $scope.setTotalAmount==null || $scope.setTotalAmount==0){ $scope.beforeSetTotalAmount=0; } @@ -1497,6 +1513,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n else{ + + if(values.ActualFees=='' || values.ActualFees==null || values.ActualFees==undefined){ $scope.actFees=0; } From 0fc4460d8a93d425a80779d824d7b2ae9e202c58 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Mon, 22 Oct 2018 16:44:10 +0530 Subject: [PATCH 2/6] new reg --- Apollo/api/application/config/database.php | 8 +++----- Apollo/api/application/models/Reports_model.php | 5 ++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Apollo/api/application/config/database.php b/Apollo/api/application/config/database.php index 2478e6ae..1b309c8d 100755 --- a/Apollo/api/application/config/database.php +++ b/Apollo/api/application/config/database.php @@ -76,15 +76,13 @@ $query_builder = TRUE; $db['default'] = array( 'dsn' => '', 'hostname' => 'apollodec.com', - 'username' => 'apollod4_DEV', - 'password' => 'apollo1234', - 'database' => 'apollod4_ApolloDECDev', + // 'username' => 'apollod4_DEV', + // 'password' => 'apollo1234', + // 'database' => 'apollod4_ApolloDECDev', // 'username' => 'apollod4_SIT', // 'password' => 'apollosit1234', // 'database' => 'apollod4_ApolloDECNEWSIT', - - 'dbdriver' => 'mysqli', 'dbprefix' => '', diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index ce1b757d..2ad01d9e 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -1098,7 +1098,7 @@ from T_Lead_Tracking_Followup as ltf // die(); -$subQuery="SELECT T_StudentDetails.StudentID,T_Student_CourseDetails.DOJ,BatchName,CourseName ,T_Student_CourseDetails.UniversityID, T_Student_CourseDetails.CourseID, T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails. MobileNumber, T_StudentDetails.Fathername, UniversityName,CourseName,ReferredBy,ReferersMobileNumber,T_StaffDetails.Firstname as Fname,T_StaffDetails.Lastname as Lname,Sem_Year FROM T_Student_CourseDetails +$subQuery="SELECT T_StudentDetails.StudentID,T_Student_CourseDetails.DOJ,BatchName,CourseName ,T_Student_CourseDetails.UniversityID, T_Student_CourseDetails.CourseID, T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails. MobileNumber, T_StudentDetails.Fathername,CourseName,ReferredBy,ReferersMobileNumber,T_StaffDetails.Firstname as Fname,T_StaffDetails.Lastname as Lname,Sem_Year 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 @@ -1126,6 +1126,9 @@ WHERE T_Registration_Details.RegistrationType = '".$regconst."' and T_Registrati $subQuery.="and T_Student_CourseDetails.UniversityID='".$university."'"; } + + $subQuery.='group by T_Student_CourseDetails.ID'; + $query = $this->db->query($subQuery,array()); From 883b38ce6a3ed7764e0985dd5fc824023ac9b7cb Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Mon, 22 Oct 2018 16:45:53 +0530 Subject: [PATCH 3/6] database --- Apollo/api/application/config/database.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Apollo/api/application/config/database.php b/Apollo/api/application/config/database.php index 1b309c8d..2d33a761 100755 --- a/Apollo/api/application/config/database.php +++ b/Apollo/api/application/config/database.php @@ -76,9 +76,9 @@ $query_builder = TRUE; $db['default'] = array( 'dsn' => '', 'hostname' => 'apollodec.com', - // 'username' => 'apollod4_DEV', - // 'password' => 'apollo1234', - // 'database' => 'apollod4_ApolloDECDev', + 'username' => 'apollod4_DEV', + 'password' => 'apollo1234', + 'database' => 'apollod4_ApolloDECDev', // 'username' => 'apollod4_SIT', // 'password' => 'apollosit1234', From 6ba505ed90bf9a6b8d340dc4587978b59600e343 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Mon, 22 Oct 2018 18:34:42 +0530 Subject: [PATCH 4/6] changes --- Apollo/api/application/controllers/Report.php | 3 +++ Apollo/api/application/models/DayBook_model.php | 4 +++- Apollo/api/application/models/Reports_model.php | 4 +++- Apollo/assets/js/controllers/newreg_reportCtrl.js | 3 ++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Apollo/api/application/controllers/Report.php b/Apollo/api/application/controllers/Report.php index e22bc187..1bd825fc 100755 --- a/Apollo/api/application/controllers/Report.php +++ b/Apollo/api/application/controllers/Report.php @@ -474,6 +474,9 @@ class Report extends REST_Controller { $det['from'] = $this->post('from'); $det['to'] = $this->post('to'); $det['university'] = $this->post('university'); + $det['branch'] = $this->post('branch'); + + // print_r($det); $newlist = $this->report_model->GetNewRegList($det); diff --git a/Apollo/api/application/models/DayBook_model.php b/Apollo/api/application/models/DayBook_model.php index bc727a60..f5fbcd73 100644 --- a/Apollo/api/application/models/DayBook_model.php +++ b/Apollo/api/application/models/DayBook_model.php @@ -1166,6 +1166,8 @@ $subQuery='select Name,ListName,q.Date as dat,month(str_to_date(Date,?)) as mont //echo $up_details['ID']; //UpdatedOn + // print_r($up_details);die(); + $time = date('Y-m-d H:i:s'); $dateTime = $time; @@ -1179,7 +1181,7 @@ $subQuery='select Name,ListName,q.Date as dat,month(str_to_date(Date,?)) as mont $daybookarr['UpdatedBy'] =$up_details['requestedtBy']; - if($up_details['IsActive'] == 0) + if($up_details['IsActive'] == '0') { $daybookarr['Status'] = 'Cancel'; } diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index 2ad01d9e..c7249d96 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -1093,6 +1093,7 @@ from T_Lead_Tracking_Followup as ltf $tod=date("Y-m-d",strtotime($tdate)); $university = $det['university']; $regconst='New Registration'; + $branch=$det['branch']; // echo 'f'.$fromd.'t'.$tod; // die(); @@ -1105,7 +1106,8 @@ left JOIN T_Registration_Details ON T_Registration_Details.CourseID = T_Student_ left JOIN T_BatchMaster ON T_BatchMaster.BatchCode = T_Registration_Details.BatchCode left JOIN T_StaffDetails ON T_StaffDetails.StaffID = T_StudentDetails.AdmittedBy left JOIN T_Course_Fees_Details on T_Course_Fees_Details.ID=T_Registration_Details.FeeType and T_Course_Fees_Details.CourseID=T_Registration_Details.CourseID -WHERE T_Registration_Details.RegistrationType = '".$regconst."' and T_Registration_Details.RegistrationMode='".'1'."'"; +WHERE T_Registration_Details.RegistrationType = '".$regconst."' and T_Registration_Details.RegistrationMode='".'1'."' and +T_Registration_Details.BranchCode= '".$branch."'"; if ($fromd != ''){ // $fromd= date("Y-m-d",strtotime($from)); diff --git a/Apollo/assets/js/controllers/newreg_reportCtrl.js b/Apollo/assets/js/controllers/newreg_reportCtrl.js index 4e66e3c0..c7aed6bd 100644 --- a/Apollo/assets/js/controllers/newreg_reportCtrl.js +++ b/Apollo/assets/js/controllers/newreg_reportCtrl.js @@ -150,7 +150,8 @@ $scope.tod = to_dt; data: { university: university, from : $scope.filters.from_date, - to : $scope.filters.to_date + to : $scope.filters.to_date, + branch: JSON.parse(localStorage.getItem('localObj')).localBranchID } } From 15314b3224b7a46f8107ad772e16982851f27d80 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Wed, 24 Oct 2018 10:58:54 +0530 Subject: [PATCH 5/6] comments in daybook --- Apollo/assets/views/daybook/daybook.html | 2 +- Apollo/assets/views/daybook/daybookadmin.html | 2 +- Apollo/assets/views/daybook/daybooksuperadmin.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Apollo/assets/views/daybook/daybook.html b/Apollo/assets/views/daybook/daybook.html index 60590abb..39eb1d7a 100755 --- a/Apollo/assets/views/daybook/daybook.html +++ b/Apollo/assets/views/daybook/daybook.html @@ -217,7 +217,7 @@ {{p.Amount}} {{p.Balance}} -
{{p.ReceiptNoComments}}
+
{{p.ReceiptNoComments}}{{p.Description}}
{{p.Reason}} diff --git a/Apollo/assets/views/daybook/daybooksuperadmin.html b/Apollo/assets/views/daybook/daybooksuperadmin.html index 1d8a4479..0a71bf0e 100755 --- a/Apollo/assets/views/daybook/daybooksuperadmin.html +++ b/Apollo/assets/views/daybook/daybooksuperadmin.html @@ -198,7 +198,7 @@ {{p.Amount}} {{p.Balance}} -
{{p.ReceiptNoComments}}
+
{{p.ReceiptNoComments}}{{p.Description}}
{{p.Reason}} From 5ae7aa2d63176ebf4e29ae95ad7cae20c6165a11 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Wed, 24 Oct 2018 11:45:18 +0530 Subject: [PATCH 6/6] new reg report --- Apollo/api/application/models/Reports_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index c7249d96..192f9e1b 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -1099,7 +1099,7 @@ from T_Lead_Tracking_Followup as ltf // die(); -$subQuery="SELECT T_StudentDetails.StudentID,T_Student_CourseDetails.DOJ,BatchName,CourseName ,T_Student_CourseDetails.UniversityID, T_Student_CourseDetails.CourseID, T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails. MobileNumber, T_StudentDetails.Fathername,CourseName,ReferredBy,ReferersMobileNumber,T_StaffDetails.Firstname as Fname,T_StaffDetails.Lastname as Lname,Sem_Year FROM T_Student_CourseDetails +$subQuery="SELECT T_StudentDetails.StudentID,T_Student_CourseDetails.DOJ,BatchName,CourseName ,T_Student_CourseDetails.UniversityID, T_Student_CourseDetails.CourseID, T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails. MobileNumber, T_StudentDetails.Fathername,CourseName,ReferredBy,ReferersMobileNumber,T_StaffDetails.Firstname as Fname,T_StaffDetails.Lastname as Lname,Sem_Year,UniversityName 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