diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php index 6a958c71..3205553c 100644 --- a/app/Controllers/LeadsController.php +++ b/app/Controllers/LeadsController.php @@ -557,7 +557,7 @@ class LeadsController extends BaseController $data['insurer'] = $this->insurerBranchModel->getInsurerBranchesWithInsurerNames(); $data['userList'] = $this->userModel->getUserListForRFQ(); $data['lead_data'] = $lead_data; - + $mail_content = "
Dear Sir,
Greetings From Nhance India!
@@ -575,46 +575,22 @@ class LeadsController extends BaseController // dd($data); - if ($data['lead_id'] != 75){ + if ($data['lead_data']['lead_form_type'] == 1){ $this->loadLayout('view_rfq.php', $data); - }else{ + + }else if ($data['lead_data']['lead_form_type'] == 2){ - $this->viewNonEBRFQ($id); + $data['policies'] = json_decode($data['question_json'], true)['policies']; + $data["child_table_data"] = json_decode($data['question_json'], true)['child_table_data']; + // dd($data); + $data['client_type'] = $this->clientType; + $this->loadLayout('view_rfq_non_eb', $data); } } - public function viewNonEBRFQ($id){ - - $data['insurer'] = $this->insurerBranchModel->getInsurerBranchesWithInsurerNames(); - $lead_data = $this->leadsModel - ->select(' - leads.*, - policy_type.question_json, - policy_type.policy_type, - policy_type.long_name, - user_profiles.email as created_person_email - ') - ->join('policy_type', 'leads.policy_type_id = policy_type.id') - ->join('user_profiles', 'leads.created_by = user_profiles.id', 'left') - ->where('leads.id', $id) - ->where('leads.is_active', 1) - ->first(); - $data['lead_data'] = $lead_data; - $data['client_type'] = $this->clientType; - - $data['rfq_data'] = $this->RFQModel - ->where('lead_id', $id) - // ->where('type', $type) - ->where('is_active', 1) - ->orderBy('id', 'desc') - ->first(); - - // dd($data); - $this->loadLayout('view_rfq_non_eb', $data); - } public function createRFQ() { diff --git a/app/Views/policyRegisterModel.php b/app/Views/policyRegisterModel.php index 98ab888b..9e440904 100644 --- a/app/Views/policyRegisterModel.php +++ b/app/Views/policyRegisterModel.php @@ -32,6 +32,11 @@