diff --git a/Apollo/api/application/config/database.php b/Apollo/api/application/config/database.php index 2478e6ae..2d33a761 100755 --- a/Apollo/api/application/config/database.php +++ b/Apollo/api/application/config/database.php @@ -83,8 +83,6 @@ $db['default'] = array( // 'username' => 'apollod4_SIT', // 'password' => 'apollosit1234', // 'database' => 'apollod4_ApolloDECNEWSIT', - - 'dbdriver' => 'mysqli', 'dbprefix' => '', 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/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/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/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index ce1b757d..192f9e1b 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -1093,19 +1093,21 @@ 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(); -$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,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 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)); @@ -1126,6 +1128,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()); 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; } 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 } } 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 @@