From 8bf186f90cf7f5b03db35bc6bb12f7b5a01f8e47 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Sat, 20 Sep 2025 14:57:20 +0530 Subject: [PATCH] GWM : qut join with master --- app/Controllers/EnquiryController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Controllers/EnquiryController.php b/app/Controllers/EnquiryController.php index fa04e36..8f9b1c4 100644 --- a/app/Controllers/EnquiryController.php +++ b/app/Controllers/EnquiryController.php @@ -75,7 +75,14 @@ class EnquiryController extends ResourceController } //Get related quotations - $quotations = $this->QuotationModel->where('enquiry_id', $enquiry_id)->where('is_active', 1)->orderBy('id', 'DESC')->findAll(); + $quotations = $this->QuotationModel->select('partner_quotation.*, pe.reg_no , I.name as insurer_name, ipti.insurance_plan_type' ) + ->join('partner_enquiry pe', 'pe.id = partner_quotation.enquiry_id', 'left') + ->join('insurers I', 'I.id = pe.insurer_id', 'left') + ->join('partner_insurance_plan_type_master ipti', 'ipti.id = partner_quotation.insurance_plan_type_id', 'left') + ->where('partner_quotation.enquiry_id', $enquiry_id) + ->where('partner_quotation.is_active', 1) + ->orderBy('partner_quotation.id', 'DESC') + ->findAll(); //Get related policies $policies = [];