FIX_CLAIM_DUMP_BUGS : RV
This commit is contained in:
parent
356a379890
commit
6c8cbbdf81
@ -1206,6 +1206,7 @@ class TicketServiceController extends BaseController
|
|||||||
|
|
||||||
//excel file Account Manager Details like Name and Mobile Number
|
//excel file Account Manager Details like Name and Mobile Number
|
||||||
$excel_acm_data = $row[$acm_column_index] ?? null;
|
$excel_acm_data = $row[$acm_column_index] ?? null;
|
||||||
|
// var_dump($excel_acm_data); die;
|
||||||
|
|
||||||
$acm_name = null;
|
$acm_name = null;
|
||||||
$acm_mobile = null;
|
$acm_mobile = null;
|
||||||
@ -1217,6 +1218,8 @@ class TicketServiceController extends BaseController
|
|||||||
$acm_mobile = $parts[1] ?? null;
|
$acm_mobile = $parts[1] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// dd($acm_name, $acm_mobile);
|
||||||
|
|
||||||
$params = [
|
$params = [
|
||||||
'client_name' => $row[$client_column_index] ?? null,
|
'client_name' => $row[$client_column_index] ?? null,
|
||||||
'policy_no' => $row[$policy_no_column_index] ?? null,
|
'policy_no' => $row[$policy_no_column_index] ?? null,
|
||||||
@ -1274,7 +1277,7 @@ class TicketServiceController extends BaseController
|
|||||||
// dd($acm_data);
|
// dd($acm_data);
|
||||||
if (count($acm_data) == 0) {
|
if (count($acm_data) == 0) {
|
||||||
array_push($result['error_summary'], 10);
|
array_push($result['error_summary'], 10);
|
||||||
$result['error_data'][$row_key][$acm_column_index]['col_name'] = $columns_to_check['employee_name']['col_name']; //push column name
|
$result['error_data'][$row_key][$acm_column_index]['col_name'] = $columns_to_check['acm']['col_name']; //push column name
|
||||||
$result['error_data'][$row_key][$acm_column_index]['col_idx'] = $acm_column_index; //push column index
|
$result['error_data'][$row_key][$acm_column_index]['col_idx'] = $acm_column_index; //push column index
|
||||||
$result['error_data'][$row_key][$acm_column_index]['error'][] = "This Acount Manager not exist in the system";
|
$result['error_data'][$row_key][$acm_column_index]['error'][] = "This Acount Manager not exist in the system";
|
||||||
}
|
}
|
||||||
@ -1455,7 +1458,8 @@ class TicketServiceController extends BaseController
|
|||||||
$header_with_column_index = $this->getTheColumnIndex($excel_data[0], $this->actualHeaders, $returnType);
|
$header_with_column_index = $this->getTheColumnIndex($excel_data[0], $this->actualHeaders, $returnType);
|
||||||
|
|
||||||
//Sanitize the excel data
|
//Sanitize the excel data
|
||||||
// $excel_data = ExcelSanitizeHelper::sanitizeArrayData($excel_data);
|
$excel_data = ExcelSanitizeHelper::sanitizeArrayData($excel_data);
|
||||||
|
// dd($excel_data);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'claim_dump_excel_columns' => $header_with_column_index,
|
'claim_dump_excel_columns' => $header_with_column_index,
|
||||||
@ -1500,6 +1504,7 @@ class TicketServiceController extends BaseController
|
|||||||
|
|
||||||
private function constructClaimData($excel_data, $db_data, $columns_to_check)
|
private function constructClaimData($excel_data, $db_data, $columns_to_check)
|
||||||
{
|
{
|
||||||
|
// dd($db_data);
|
||||||
$client_column_index = $columns_to_check['corporate']['col_idx'];
|
$client_column_index = $columns_to_check['corporate']['col_idx'];
|
||||||
$policy_no_column_index = $columns_to_check['policy_no']['col_idx'];
|
$policy_no_column_index = $columns_to_check['policy_no']['col_idx'];
|
||||||
$insurer_column_index = $columns_to_check['insurer']['col_idx'];
|
$insurer_column_index = $columns_to_check['insurer']['col_idx'];
|
||||||
@ -1591,15 +1596,18 @@ class TicketServiceController extends BaseController
|
|||||||
|
|
||||||
//get the acountmanager data
|
//get the acountmanager data
|
||||||
$acm_data = $ticketMasterModal->getAcmUserDetails($params) ?? [];
|
$acm_data = $ticketMasterModal->getAcmUserDetails($params) ?? [];
|
||||||
|
// dd($acm_data);
|
||||||
|
|
||||||
//get the claim status id from the database
|
//get the claim status id from the database
|
||||||
$claim_status_data = $this->ticketClaimStatusModel
|
$claim_status_data = $this->ticketClaimStatusModel
|
||||||
->select('id, claim_status')
|
->select('id, claim_status, ticket_type')
|
||||||
->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
->where('ticket_type', $db_data['ticket_type_id'])
|
->where('ticket_type', $db_data['ticket_type_id'])
|
||||||
->where('LOWER(claim_status)', strtolower($excel_status_data))
|
->where('LOWER(claim_status)', strtolower($excel_status_data))
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
|
// dd($claim_status_data);
|
||||||
|
|
||||||
$claim_status_id = $claim_status_data['id'] ?? null;
|
$claim_status_id = $claim_status_data['id'] ?? null;
|
||||||
|
|
||||||
//initialize Ticket controller for the other data
|
//initialize Ticket controller for the other data
|
||||||
@ -1618,9 +1626,10 @@ class TicketServiceController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$db_data['insured_name'] = $db_data['insured_emp_id'] ?? null;
|
$db_data['insured_name'] = $excel_data[$insured_name_column_index] ?? null;
|
||||||
//get Insured emp name and Insured emp id
|
//get Insured emp name and Insured emp id
|
||||||
$insured_data = $ticketMasterModal->getInsuredDetails($db_data);
|
$insured_data = $ticketMasterModal->getInsuredDetails($db_data);
|
||||||
|
// dd($insured_data);
|
||||||
|
|
||||||
//handle remarks based on the status
|
//handle remarks based on the status
|
||||||
$return_remarks = null;
|
$return_remarks = null;
|
||||||
@ -1655,7 +1664,7 @@ class TicketServiceController extends BaseController
|
|||||||
'claim_type' => $cliam_type_id ?? null,
|
'claim_type' => $cliam_type_id ?? null,
|
||||||
|
|
||||||
'insured_emp_id' => $insured_data['emp_id'] ?? null,
|
'insured_emp_id' => $insured_data['emp_id'] ?? null,
|
||||||
'insured_name' => $insured_data['name'] ?? $db_data['insured_emp_id'] ?? null,
|
'insured_name' => $insured_data['name'] ?? $excel_data[$insured_name_column_index] ?? null,
|
||||||
|
|
||||||
'hospital_name' => $excel_hospital_data ?? null,
|
'hospital_name' => $excel_hospital_data ?? null,
|
||||||
'claim_amount' => $excel_claim_amount_data ?? null,
|
'claim_amount' => $excel_claim_amount_data ?? null,
|
||||||
@ -1693,6 +1702,7 @@ class TicketServiceController extends BaseController
|
|||||||
'approved_description' => null
|
'approved_description' => null
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// dd($ticketMaster);
|
||||||
return $ticketMaster;
|
return $ticketMaster;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1059,10 +1059,10 @@ class TicketMasterModel extends Model
|
|||||||
$relationship = $params['relationship'] ?? null;
|
$relationship = $params['relationship'] ?? null;
|
||||||
$insured_name = $params['insured_name'] ?? null;
|
$insured_name = $params['insured_name'] ?? null;
|
||||||
|
|
||||||
$client_name = "6-Eleven";
|
// $client_name = "6-Eleven";
|
||||||
$emp_code = "EMP0020K12";
|
// $emp_code = "EMP0020K12";
|
||||||
$emp_name = "Lokesh";
|
// $emp_name = "Lokesh";
|
||||||
$policy_no = "GMC-1999/2000/2021/2022";
|
// $policy_no = "GMC-1999/2000/2021/2022";
|
||||||
|
|
||||||
|
|
||||||
$builder = $this->db->table('employees e');
|
$builder = $this->db->table('employees e');
|
||||||
@ -1106,7 +1106,7 @@ class TicketMasterModel extends Model
|
|||||||
$builder->where('LOWER(e.relationship)', strtolower('self'));
|
$builder->where('LOWER(e.relationship)', strtolower('self'));
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
$result = $query->getResultArray();
|
$result = $query->getRowArray();
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@ -1123,7 +1123,7 @@ class TicketMasterModel extends Model
|
|||||||
$builder->where('user_profiles.is_active', 1);
|
$builder->where('user_profiles.is_active', 1);
|
||||||
$builder->where('user_profiles.mobile', trim($acm_mobile));
|
$builder->where('user_profiles.mobile', trim($acm_mobile));
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
$result = $query->getResultArray();
|
$result = $query->getRowArray();
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@ -1161,8 +1161,8 @@ class TicketMasterModel extends Model
|
|||||||
$builder->where('ep.client_policy_id', trim($policy_id));
|
$builder->where('ep.client_policy_id', trim($policy_id));
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
$result = $query->getResultArray();
|
$result = $query->getRowArray();
|
||||||
|
// dd($this->db->getLastQuery());
|
||||||
return $result;
|
return $result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user