GWM : handler can create enquiry and accept the quotation changes in api
This commit is contained in:
parent
59ab5a3aef
commit
8cb3a736c1
@ -185,20 +185,20 @@ class EnquiryController extends ResourceController
|
||||
$previousPolicy->move($uploadPath, $previousPolicyFileName);
|
||||
}
|
||||
|
||||
|
||||
$insertData = [
|
||||
'agent_id' => $data['agent_id'],
|
||||
'name' => $data['name'],
|
||||
'mobile' => $data['mobile'],
|
||||
'email' => $data['email'],
|
||||
'reg_no' => $data['reg_no'],
|
||||
'vehicle_type_id' => $data['vehicle_type_id'],
|
||||
'rc_file_name' => $rcFileName,
|
||||
'id_proof_file_name' => $idProofFileName,
|
||||
'previous_policy_file_name' => $previousPolicyFileName,
|
||||
'remarks' => $data['remarks'],
|
||||
'manager_id' => $data['manager_id'] ,
|
||||
'created_by' => $data['created_by']
|
||||
'agent_id' => $data['agent_id'],
|
||||
'name' => $data['name'],
|
||||
'mobile' => $data['mobile'],
|
||||
'email' => $data['email'],
|
||||
'reg_no' => $data['reg_no'],
|
||||
'vehicle_type_id' => $data['vehicle_type_id'],
|
||||
'rc_file_name' => $rcFileName,
|
||||
'id_proof_file_name' => $idProofFileName,
|
||||
'previous_policy_file_name' => $previousPolicyFileName,
|
||||
'remarks' => $data['remarks'],
|
||||
'manager_id' => $data['manager_id'] ,
|
||||
'created_by' => $data['created_by'],
|
||||
'is_data_created_by_handler' => $data['is_data_created_by_handler'] ?? 0
|
||||
];
|
||||
|
||||
$enquiryId = $this->enquiryModel->insert($insertData , true);
|
||||
|
||||
@ -179,7 +179,7 @@ class QuotationController extends ResourceController
|
||||
|
||||
$newStatus = $data['status'];
|
||||
|
||||
$this->QuotationModel->update($id, ['status' => $newStatus]);
|
||||
$this->QuotationModel->update($id, ['status' => $newStatus, 'action_by' => $data['action_by'], 'action_user' => $data['action_user'],]);
|
||||
|
||||
//update enquiry status
|
||||
$enquiryData = $this->EnquiryModel->where('id',$quotation['enquiry_id'])
|
||||
@ -195,7 +195,7 @@ class QuotationController extends ResourceController
|
||||
$this->QuotationModel
|
||||
->where('enquiry_id', $quotation['enquiry_id'])
|
||||
->where('id !=', $id)
|
||||
->set(['status' => 'Rejected', 'updated_on' => date('Y-m-d H:i:s')])
|
||||
->set(['status' => 'Rejected', 'action_by' => $data['action_by'], 'action_user' => $data['action_user'], 'updated_on' => date('Y-m-d H:i:s')])
|
||||
->update();
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,8 @@ class EnquiryModel extends Model
|
||||
'insurer_id',
|
||||
'insurer_branch_id',
|
||||
'created_by',
|
||||
'updated_by'
|
||||
'updated_by',
|
||||
'is_data_created_by_handler'
|
||||
];
|
||||
|
||||
protected $useTimestamps = true;
|
||||
|
||||
@ -20,7 +20,9 @@ class QuotationModel extends Model
|
||||
'is_active',
|
||||
'manager_id',
|
||||
'created_by',
|
||||
'updated_by'
|
||||
'updated_by',
|
||||
'action_by',
|
||||
'action_user'
|
||||
];
|
||||
protected $useTimestamps = false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user