FIX_ADD_DAY_ISSUE : RV

This commit is contained in:
VENKATESHWARAN 2025-03-04 11:22:50 +05:30
parent bcd59e36ad
commit bbe67603e3

View File

@ -1123,20 +1123,27 @@ if (!function_exists('premium_calculation_manager'))
return false;
}
$temp_slab_rates = $slab_details[ $slab_index ]['slab_rates'];
//if curent action is dependent addition OR addition then pull insurer master to set whether add one day from employee date of coverage
if($emp_data['temp']['action'] == 'DA' || $emp_data['temp']['action'] == 'A')
{
$insurer = new InsurerModel();
$insurer = ($insurer->find($policy_terms['insurer_id']));
if($insurer['addition_add_day'] == true)
{
// $emp_data['policy_details']['date_coverage'] = (new DateTime($emp_data['policy_details']['date_coverage']))->modify('+1 day')->format('Y-m-d');
$emp_data['policy_details']['date_coverage'] = isset($emp_data['policy_details']['date_coverage']) && $emp_data['policy_details']['date_coverage'] != '' && $emp_data['policy_details']['date_coverage'] != null ?
(new DateTime($emp_data['policy_details']['date_coverage']))->modify('+1 day')->format('Y-m-d') : null ;
}
}
// ------------"THIS PART HAS NO INSURER IN THE PRE-ENROLL, SO COMMENT OUT THIS PART (04-03-2025)."-------------------------------------------------------------------------------------------------------------------
// //if curent action is dependent addition OR addition then pull insurer master to set whether add one day from employee date of coverage
// if($emp_data['temp']['action'] == 'DA' || $emp_data['temp']['action'] == 'A')
// {
// $insurer = new InsurerModel();
// $insurer = ($insurer->find($policy_terms['insurer_id']));
// if($insurer['addition_add_day'] == true)
// {
// // $emp_data['policy_details']['date_coverage'] = (new DateTime($emp_data['policy_details']['date_coverage']))->modify('+1 day')->format('Y-m-d');
// $emp_data['policy_details']['date_coverage'] = isset($emp_data['policy_details']['date_coverage']) && $emp_data['policy_details']['date_coverage'] != '' && $emp_data['policy_details']['date_coverage'] != null ?
// (new DateTime($emp_data['policy_details']['date_coverage']))->modify('+1 day')->format('Y-m-d') : null ;
// }
// }
// -------------------------------------------------------------------------------------------------------------------------------
// dd($emp_data);
$is_match_found = false;
$gst = isset($policy_terms['gst']) && $policy_terms['gst'] != 0 ? $policy_terms['gst'] : 18;