variable error : GWM
This commit is contained in:
parent
910f8424e5
commit
05bcd19f13
@ -241,6 +241,7 @@ class PolicyController extends ResourceController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$updateData = [
|
$updateData = [
|
||||||
|
'rc_no' => $data['rc_no'] ?? $policy['rc_no'],
|
||||||
'insured_name' => $data['insured_name'] ?? $policy['insured_name'],
|
'insured_name' => $data['insured_name'] ?? $policy['insured_name'],
|
||||||
'issued_date' => format_date_for_database($data['issued_date']),
|
'issued_date' => format_date_for_database($data['issued_date']),
|
||||||
'start_date' => format_date_for_database($data['start_date']),
|
'start_date' => format_date_for_database($data['start_date']),
|
||||||
@ -272,20 +273,23 @@ class PolicyController extends ResourceController
|
|||||||
'is_data_accuracy_checked'=> 1
|
'is_data_accuracy_checked'=> 1
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
$EnquiryupdateData = [];
|
||||||
|
|
||||||
if (!empty($data['enquiry_broker_id_for_commission'])) {
|
if (!empty($data['enquiry_broker_id_for_commission'])) {
|
||||||
$updateData['broker_id'] = $data['enquiry_broker_id_for_commission'];
|
$EnquiryupdateData['broker_id'] = $data['enquiry_broker_id_for_commission'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($data['enquiry_vehicle_type_id_for_commission'])) {
|
if (!empty($data['enquiry_vehicle_type_id_for_commission'])) {
|
||||||
$updateData['vehicle_type_id'] = $data['enquiry_vehicle_type_id_for_commission'];
|
$EnquiryupdateData['vehicle_type_id'] = $data['enquiry_vehicle_type_id_for_commission'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($data['enquiry_reg_no_for_commission'])) {
|
if (!empty($data['enquiry_reg_no_for_commission'])) {
|
||||||
$updateData['reg_no'] = $data['enquiry_reg_no_for_commission'];
|
$EnquiryupdateData['reg_no'] = $data['enquiry_reg_no_for_commission'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!empty($updateData)) {
|
if (!empty($EnquiryupdateData)) {
|
||||||
$policy = $this->PolicyModel
|
$policy = $this->PolicyModel
|
||||||
->select('enquiry_id')
|
->select('enquiry_id')
|
||||||
->where('id', $id)
|
->where('id', $id)
|
||||||
@ -295,7 +299,7 @@ class PolicyController extends ResourceController
|
|||||||
$db = \Config\Database::connect();
|
$db = \Config\Database::connect();
|
||||||
$db->table('partner_enquiry')
|
$db->table('partner_enquiry')
|
||||||
->where('id', $policy['enquiry_id'])
|
->where('id', $policy['enquiry_id'])
|
||||||
->update($updateData);
|
->update($EnquiryupdateData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ class PolicyModel extends Model
|
|||||||
protected $table = 'partner_policy';
|
protected $table = 'partner_policy';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
|
'rc_no',
|
||||||
'enquiry_id',
|
'enquiry_id',
|
||||||
'quotation_id',
|
'quotation_id',
|
||||||
'insured_name',
|
'insured_name',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user