diff --git a/Apollo/api/application/controllers/Branch_Controller.php b/Apollo/api/application/controllers/Branch_Controller.php index e81191ff..2e51d020 100755 --- a/Apollo/api/application/controllers/Branch_Controller.php +++ b/Apollo/api/application/controllers/Branch_Controller.php @@ -62,6 +62,7 @@ class Branch_Controller extends REST_Controller { $details['CreatedBy'] = $this->post('createdBy'); $details['IsActive'] = $this->post('status') == "true" ? 1 : 0; $details['CreatedOn'] = $now->format('Y-m-d H:i:s'); + $details['FeesReceiptTitle'] = $this->post('feesTitle'); $imageStat = $this->post('imageStatus'); @@ -132,6 +133,7 @@ class Branch_Controller extends REST_Controller { $details['IsActive'] = $this->post('status') == "true" ? 1 : 0; $details['UpdatedBy'] = $this->post('createdBy'); $details['UpdatedOn'] = $now->format("Y-m-d H:i:s"); + $details['FeesReceiptTitle'] = $this->post('feesTitle'); $imageStat = $this->post('imageStatus'); diff --git a/Apollo/api/application/models/Branch_model.php b/Apollo/api/application/models/Branch_model.php index 97976bc7..5fd0c639 100755 --- a/Apollo/api/application/models/Branch_model.php +++ b/Apollo/api/application/models/Branch_model.php @@ -63,7 +63,7 @@ class Branch_model extends CI_Model { public function getBranch() { - $this->db->select('BranchCode,BranchName,LogoPath,MobileNumber,AlternateNumber,LandlineNumber,Address,EmailID,CreatedOn,IsActive'); + $this->db->select('BranchCode,BranchName,LogoPath,MobileNumber,AlternateNumber,LandlineNumber,Address,EmailID,CreatedOn,IsActive,FeesReceiptTitle as feesTitle'); $this->db->order_by('CreatedOn','DESC'); $branchDetails = $this->db->get(BRANCH); diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php index c9671e7c..97b98810 100755 --- a/Apollo/api/application/models/Fees_status_model.php +++ b/Apollo/api/application/models/Fees_status_model.php @@ -326,7 +326,7 @@ class Fees_status_model extends CI_Model $storePaidDetails['StudentPaidAmount']=$studentPaidAmount[0]->StudentPaidAmount; // for get paid bill details - $this->db->select('ifnull(SUM((BillAmount)),0) as BillAmount,BillNO,BillDate,ModeOfPayment,ReceiptNo,BR.BranchName,BR.Address,BR.LogoPath,STF.Firstname as ReceivedBy'); + $this->db->select('ifnull(SUM((BillAmount)),0) as BillAmount,BillNO,BillDate,ModeOfPayment,ReceiptNo,BR.BranchName,BR.Address,BR.LogoPath,BR.FeesReceiptTitle,STF.Firstname as ReceivedBy'); $this->db->from(STUDENTS_FEES_PAID.' as SFP'); $this->db->join(BRANCH.' as BR','BR.BranchCode = SFP.UpdatedBy','left'); $this->db->join(LOGIN.' as LO','LO.ID = SFP.CreatedBy'); @@ -1461,116 +1461,12 @@ class Fees_status_model extends CI_Model $insertfollowup_Details['CreatedBy'] = $arrayDetails['CreatedBy']; $insertfollowup_Details['CreatedOn'] = $arrayDetails['CreatedOn']; $this->db->insert(LEAD_TRACKING_FOLLOWUP, $insertfollowup_Details); - // this if for insert follow up details } } - // hide call track update code - - /*$this->db->select('LD.LeadID,LT.TrackingID'); - $this->db->from(LEAD_DETAILS.' as LD'); - $this->db->join(LEAD_TRACKING.' as LT', 'LT.LeadID = LD.LeadID'); - $this->db->where('LD.MobileNumber',$arrayDetails['MobileNumber']); - $this->db->where('LT.ActivityStatus',$activityDetails->ActivityID); - $this->db->like('LT.University',$arrayDetails['University'],'after'); - $this->db->like('LT.Course',$arrayDetails['Course'],'after'); - $leadDet=$this->db->get()->last_row(); - - if($leadDet){ - - $this->db->select('FollowupOn'); - $this->db->where('TrackingID',$leadDet->TrackingID); - $existFollowupOn = $this->db->get(LEAD_TRACKING_FOLLOWUP)->last_row(); - - // upate tracking status - $changeStatusCode['StatusCode'] = $arrayDetails['StatusCode']; - $changeStatusCode['UpdatedBy'] = $arrayDetails['CreatedBy']; - $changeStatusCode['UpdatedOn'] = $arrayDetails['CreatedOn']; - $changeStatusCode['CreatedBranch']=$arrayDetails['CreatedBranch']; - - $this->db->where('TrackingID',$leadDet->TrackingID); - $this->db->update(LEAD_TRACKING, $changeStatusCode); - // end update status - $updateTrackDetails['TrackingID'] = $leadDet->TrackingID; - $updateTrackDetails['FollowupOn'] = $arrayDetails['FollowupOn']; - $updateTrackDetails['FollowupComments'] = $arrayDetails['FollowupComments']; - $updateTrackDetails['CreatedBy'] = $arrayDetails['CreatedBy']; - $updateTrackDetails['CreatedOn'] = $arrayDetails['CreatedOn']; - - $this->db->insert(LEAD_TRACKING_FOLLOWUP, $updateTrackDetails); - - } - - else{ - $this->db->select('LeadID'); - $this->db->where('MobileNumber',$arrayDetails['MobileNumber']); - $checkLeadDet=$this->db->get(LEAD_DETAILS)->last_row(); - if($checkLeadDet){ - $updateLeadDetails['LeadID'] = $checkLeadDet->LeadID; - $updateLeadDetails['ActivityStatus'] = $activityDetails->ActivityID; - $updateLeadDetails['University'] = $arrayDetails['University']; - $updateLeadDetails['Course'] = $arrayDetails['Course']; - $updateLeadDetails['AssignedTo'] = $arrayDetails['CreatedBy']; - $updateLeadDetails['StatusCode'] = $arrayDetails['StatusCode']; - $updateLeadDetails['CreatedBy'] = $arrayDetails['CreatedBy']; - $updateLeadDetails['CreatedOn'] = $arrayDetails['CreatedOn']; - $updateLeadDetails['CreatedBranch']=$arrayDetails['CreatedBranch']; - $this->db->insert(LEAD_TRACKING, $updateLeadDetails); - // this if for insert tracking details - if($this->db->affected_rows() == '1'){ - $followup_Details['TrackingID']=$this->db->insert_id(); - $followup_Details['FollowupOn']=$arrayDetails['FollowupOn']; - $followup_Details['FollowupComments']=$arrayDetails['FollowupComments']; - $followup_Details['CreatedBy'] = $arrayDetails['CreatedBy']; - $followup_Details['CreatedOn'] = $arrayDetails['CreatedOn']; - $this->db->insert(LEAD_TRACKING_FOLLOWUP, $followup_Details); - // this if for insert follow up details - - } - - } - else{ - $newLeadDetails['MobileNumber'] = $arrayDetails['MobileNumber']; - $newLeadDetails['LeadName'] = $arrayDetails['LeadName']; - $newLeadDetails['CreatedBy'] = $arrayDetails['CreatedBy']; - $newLeadDetails['CreatedOn'] = $arrayDetails['CreatedOn']; - $this->db->insert(LEAD_DETAILS, $newLeadDetails); - // this if for insert lead details - if($this->db->affected_rows() == '1'){ - // get and store insert id from db - $track_Details['LeadID']=$this->db->insert_id(); - $track_Details['ActivityStatus'] = $activityDetails->ActivityID; - $track_Details['University'] = $arrayDetails['University']; - $track_Details['Course'] = $arrayDetails['Course']; - $track_Details['AssignedTo'] = $arrayDetails['CreatedBy']; - $track_Details['StatusCode'] = $arrayDetails['StatusCode']; - $track_Details['CreatedBy'] = $arrayDetails['CreatedBy']; - $track_Details['CreatedOn'] = $arrayDetails['CreatedOn']; - $track_Details['CreatedBranch']=$arrayDetails['CreatedBranch']; - $this->db->insert(LEAD_TRACKING, $track_Details); - // this if for insert tracking details - if($this->db->affected_rows() == '1'){ - $insertfollowup_Details['TrackingID']=$this->db->insert_id(); - $insertfollowup_Details['FollowupOn']=$arrayDetails['FollowupOn']; - $insertfollowup_Details['FollowupComments']=$arrayDetails['FollowupComments']; - $insertfollowup_Details['CreatedBy'] = $arrayDetails['CreatedBy']; - $insertfollowup_Details['CreatedOn'] = $arrayDetails['CreatedOn']; - $this->db->insert(LEAD_TRACKING_FOLLOWUP, $insertfollowup_Details); - // this if for insert follow up details - - } - - - } - - } - - - }*/ - } } diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php index ddfcd8eb..5413e658 100755 --- a/Apollo/api/application/models/Student_model.php +++ b/Apollo/api/application/models/Student_model.php @@ -1269,15 +1269,17 @@ class Student_model extends CI_Model $this->db->where('PLD.ListName','PENDING'); $this->db->where('AC.IsActive','1'); $this->db->where('AS.IsActive','1'); + $this->db->where('AC.BranchCode',$localdata['localBranchID']); + $this->db->where('PLD.BranchCode',$localdata['localBranchID']); $checkApplicationStatus=$this->db->get()->last_row(); if($checkApplicationStatus){ - $studentDetails = $this->studentInfoForDocumentStatus($fromDetails); + $studentDetails = $this->studentInfoForDocumentStatus($fromDetails,$localdata); if($studentDetails){ $arrayDetails['MobileNumber']=$studentDetails->MobileNumber; $arrayDetails['LeadName']=$studentDetails->Firstname; - $arrayDetails['University']=""; - $arrayDetails['Course']=""; + $arrayDetails['University']=$studentDetails->UniversityName;; + $arrayDetails['Course']=$studentDetails->CourseName;; $arrayDetails['ActivityStatus'] = $checkApplicationStatus->ActivityID;; $arrayDetails['StatusCode']=$checkApplicationStatus->ListCode; $arrayDetails['CreatedBranch']=$localdata['localBranchID']; @@ -1358,7 +1360,7 @@ class Student_model extends CI_Model * get student info for documet updates * created by kms * */ - public function studentInfoForDocumentStatus($details=null){ + public function studentInfoForDocumentStatus($details=null,$localdata=null){ $this->db->select('ST.Firstname,ST.MobileNumber,US.UniversityName,CU.CourseName'); $this->db->from(STUDENTCOURSE.' as STC'); @@ -1366,8 +1368,10 @@ class Student_model extends CI_Model $this->db->join(COURSE.' as CU', 'CU.CourseID = STC.CourseID'); $this->db->join(UNIVERSITY.' as US', 'US.UniversityID = STC.UniversityID'); $this->db->where('ST.StudentID',$details['StudentID']); + $this->db->where('US.BranchCode',$localdata['localBranchID']); // $this->db->where('STC.CourseID',$details[0]['CourseID']); $leadDet=$this->db->get()->last_row(); + if($leadDet){ return $leadDet; } diff --git a/Apollo/assets/js/controllers/branchCtrl.js b/Apollo/assets/js/controllers/branchCtrl.js index 4f9a7cfb..e4c1883a 100755 --- a/Apollo/assets/js/controllers/branchCtrl.js +++ b/Apollo/assets/js/controllers/branchCtrl.js @@ -14,7 +14,8 @@ app.controller('branchCtrl', ["$scope","toaster", "$filter", "ngTableParams", "A "landLine": "", "address": "", "logo": "", - "switchsetting": true + "switchsetting": true, + "feesTitle":"" }; /* @@ -131,7 +132,7 @@ app.controller('branchCtrl', ["$scope","toaster", "$filter", "ngTableParams", "A formData.append("landLine", myModel.landLine); formData.append("address", myModel.address); formData.append("status", myModel.switchsetting); - + formData.append("feesTitle", myModel.feesTitle); var checkImg = logo == undefined ? 0 : 1; formData.append("imageStatus", checkImg); @@ -282,6 +283,7 @@ app.controller('branchCtrl', ["$scope","toaster", "$filter", "ngTableParams", "A formData.append("address", myModel.Address); formData.append("status", myModel.IsActive); formData.append("logo", myModel.LogoPath); + formData.append("feesTitle", myModel.feesTitle); var checkImg = logoEdit == undefined ? 0 : 1; formData.append("imageStatus", checkImg); diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index b96beab5..59aa5924 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -2608,8 +2608,8 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "items","Wo $scope.branchName = ""; $scope.ReceivedBy = ""; $scope.BranchAddr = ""; - $scope.BranchAddr = ""; $scope.BranchLogo = ""; + $scope.FeesReceiptTitle = ""; $scope.ShowHide = function (pdfValue) { $scope.showButton = true; $scope.billNo = pdfValue.BillNO; @@ -2621,6 +2621,7 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "items","Wo $scope.ReceivedBy = pdfValue.ReceivedBy; $scope.BranchAddr = pdfValue.Address; $scope.BranchLogo = pdfValue.LogoPath; + $scope.FeesReceiptTitle = pdfValue.FeesReceiptTitle; } @@ -2637,6 +2638,7 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "items","Wo $scope.ReceivedBy=""; $scope.BranchAddr = ""; $scope.BranchLogo = ""; + $scope.FeesReceiptTitle=""; } }]); diff --git a/Apollo/assets/js/controllers/sendSMSsuperadminCtrl.js b/Apollo/assets/js/controllers/sendSMSsuperadminCtrl.js index 96baf76c..09f15466 100755 --- a/Apollo/assets/js/controllers/sendSMSsuperadminCtrl.js +++ b/Apollo/assets/js/controllers/sendSMSsuperadminCtrl.js @@ -308,7 +308,8 @@ app.controller('studentModalDemoCtrl', ["$scope", "$rootScope", "$modal", "$log" }, data: { requestedBy :studentDetails.MobileNumber, - requestedFrom: 3 + requestedFrom: 3, + branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID } }; $http(getcourse).then(function (response) { diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js index 8835098d..fde7578e 100755 --- a/Apollo/assets/js/controllers/studentCtrl.js +++ b/Apollo/assets/js/controllers/studentCtrl.js @@ -3046,7 +3046,8 @@ app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", }, data: { requestedBy: studentDetails.StudentID, - requestedFrom: 1 + requestedFrom: 1, + branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID } }; $http(getcourse).then(function (response) { diff --git a/Apollo/assets/views/branchDetails.html b/Apollo/assets/views/branchDetails.html index 7ce3e45c..ec0fa475 100755 --- a/Apollo/assets/views/branchDetails.html +++ b/Apollo/assets/views/branchDetails.html @@ -5,6 +5,16 @@ box-shadow: 0px 0px 2px #007AFF; padding: 0.5em 0.6em; } + .thumb { + width: 130px; + height: 140px; + margin: 2px; + float: left; + } + + .uploader { + clear: both; + }
@@ -156,7 +166,7 @@ Branch Code - Branch code is required Invalid branch code @@ -234,6 +244,22 @@ +
+ + + + Fees receipt title is required + Invalid Fees receipt title + + +
-
-
-
-
-
+
+
+
+ +
+
+
-
-
-
Branch Logo
-
+
+
+
Branch Logo
+
-
- -
-
- - -
-
- -
+
+ +
+
+ + +
+
+
- -
+
- -
+
+ +
diff --git a/Apollo/assets/views/editBranchDetails.html b/Apollo/assets/views/editBranchDetails.html index 5cef1591..1877e51f 100755 --- a/Apollo/assets/views/editBranchDetails.html +++ b/Apollo/assets/views/editBranchDetails.html @@ -1,3 +1,17 @@ +
@@ -16,7 +30,7 @@ Branch Code -
-
+
+ + + + Fees receipt title is required + Invalid Fees receipt title + + +
+
@@ -147,73 +177,63 @@
+ + +
+
- - -
-
- -
-
-
-
Update Logo
-
+ + +
+
+ +
+
+
+
Update Logo
+
-
-
-
-
-
-
- + +
+
+
+
+
+ -
-
- - -
-
- -
+
+
+ + +
+
+
-
+
- -
- +
+ +
diff --git a/Apollo/assets/views/status-update/updateFeesStatus.html b/Apollo/assets/views/status-update/updateFeesStatus.html index 7ca2e3db..6d85e996 100755 --- a/Apollo/assets/views/status-update/updateFeesStatus.html +++ b/Apollo/assets/views/status-update/updateFeesStatus.html @@ -531,10 +531,10 @@ -->
- APOLLO DISTANCE EDUCATION COLLEGE + {{FeesReceiptTitle}}
- (A Group of SVE Trust) -
+ {{BranchAddr}}