GWM : set vehicle type api change
This commit is contained in:
parent
bea788ddfb
commit
e0951e184b
@ -799,7 +799,7 @@ class EnquiryController extends ResourceController
|
||||
public function setVehicleTypeToEnquiry()
|
||||
{
|
||||
try {
|
||||
$data = $this->request->getPost();
|
||||
$data = $this->request->getJSON(true);
|
||||
|
||||
if (!isset($data['id'])) {
|
||||
return $this->respond(['status' => 'failed', 'code' => 200, 'error' => 'ID Required'], 200);
|
||||
|
||||
@ -348,9 +348,10 @@ class PolicyController extends ResourceController
|
||||
}
|
||||
|
||||
//fetch enquiry_id & agent_id
|
||||
$quotData = $this->QuotationModel->select('partner_quotation.*,E.agent_id,E.name ')
|
||||
$quotData = $this->QuotationModel->select('partner_quotation.*,E.agent_id,E.name , VT.vehicle_type')
|
||||
->join('partner_enquiry E', 'E.id = partner_quotation.enquiry_id', 'left')
|
||||
->join('partner_agent A', 'A.id = E.agent_id', 'left')
|
||||
->join('vehicle_type VT', 'VT.id = E.vehicle_type_id', 'left')
|
||||
->where('partner_quotation.id',$data['quotation_id'])
|
||||
->first();
|
||||
|
||||
@ -389,6 +390,7 @@ class PolicyController extends ResourceController
|
||||
'insured_name' => $quotData['name'],
|
||||
'manager_id' => $data['manager_id'],
|
||||
'agent_id' => $quotData['agent_id'],
|
||||
'vehicle_type' => $quotData['vehicle_type'],
|
||||
'policy_pdf_file_name' => $pdfFileName,
|
||||
'created_by' => $data['created_by']
|
||||
];
|
||||
@ -585,7 +587,7 @@ class PolicyController extends ResourceController
|
||||
$policyData['make'] = $data['vehicle']['make'] ?? null;
|
||||
$policyData['model'] = $data['vehicle']['model'] ?? null;
|
||||
$policyData['cubic_capacity'] = $data['vehicle']['cubic_capacity'] ?? null;
|
||||
$policyData['vehicle_type'] = $vehicleType;
|
||||
// $policyData['vehicle_type'] = $vehicleType;
|
||||
$policyData['rc_no'] = $data['vehicle']['reg_no'] ?? null;
|
||||
$policyData['insured_name'] = $data['insured']['name'] ?? null;
|
||||
|
||||
@ -1050,7 +1052,7 @@ class PolicyController extends ResourceController
|
||||
$policyData['make'] = $data['vehicle']['make'] ?? null;
|
||||
$policyData['model'] = $data['vehicle']['model'] ?? null;
|
||||
$policyData['cubic_capacity'] = $data['vehicle']['cubic_capacity'] ?? null;
|
||||
$policyData['vehicle_type'] = $vehicleType;
|
||||
// $policyData['vehicle_type'] = $vehicleType;
|
||||
$policyData['rc_no'] = $data['vehicle']['reg_no'] ?? null;
|
||||
$policyData['insured_name'] = $data['insured']['name'] ?? null;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user