GWM : qut join with master

This commit is contained in:
Gowtham M 2025-09-20 14:57:20 +05:30
parent 8cd23a739b
commit 8bf186f90c

View File

@ -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 = [];