FIX_NONEB_ADD_FROM_LEADS_ISSUE
This commit is contained in:
parent
423f711f97
commit
c1fd55b7be
@ -4083,9 +4083,16 @@ class LeadsController extends BaseController
|
|||||||
|
|
||||||
private function prepareClientPolicyData($data, $client_id, $branch_id)
|
private function prepareClientPolicyData($data, $client_id, $branch_id)
|
||||||
{
|
{
|
||||||
$proposel_data = json_decode($data['proposel_data'], true);
|
$proposel_data = json_decode($data['proposel_data'] ?? '', true) ?? [];
|
||||||
// print_r($proposel_data); die;
|
|
||||||
list($insurer_branch_id, $insurer_id) = explode('-', $proposel_data['insurer'], 2);
|
if ($data['lead_form_type'] == 1) {
|
||||||
|
// EB: insurer stored as "{insurer_branch_id}-{insurer_id}" inside proposel_data
|
||||||
|
list($insurer_branch_id, $insurer_id) = explode('-', $proposel_data['insurer'] ?? '-', 2);
|
||||||
|
} else {
|
||||||
|
// Non-EB: insurer IDs are direct columns on the lead row
|
||||||
|
$insurer_id = $data['insurer_id'] ?? null;
|
||||||
|
$insurer_branch_id = $data['insurer_branch_id'] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
$client_policy_data = [
|
$client_policy_data = [
|
||||||
'client_id' => $client_id,
|
'client_id' => $client_id,
|
||||||
@ -4315,7 +4322,7 @@ class LeadsController extends BaseController
|
|||||||
|
|
||||||
public function getPlacementJson(array $data): ?string
|
public function getPlacementJson(array $data): ?string
|
||||||
{
|
{
|
||||||
$proposel_data = json_decode($data['proposel_data'], true);
|
$proposel_data = json_decode($data['proposel_data'] ?? '', true) ?? [];
|
||||||
|
|
||||||
$QCRData = $this->RFQModel
|
$QCRData = $this->RFQModel
|
||||||
->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user