diff --git a/app/Controllers/EnquiryController.php b/app/Controllers/EnquiryController.php index 49d34ca..2576b83 100644 --- a/app/Controllers/EnquiryController.php +++ b/app/Controllers/EnquiryController.php @@ -502,6 +502,11 @@ class EnquiryController extends ResourceController $updateData['assigned_to'] = $data['assigned_to']; + $updateData['insurer_id'] = $data['insurer_id']; + $updateData['broker_id'] = $data['broker_id']; + if (isset($data['from_dashboard_enquiry_status']) && $data['from_dashboard_enquiry_status'] === 'Assigned') { + $updateData['enquiry_status'] = 'Assigned'; + } if($enquiry['assigned_to'] != 0 && $enquiry['enquiry_status'] == 'To be assigned'){ $updateData['enquiry_status'] = 'Assigned'; diff --git a/app/Controllers/MasterController.php b/app/Controllers/MasterController.php index 242de8f..ae1a388 100644 --- a/app/Controllers/MasterController.php +++ b/app/Controllers/MasterController.php @@ -146,7 +146,7 @@ class MasterController extends ResourceController // Duplicate check (case-insensitive) $exists = $this->VehicleTypeMasterModel ->where('LOWER(vehicle_type)', strtolower($input['vehicle_type'])) - ->where('is_active', 1) + // ->where('is_active', 1) ->first(); if ($exists) { @@ -182,7 +182,7 @@ class MasterController extends ResourceController $checkDuplicate = $this->VehicleTypeMasterModel ->where('LOWER(vehicle_type)', strtolower($input['vehicle_type'])) ->where('id !=', $id) - ->where('is_active', 1) + // ->where('is_active', 1) ->first(); if ($checkDuplicate) { @@ -255,7 +255,7 @@ class MasterController extends ResourceController // Duplicate check (case-insensitive) $exists = $this->PartnerBrokerModel ->where('LOWER(name)', strtolower($input['name'])) - ->where('is_active', 1) + // ->where('is_active', 1) ->first(); if ($exists) { @@ -292,7 +292,7 @@ class MasterController extends ResourceController $checkDuplicate = $this->PartnerBrokerModel ->where('LOWER(name)', strtolower($input['name'])) ->where('id !=', $id) - ->where('is_active', 1) + // ->where('is_active', 1) ->first(); if ($checkDuplicate) { @@ -366,7 +366,7 @@ class MasterController extends ResourceController // Duplicate check (case-insensitive) $exists = $this->PaymentModeModel ->where('LOWER(value)', strtolower($input['value'])) - ->where('is_active', 1) + // ->where('is_active', 1) ->first(); if ($exists) { @@ -402,7 +402,7 @@ class MasterController extends ResourceController $checkDuplicate = $this->PaymentModeModel ->where('LOWER(value)', strtolower($input['value'])) ->where('id !=', $id) - ->where('is_active', 1) + // ->where('is_active', 1) ->first(); if ($checkDuplicate) { @@ -492,7 +492,7 @@ class MasterController extends ResourceController // Duplicate check (Case-insensitive) on endorsement_type $exists = $this->EndorsementTypeModel ->where('LOWER(endorsement_type)', strtolower($input['endorsement_type'])) - ->where('is_active', 1) + // ->where('is_active', 1) ->first(); if ($exists) { @@ -530,7 +530,7 @@ class MasterController extends ResourceController $checkDuplicate = $this->EndorsementTypeModel ->where('LOWER(endorsement_type)', strtolower($input['endorsement_type'])) ->where('id !=', $id) - ->where('is_active', 1) + // ->where('is_active', 1) ->first(); if ($checkDuplicate) {