course details changes done
This commit is contained in:
parent
408feb4e8a
commit
2182e5cedf
@ -32,8 +32,10 @@ class Fees_Status_Controller extends REST_Controller {
|
|||||||
// Configure limits on our controller methods
|
// Configure limits on our controller methods
|
||||||
// Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php
|
// Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php
|
||||||
$this->methods['getStudentList_get']['limit'] = 500; // 500 requests per hour per user/key
|
$this->methods['getStudentList_get']['limit'] = 500; // 500 requests per hour per user/key
|
||||||
$this->methods['getStudentList_post']['limit'] = 1000; // 100 requests per hour per user/key
|
$this->methods['getStudentList_post']['limit'] = 1000; // 1000 requests per hour per user/key
|
||||||
$this->methods['getStudentList_delete']['limit'] = 50; // 50 requests per hour per user/key
|
$this->methods['getStudentList_delete']['limit'] = 50; // 50 requests per hour per user/key
|
||||||
|
$this->methods['getFeesStructure_post']['limit'] = 1000; // 1000 requests per hour per user/key
|
||||||
|
$this->methods['updateFeesDetails_post']['limit'] = 1000; // 1000 requests per hour per user/key
|
||||||
// load the model
|
// load the model
|
||||||
$this->load->model('Fees_status_model', 'Fees_model');
|
$this->load->model('Fees_status_model', 'Fees_model');
|
||||||
|
|
||||||
@ -47,14 +49,13 @@ class Fees_Status_Controller extends REST_Controller {
|
|||||||
* */
|
* */
|
||||||
public function getStudentList_post()
|
public function getStudentList_post()
|
||||||
{
|
{
|
||||||
$search['requestedBy'] = $this->post('createdBy');
|
$search['requestedBy'] = $this->post('requestedtBy');
|
||||||
$search['StudentName'] = $this->post('studentName');
|
$search['Firstname'] = $this->post('studentName');
|
||||||
$search['MobileNumber'] = $this->post('mobileNumber');
|
$search['MobileNumber'] = $this->post('mobileNumber');
|
||||||
$getStudentDetails = $this->Fees_model->getStudentList($search);
|
$getStudentDetails = $this->Fees_model->getStudentList($search);
|
||||||
|
|
||||||
if ($getStudentDetails)
|
if ($getStudentDetails)
|
||||||
{
|
{
|
||||||
$getTrackedDetails['status'] = REST_Controller::HTTP_OK;
|
$getStudentDetails['status'] = REST_Controller::HTTP_OK;
|
||||||
// Set the response and exit
|
// Set the response and exit
|
||||||
$this->response($getStudentDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
$this->response($getStudentDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||||
}
|
}
|
||||||
@ -70,8 +71,82 @@ class Fees_Status_Controller extends REST_Controller {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* get student fees structure
|
||||||
|
* created by kms
|
||||||
|
* */
|
||||||
|
public function getFeesStructure_post()
|
||||||
|
{
|
||||||
|
$student['ID'] = $this->post('ID');
|
||||||
|
$student['requestedBy'] = $this->post('requestedtBy');
|
||||||
|
$student['CourseID'] = $this->post('courseID');
|
||||||
|
$student['StudentID'] = $this->post('studentID');
|
||||||
|
$getStudentFeesDetails = $this->Fees_model->getStudentFeesStructure($student);
|
||||||
|
if ($getStudentFeesDetails)
|
||||||
|
{
|
||||||
|
$getStudentFeesDetails['status'] = REST_Controller::HTTP_OK;
|
||||||
|
// Set the response and exit
|
||||||
|
$this->response($getStudentFeesDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Set the response and exit
|
||||||
|
$this->response([
|
||||||
|
'message' => 'No records found!',
|
||||||
|
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||||
|
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* update fees details for student
|
||||||
|
* created by kms
|
||||||
|
* */
|
||||||
|
|
||||||
|
|
||||||
|
public function updateFeesDetails_post()
|
||||||
|
{
|
||||||
|
$now = new DateTime();
|
||||||
|
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
|
||||||
|
$details['StudentID'] = $this->post('studID');
|
||||||
|
$details['CourseID'] = $this->post('courseID');
|
||||||
|
$details['FeesType'] = $this->post('feesID');
|
||||||
|
$details['CourseFees'] = $this->post('courseAmount');
|
||||||
|
$details['STFOrWR'] = $this->post('STFWR');
|
||||||
|
$details['Waiver'] = $this->post('waiver');
|
||||||
|
$details['Others'] = $this->post('other');
|
||||||
|
$details['CreatedBy'] = $this->post('createdBy');
|
||||||
|
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
|
||||||
|
$detailsChild['StudentID'] = $this->post('studID');
|
||||||
|
$detailsChild['SessionID'] = $this->post('session');
|
||||||
|
$detailsChild['BillNO'] = $this->post('billNO');
|
||||||
|
$detailsChild['BillDate'] = $this->post('billDate');
|
||||||
|
$detailsChild['BillAmount'] = $this->post('billAmount');
|
||||||
|
$detailsChild['ModeOfPayment'] = $this->post('modeOfPayment');
|
||||||
|
$detailsChild['CommentsForStudent'] = $this->post('commentsForStudent');
|
||||||
|
$detailsChild['InternalComments'] = $this->post('internalComments');
|
||||||
|
$detailsChild['CreatedBy'] = $this->post('createdBy');
|
||||||
|
$detailsChild['CreatedOn'] = $now->format('Y-m-d H:i:s');
|
||||||
|
$updateDetails = $this->Fees_model->updateFees($details,$detailsChild);// Check if the users data store contains users (in case the database result returns NULL)
|
||||||
|
if ($updateDetails)
|
||||||
|
{
|
||||||
|
$updateDetails['status'] = REST_Controller::HTTP_OK;
|
||||||
|
// Set the response and exit
|
||||||
|
$this->response($updateDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Set the response and exit
|
||||||
|
$this->response([
|
||||||
|
'message' => 'Something went wrong.please try again!',
|
||||||
|
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||||
|
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user