diff --git a/Apollo/api/application/controllers/Subject_Controller.php b/Apollo/api/application/controllers/Subject_Controller.php index 0ed22917..cd87d7f6 100755 --- a/Apollo/api/application/controllers/Subject_Controller.php +++ b/Apollo/api/application/controllers/Subject_Controller.php @@ -38,6 +38,7 @@ class Subject_Controller extends REST_Controller { $details['SubjectName'] = $this->post('SubjectName'); $details['IsActive'] = $this->post('Status'); $details['CreatedBy'] = $this->post('createdBy'); + $details['BranchCode'] = $this->post('branchCode'); $details['CreatedOn'] = $now->format('Y-m-d H:i:s'); $subjectDetails = $this->subject_model->addSubject($details);// Check if the users data store contains users (in case the database result returns NULL) @@ -66,8 +67,9 @@ class Subject_Controller extends REST_Controller { public function getSubjectDetails_post() { $requestedBy = $this->post('requestedBy'); + $branchCode = $this->post('branchCode'); - $getSubject = $this->subject_model->getSubject($requestedBy); + $getSubject = $this->subject_model->getSubject($requestedBy,$branchCode); @@ -101,6 +103,7 @@ class Subject_Controller extends REST_Controller { $SubjectID = $this->post('SubjectID'); $details['IsActive'] = $this->post('Status'); $details['UpdatedBy'] = $this->post('updatedBy'); + $details['BranchCode'] = $this->post('branchCode'); $details['UpdatedOn'] = $now->format('Y-m-d H:i:s'); // print_r($SubjectID);die();