changes for file upload js,html and api

This commit is contained in:
gandhimathi 2018-08-30 12:42:35 +05:30
parent 3e8205df77
commit ebca18af0c

View File

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