CHANGE_RFQ_CHANGES : RV
This commit is contained in:
parent
467b2197fa
commit
ebd7fe14ce
@ -3839,6 +3839,8 @@ class ClientController extends AdminController
|
||||
continue;
|
||||
}
|
||||
|
||||
// dd($policyTerms);
|
||||
|
||||
$is_addon = $data[$i]['is_addon'];
|
||||
|
||||
$payable_arr = [];
|
||||
@ -3861,7 +3863,7 @@ class ClientController extends AdminController
|
||||
if(in_array($data[$i]['policy_type_id'], [2,3,4,5])){
|
||||
|
||||
// Set default value of copayzonewisecopay to "empty"
|
||||
$ans = isset($policyTerms['copayzonewisecopay']) ? $policyTerms['copayzonewisecopay'] : 'empty';
|
||||
// $ans = isset($policyTerms['copayzonewisecopay']) ? $policyTerms['copayzonewisecopay'] : 'empty';
|
||||
|
||||
// add is_payable_employee for the GMC Policy
|
||||
if (isset($policyTerms['age_ratio'])) {
|
||||
@ -3875,31 +3877,31 @@ class ClientController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
// Add copayzonewisecopay and copayzonewisecopaydata if they exist_
|
||||
if (isset($policyTerms['copayzonewisecopay'])) {
|
||||
// // Add copayzonewisecopay and copayzonewisecopaydata if they exist_
|
||||
// if (isset($policyTerms['copayzonewisecopay'])) {
|
||||
|
||||
if(!isset($policyTerms['co_pay_details'])){
|
||||
// if(!isset($policyTerms['co_pay_details'])){
|
||||
|
||||
$co_pay_details_value = "";
|
||||
if (strtolower($ans) == "nil" || $ans == 0) {
|
||||
$policyTerms['copayzonewisecopay'] = 0;
|
||||
$co_pay_details_value = "";
|
||||
} elseif ($ans != 'empty' && $ans !== 'Nil' && $ans !== null && $ans != '' && $ans != 0) {
|
||||
$policyTerms['copayzonewisecopay'] = 1;
|
||||
$co_pay_details_value = $ans;
|
||||
}
|
||||
// $co_pay_details_value = "";
|
||||
// if (strtolower($ans) == "nil" || $ans == 0) {
|
||||
// $policyTerms['copayzonewisecopay'] = 0;
|
||||
// $co_pay_details_value = "";
|
||||
// } elseif ($ans != 'empty' && $ans !== 'Nil' && $ans !== null && $ans != '' && $ans != 0) {
|
||||
// $policyTerms['copayzonewisecopay'] = 1;
|
||||
// $co_pay_details_value = $ans;
|
||||
// }
|
||||
|
||||
$co_pay_index = array_search('copayzonewisecopay', array_keys($policyTerms));
|
||||
$orderedPolicyTerms[] = [
|
||||
"key" => "co_pay_details",
|
||||
"value" => $co_pay_details_value,
|
||||
"position" => $co_pay_index + 2,
|
||||
];
|
||||
// $co_pay_index = array_search('copayzonewisecopay', array_keys($policyTerms));
|
||||
// $orderedPolicyTerms[] = [
|
||||
// "key" => "co_pay_details",
|
||||
// "value" => $co_pay_details_value,
|
||||
// "position" => $co_pay_index + 2,
|
||||
// ];
|
||||
|
||||
unset($policyTerms['optionalparentalcopay']);
|
||||
// unset($policyTerms['optionalparentalcopay']);
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
|
||||
// Add ailmentcapping and ailmentcappingdata if they exist
|
||||
if (isset($policyTerms['ailmentcapping'])) {
|
||||
@ -3908,7 +3910,7 @@ class ClientController extends AdminController
|
||||
$orderedPolicyTerms[] = [
|
||||
"key" => "ailment_capping_details",
|
||||
"value" => "",
|
||||
"position" => $aliment_index + 3,
|
||||
"position" => $aliment_index + 2,
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -3942,8 +3944,6 @@ class ClientController extends AdminController
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach ($orderedPolicyTerms as $term) {
|
||||
$position = $term['position'];
|
||||
$key = $term['key'];
|
||||
@ -3955,8 +3955,117 @@ class ClientController extends AdminController
|
||||
);
|
||||
}
|
||||
|
||||
if(in_array($data[$i]['policy_type_id'], [2,3,4,5])){
|
||||
|
||||
if (!isset($policyTerms['waiver_of_90_days_waiting_period'])) {
|
||||
$policyTerms['waiver_of_90_days_waiting_period'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['waiver_of_other_waiting_periods'])) {
|
||||
$policyTerms['waiver_of_other_waiting_periods'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['maternity_benefit'])) {
|
||||
$policyTerms['maternity_benefit'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['well_baby_well_mother_expenses'])) {
|
||||
$policyTerms['well_baby_well_mother_expenses'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['icu_limit'])) {
|
||||
$policyTerms['icu_limit'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['infertility_treatment_coverage'])) {
|
||||
$policyTerms['infertility_treatment_coverage'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['mid_term_addition_of_new_born_newly_wedded_spouse'])) {
|
||||
$policyTerms['mid_term_addition_of_new_born_newly_wedded_spouse'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['non_admissible_contingency_corporate_buffer'])) {
|
||||
$policyTerms['non_admissible_contingency_corporate_buffer'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['terrorism'])) {
|
||||
$policyTerms['terrorism'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['widower_cover'])) {
|
||||
$policyTerms['widower_cover'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['breavement_cover'])) {
|
||||
$policyTerms['breavement_cover'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['enrollment_display_key'])) {
|
||||
$policyTerms['enrollment_display_key'] = [];
|
||||
}
|
||||
|
||||
} else if($data[$i]['policy_type_id'] == 1){
|
||||
|
||||
if (!isset($policyTerms['medical_expenses_medical_extension'])) {
|
||||
$policyTerms['medical_expenses_medical_extension'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['opd_treatment_cover'])) {
|
||||
$policyTerms['opd_treatment_cover'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['repatriation_of_mortal_remains'])) {
|
||||
$policyTerms['repatriation_of_mortal_remains'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['family_transportation_benefits'])) {
|
||||
$policyTerms['family_transportation_benefits'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['fractures_dislocation_burns'])) {
|
||||
$policyTerms['fractures_dislocation_burns'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['coma'])) {
|
||||
$policyTerms['coma'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['travel_expenses_for_medical_treatment'])) {
|
||||
$policyTerms['travel_expenses_for_medical_treatment'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['daily_cash_allowance'])) {
|
||||
$policyTerms['daily_cash_allowance'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['artifical_limb_and_prosthesis'])) {
|
||||
$policyTerms['artifical_limb_and_prosthesis'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['air_ambulance'])) {
|
||||
$policyTerms['air_ambulance'] = "";
|
||||
}
|
||||
|
||||
if (!isset($policyTerms['enrollment_display_key'])) {
|
||||
$policyTerms['enrollment_display_key'] = [];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach ($policyTerms as $key => $term) {
|
||||
if ($term == "0") {
|
||||
$policyTerms[$key] = "No"; // Use = for assignment
|
||||
} elseif ($term == "1") {
|
||||
$policyTerms[$key] = "Yes"; // Use = for assignment
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// dd($policyTerms);
|
||||
// Re-encode the ordered policy terms
|
||||
$updatedPolicyTerms = json_encode($policyTerms);
|
||||
// dd($updatedPolicyTerms);
|
||||
|
||||
// dd($orderedPolicyTerms, $updatedPolicyTerms);
|
||||
$this->clientPolicyModel->update($data[$i]['id'], ['policy_terms' => $updatedPolicyTerms]);
|
||||
@ -3997,9 +4106,9 @@ class ClientController extends AdminController
|
||||
|
||||
$employeeRestController = new EmployeeServiceController();
|
||||
// $employeeRestController->excelFileDataValidation(['file_id' => 823]);
|
||||
// $employeeRestController->employeesOnboardPreprocess(['file_id' => 835]);
|
||||
// $employeeRestController->employeesOnboardPreprocess(['file_id' => 644]);
|
||||
// $employeeRestController->employeesOnboardProcess(['file_id' => 835]);
|
||||
$employeeRestController->employeesEnrollmentInsert(['file_id' => 836]);
|
||||
// $employeeRestController->employeesEnrollmentInsert(['file_id' => 836]);
|
||||
// $r = Jobs::addJob(['job_name' => 'employeesEnrollmentInsert','payload' => ['file_id' => 721]]);
|
||||
|
||||
|
||||
|
||||
@ -975,7 +975,7 @@ class EmpDataServiceController extends BaseController
|
||||
$balance = $this->CDMasterModel
|
||||
->where('client_id', $export_data['client_id'])
|
||||
->where('insurer_id', $policy_details['insurer_id'])
|
||||
->where('cd_ac_no', $policy_details['cd_ac_no'])
|
||||
->where('id', $policy_details['cd_ac_pk'])
|
||||
->first();
|
||||
|
||||
$cash_balance['balance'] = $balance['opening_bal'];
|
||||
|
||||
@ -1642,7 +1642,7 @@ class LeadsController extends BaseController
|
||||
}
|
||||
|
||||
// dd($lead_data);
|
||||
$reply_to = $lead_data['created_person_email'];
|
||||
$reply_to = $lead_data['created_person_email'] ?? "";
|
||||
|
||||
//get file path to attach
|
||||
$file_info = $this->constructExcelToSaveTemp($lead_id, ($file_type == 'rfq' ? 1 : 2), $propsal_and_insurer);
|
||||
@ -1661,9 +1661,10 @@ class LeadsController extends BaseController
|
||||
// print_rr($result);
|
||||
}
|
||||
}else{
|
||||
return $this->respond(['status' => 'fail', 'code' => 200, 'messgae' => 'File Not Found'], 200);
|
||||
$result = $file_info['filePath'];
|
||||
// return $this->respond(['status' => 'fail', 'code' => 200, 'messgae' => 'File Not Found'], 200);
|
||||
}
|
||||
// print_rr($lead_data);
|
||||
// print_rr($result); die;
|
||||
// print_rr($file_info);
|
||||
// $file_path = WRITEPATH."uploads/excel/sample/correction.xls";
|
||||
// $file_name = $file_type.'.xlsx';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user