bds entry
This commit is contained in:
parent
8bcac5d697
commit
c499105297
@ -302,18 +302,22 @@ class PolicyController extends ResourceController
|
||||
|
||||
|
||||
// Call helper to create BDS record after creating client,clientPolicy,vehicle records
|
||||
$policyData = $this->PolicyModel->select('partner_policy.*,Q.insurer_id,Q.insurer_branch_id,E.name as client_name,E.mobile as client_mobile,E.email as client_email,E.reg_no,E.vehicle_type_id,A.id as agent_id,A.agent_code')
|
||||
$policyData = $this->PolicyModel->select('partner_policy.*,Q.insurer_id,Q.insurer_branch_id,E.name as client_name,E.mobile as client_mobile,E.email as client_email,E.reg_no,E.vehicle_type_id,A.id as agent_id,A.agent_code,E.broker_id')
|
||||
->join('partner_quotation Q', 'Q.id = partner_policy.quotation_id AND Q.status = "Accepted"', 'left')
|
||||
->join('partner_enquiry E', 'E.id = partner_policy.enquiry_id', 'left')
|
||||
->join('partner_agent A', 'A.id = partner_policy.agent_id', 'left')
|
||||
->where('partner_policy.id',$id)
|
||||
->first();
|
||||
$bdsLogs = createBDS($policyData, $id);
|
||||
if (!empty($bdsLogs)) {
|
||||
foreach ($bdsLogs as $msg) {
|
||||
log_message('info', '[BDS Entry] ' . $msg);
|
||||
if($policyData['broker_id'] == 1) //only for nhance
|
||||
{
|
||||
$bdsLogs = createBDS($policyData, $id);
|
||||
if (!empty($bdsLogs)) {
|
||||
foreach ($bdsLogs as $msg) {
|
||||
log_message('info', '[BDS Entry] ' . $msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $this->respond(['status' => 'success', 'code' => 200, 'data' => []], 200);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user