diff --git a/app/Controllers/PolicyController.php b/app/Controllers/PolicyController.php index 0aa9c89..54b17e0 100644 --- a/app/Controllers/PolicyController.php +++ b/app/Controllers/PolicyController.php @@ -303,6 +303,26 @@ class PolicyController extends ResourceController } } + $partnerQuotationUpdateData = []; + + if (!empty($data['insurance_plan_type'])) { + $partnerQuotationUpdateData['insurance_plan_type'] = $data['insurance_plan_type']; + } + + if (!empty($partnerQuotationUpdateData)) { + $pq = $this->QuotationModel + ->select('id') + ->where('enquiry_id', $id) + ->where('status',"Accepted") + ->first(); + + if (!empty($pq['id'])) { + $db = \Config\Database::connect(); + $db->table('partner_quotation') + ->where('id', $pq['id']) + ->update($partnerQuotationUpdateData); + } + } $uploadPath = WRITEPATH . 'uploads/policy/';