From d4e1c59ef607decfe5b05e0dd6eb02ac99bea86a Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 20 Apr 2018 12:37:09 +0530 Subject: [PATCH] batch master changes done --- Apollo/api/application/controllers/Batch_Controller.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Apollo/api/application/controllers/Batch_Controller.php b/Apollo/api/application/controllers/Batch_Controller.php index 348b13d5..7a53f21c 100755 --- a/Apollo/api/application/controllers/Batch_Controller.php +++ b/Apollo/api/application/controllers/Batch_Controller.php @@ -41,6 +41,7 @@ class Batch_Controller extends REST_Controller { $details['UniversityID'] = $this->post('universityName'); $details['CreatedBy'] = $this->post('createdBy'); $details['IsActive'] = $this->post('status'); + $details['BranchCode'] = $this->post('branchCode'); $details['CreatedOn'] = $now->format('Y-m-d H:i:s'); $batchDetails = $this->batch_model->addBatch($details);// Check if the users data store contains users (in case the database result returns NULL) @@ -68,7 +69,8 @@ class Batch_Controller extends REST_Controller { public function getBatchDetails_post() { $requestedBy = $this->post('requestedBy'); - $getBatch = $this->batch_model->getBatch($requestedBy); + $branchCode = $this->post('branchCode'); + $getBatch = $this->batch_model->getBatch($requestedBy,$branchCode); if ($getBatch) { $getBatch['status'] = REST_Controller::HTTP_OK; @@ -99,6 +101,7 @@ class Batch_Controller extends REST_Controller { $details['BatchDate'] = $this->post('batchDate'); $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( $details['UpdatedOn']) @@ -134,6 +137,7 @@ class Batch_Controller extends REST_Controller { $details['UniversityID'] = $this->post('universityID'); $details['IsDefault'] = $this->post('IsDefault'); $details['UpdatedBy'] = $this->post('updatedBy'); + $details['BranchCode'] = $this->post('branchCode'); $details['UpdatedOn'] = $now->format("Y-m-d H:i:s"); $updateDetails = $this->batch_model->updateDefaultBatch($details);// Check if the users data store contains users (in case the database result returns NULL)