batch master changes done

This commit is contained in:
gandhimathi 2018-04-20 12:37:09 +05:30
parent 0ba019c118
commit d4e1c59ef6

View File

@ -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)