From ebca18af0c299354483257930d22e40bf834e1a7 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 30 Aug 2018 12:42:35 +0530 Subject: [PATCH] changes for file upload js,html and api --- .../Receive_Enrolment_Fees_Univ_Controller.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php b/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php index a664853e..203c33b0 100644 --- a/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php +++ b/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php @@ -44,12 +44,19 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller { public function receiveEnrolmentFromUniv_post() { + $now = new DateTime(); + $now->setTimezone(new DateTimezone('Asia/Kolkata')); $enrolmentDetails = $this->post('details'); $localDetails = $this->post('localDetails'); - $updatedDetails = $this->receive_model->updateEnrolmentDetails($enrolmentDetails,$localDetails);// Check if the users data store contains users (in case the database result returns NULL) + $fromDetails['CreatedOn'] = $now->format('Y-m-d H:i:s'); + $fromDetails['CreatedBy'] = $localDetails['localUserID']; + $fromDetails['UniversityCode']=$this->post('universityID'); + $fromDetails['UniversityName']=$this->post('universityName'); + $fromDetails['BranchCode']=$localDetails['localBranchID']; + $updatedDetails = $this->receive_model->updateEnrolmentDetails($enrolmentDetails,$fromDetails);// Check if the users data store contains users (in case the database result returns NULL) if ($updatedDetails['status']) { - $updatedDetails['status'] = REST_Controller::HTTP_OK; + $updatedDetails['status'] = true; // Set the response and exit $this->response($updatedDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code }