From daabec87ed78385498aca4a3702458a2f0f26383 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Tue, 2 Dec 2025 14:52:47 +0530 Subject: [PATCH] GWM : enquiryAssignUpdate --- app/Controllers/EnquiryController.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/app/Controllers/EnquiryController.php b/app/Controllers/EnquiryController.php index 80fb867..e621aeb 100644 --- a/app/Controllers/EnquiryController.php +++ b/app/Controllers/EnquiryController.php @@ -459,15 +459,9 @@ class EnquiryController extends ResourceController return $this->respond(['status' => 'failed', 'code' => 200, 'error' => 'Data Not Found'], 200); } - //get insurer_branch_id - $query = $this->db->query("SELECT id FROM insurer_branch WHERE insurer_id = ? LIMIT 1", [$data['insurer_id']]); - $insurerBranchresult = $query->getRowArray(); $updateData = [ - 'assigned_to' => $data['assigned_to'], - 'insurer_id' => $data['insurer_id'], - 'insurer_branch_id'=> $insurerBranchresult['id'] ?? 0, - 'broker_id' => $data['broker_id'] ?? 1, + 'assigned_to' => $data['assigned_to'] ]; $this->enquiryModel->update($id, $updateData); @@ -475,9 +469,6 @@ class EnquiryController extends ResourceController // trigger_email('enquiry_assigned', ['enquiry_id' => $id]); return $this->respond(['status' => 'success', 'code' => 200, 'message' => 'Enquiry updated successfully'], 200); - - - return $this->respond(['status' => 'success', 'code' => 200, 'data' => $data], 200); } catch (\Exception $e) { return $this->respond(['status' => 'failed', 'code' => 500, 'error' => $e->getMessage()], 500);