From 2547df0a65268fa446b7782d35ce617003cb8e3d Mon Sep 17 00:00:00 2001 From: velz Date: Fri, 11 Jan 2019 17:43:09 +0530 Subject: [PATCH] SAVE COMPANY 2 --- api/application/controllers/PD_Controller.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 3a7a0413..f644ad17 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -2056,7 +2056,7 @@ class PD_Controller extends REST_Controller { { $where_condition_array = array('fk_form_id'=>$formid,'fk_pd_id'=>$pdid,'company_id' => $company_id); } - //$id = $this->PD_Model->updateRecords($fields,PDFORMDETAILSJSON,$where_condition_array); + $id = $this->PD_Model->updateRecords($fields,PDFORMDETAILSJSON,$where_condition_array); /*****Call Form Specific funcitons to convert RAW JSON Data to Processed JSON DATA******/ @@ -2181,8 +2181,8 @@ class PD_Controller extends REST_Controller { { $data['dataStatus'] = true; $data['status'] = REST_Controller::HTTP_OK; - //$data['records'] = json_decode($rec[0]['json']); - $data['records'] = json_decode($rec[0]['processed_json']); + $data['records'] = json_decode($rec[0]['json']); + //$data['records'] = json_decode($rec[0]['processed_json']); $this->response($data,REST_Controller::HTTP_OK); } else @@ -2282,7 +2282,7 @@ class PD_Controller extends REST_Controller { foreach($records['companies'] as $company_key => $company) { // print_r($company); - if($company['is_applicant'] == true && $company['is_new'] == true,) + if($company['is_company_applicant'] == true && $company['is_new'] == true) { $temp_array = array('fk_pd_id'=>$records['pdid'],'applicant_name'=>$company['company_name'],'applicant_type'=>2,'applicant_title_name'=>$company['company_messrs_name']); $new_co_appliacant_id = $this->PD_Model->saveRecords($temp_array,PDAPPLICANTSDETAILS);