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_acm_data = $row[$acm_column_index] ?? null;
|
||||
// var_dump($excel_acm_data); die;
|
||||
|
||||
$acm_name = null;
|
||||
$acm_mobile = null;
|
||||
@ -1217,6 +1218,8 @@ class TicketServiceController extends BaseController
|
||||
$acm_mobile = $parts[1] ?? null;
|
||||
}
|
||||
|
||||
// dd($acm_name, $acm_mobile);
|
||||
|
||||
$params = [
|
||||
'client_name' => $row[$client_column_index] ?? null,
|
||||
'policy_no' => $row[$policy_no_column_index] ?? null,
|
||||
@ -1274,7 +1277,7 @@ class TicketServiceController extends BaseController
|
||||
// dd($acm_data);
|
||||
if (count($acm_data) == 0) {
|
||||
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]['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);
|
||||
|
||||
//Sanitize the excel data
|
||||
// $excel_data = ExcelSanitizeHelper::sanitizeArrayData($excel_data);
|
||||
$excel_data = ExcelSanitizeHelper::sanitizeArrayData($excel_data);
|
||||
// dd($excel_data);
|
||||
|
||||
$data = [
|
||||
'claim_dump_excel_columns' => $header_with_column_index,
|
||||
@ -1499,7 +1503,8 @@ class TicketServiceController extends BaseController
|
||||
}
|
||||
|
||||
private function constructClaimData($excel_data, $db_data, $columns_to_check)
|
||||
{
|
||||
{
|
||||
// dd($db_data);
|
||||
$client_column_index = $columns_to_check['corporate']['col_idx'];
|
||||
$policy_no_column_index = $columns_to_check['policy_no']['col_idx'];
|
||||
$insurer_column_index = $columns_to_check['insurer']['col_idx'];
|
||||
@ -1591,15 +1596,18 @@ class TicketServiceController extends BaseController
|
||||
|
||||
//get the acountmanager data
|
||||
$acm_data = $ticketMasterModal->getAcmUserDetails($params) ?? [];
|
||||
// dd($acm_data);
|
||||
|
||||
//get the claim status id from the database
|
||||
$claim_status_data = $this->ticketClaimStatusModel
|
||||
->select('id, claim_status')
|
||||
->select('id, claim_status, ticket_type')
|
||||
->where('is_active', 1)
|
||||
->where('ticket_type', $db_data['ticket_type_id'])
|
||||
->where('LOWER(claim_status)', strtolower($excel_status_data))
|
||||
->first();
|
||||
|
||||
// dd($claim_status_data);
|
||||
|
||||
$claim_status_id = $claim_status_data['id'] ?? null;
|
||||
|
||||
//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
|
||||
$insured_data = $ticketMasterModal->getInsuredDetails($db_data);
|
||||
// dd($insured_data);
|
||||
|
||||
//handle remarks based on the status
|
||||
$return_remarks = null;
|
||||
@ -1655,7 +1664,7 @@ class TicketServiceController extends BaseController
|
||||
'claim_type' => $cliam_type_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,
|
||||
'claim_amount' => $excel_claim_amount_data ?? null,
|
||||
@ -1693,6 +1702,7 @@ class TicketServiceController extends BaseController
|
||||
'approved_description' => null
|
||||
];
|
||||
|
||||
// dd($ticketMaster);
|
||||
return $ticketMaster;
|
||||
}
|
||||
|
||||
|
||||
@ -1059,10 +1059,10 @@ class TicketMasterModel extends Model
|
||||
$relationship = $params['relationship'] ?? null;
|
||||
$insured_name = $params['insured_name'] ?? null;
|
||||
|
||||
$client_name = "6-Eleven";
|
||||
$emp_code = "EMP0020K12";
|
||||
$emp_name = "Lokesh";
|
||||
$policy_no = "GMC-1999/2000/2021/2022";
|
||||
// $client_name = "6-Eleven";
|
||||
// $emp_code = "EMP0020K12";
|
||||
// $emp_name = "Lokesh";
|
||||
// $policy_no = "GMC-1999/2000/2021/2022";
|
||||
|
||||
|
||||
$builder = $this->db->table('employees e');
|
||||
@ -1106,7 +1106,7 @@ class TicketMasterModel extends Model
|
||||
$builder->where('LOWER(e.relationship)', strtolower('self'));
|
||||
|
||||
$query = $builder->get();
|
||||
$result = $query->getResultArray();
|
||||
$result = $query->getRowArray();
|
||||
|
||||
return $result;
|
||||
}
|
||||
@ -1123,7 +1123,7 @@ class TicketMasterModel extends Model
|
||||
$builder->where('user_profiles.is_active', 1);
|
||||
$builder->where('user_profiles.mobile', trim($acm_mobile));
|
||||
$query = $builder->get();
|
||||
$result = $query->getResultArray();
|
||||
$result = $query->getRowArray();
|
||||
|
||||
return $result;
|
||||
}
|
||||
@ -1161,8 +1161,8 @@ class TicketMasterModel extends Model
|
||||
$builder->where('ep.client_policy_id', trim($policy_id));
|
||||
|
||||
$query = $builder->get();
|
||||
$result = $query->getResultArray();
|
||||
|
||||
$result = $query->getRowArray();
|
||||
// dd($this->db->getLastQuery());
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user