diff --git a/app/Controllers/EmployeeServiceController.php b/app/Controllers/EmployeeServiceController.php index 035fbd37..9917796f 100755 --- a/app/Controllers/EmployeeServiceController.php +++ b/app/Controllers/EmployeeServiceController.php @@ -1035,6 +1035,14 @@ class EmployeeServiceController extends AdminController // kint::dump($family); $family = data_group_by_family($family)[ $emp_id ];// reason to call this again bring self to first index of the array } + $firstNonTemp = null; + + foreach ($family as $fam) { + if (!isset($fam['temp'])) { + $firstNonTemp = $fam; + break; + } + } // kint::dump($family);//die(); //check name dup within a family @@ -1070,7 +1078,7 @@ class EmployeeServiceController extends AdminController if(!count($self_details)) { array_push($result['error_summary'],14); // Self not found - $result['error_data'][ $family[0][0] ]['sno']['error'][] = "Self not found in Database"; + $result['error_data'][ $firstNonTemp[0] ]['sno']['error'][] = "Self not found in Database"; } } @@ -1078,7 +1086,7 @@ class EmployeeServiceController extends AdminController if($file['action'] == 'dependent_addition' || $file['action'] == 'addition' || $file['action'] == 'inception'|| $file['action'] == 'missed_inception' || $file['action'] == 'enrollment') { $res = check_dependent_conflict($family,$policy_terms,$file['action'],$is_lgbtq); - // dd($res); + // Kint::dump($res); if(!$res['status']) { foreach($res['error_data'] as $key => $value) @@ -1091,7 +1099,7 @@ class EmployeeServiceController extends AdminController //check dup with empid and name with db $res = name_and_empid_check_in_db($family,$file); - // dd($res); + // Kint::dump($res['del']); // echo '
'; // print_r($res); if(count($res['del'])) @@ -1113,7 +1121,7 @@ class EmployeeServiceController extends AdminController }// end of foreach }// end of if current action I,DA,A - // return $result; + // return $result; // die(); if(isset($result['error_summary']) && count($result['error_summary'])) { diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php index 79ca3591..3e430d76 100644 --- a/app/Controllers/LeadsController.php +++ b/app/Controllers/LeadsController.php @@ -3077,6 +3077,7 @@ class LeadsController extends BaseController 3 => 'rfq/gmc', 4 => 'rfq/gmc', 5 => 'rfq/gmc', + 17=> 'rfq/burglary', 22 => 'rfq/car', 23 => 'rfq/cpm', 24 => 'rfq/cyber_crime', diff --git a/app/Helpers/excel_util_helper.php b/app/Helpers/excel_util_helper.php index c13ab491..d2e30828 100755 --- a/app/Helpers/excel_util_helper.php +++ b/app/Helpers/excel_util_helper.php @@ -440,8 +440,20 @@ if (!function_exists('name_dup_check_within_family')) foreach ($family_data as $rkey => $row) { if(in_array($row[2],$temp)) - { - array_push($result,$row[0]); + { + // Kint::dump($row); + $emp_code = $row[1]; + $tempFam = null; + foreach ($family_data as $family) { + if ($family[1] == $emp_code &&!isset($family['temp'])) { + $tempFam = $family; + break; // Stop at the first match + } + } + // Kint::dump($tempFam); + // die(); + + array_push($result,$tempFam[0]); } else { @@ -449,7 +461,7 @@ if (!function_exists('name_dup_check_within_family')) } } - + // dd($result); return $result; } } @@ -519,7 +531,15 @@ if (!function_exists('name_and_empid_check_in_db')) } if(($current_action == 'inception' || $current_action == 'dependent_addition' || $current_action == 'addition' || $current_action == 'enrollment') && count($res)) { - array_push($result['i'],$row[0]); + $emp_code = $row[1]; + $tempFam = null; + foreach ($family_data as $family) { + if ($family[1] == $emp_code &&!isset($family['temp'])) { + $tempFam = $family; + break; // Stop at the first match + } + } + array_push($result['i'],$tempFam[0]); } } diff --git a/app/Views/leads_non_eb.php b/app/Views/leads_non_eb.php index fef3f394..ea8761d4 100644 --- a/app/Views/leads_non_eb.php +++ b/app/Views/leads_non_eb.php @@ -242,33 +242,33 @@ hr.solid { -
+ + -
+
diff --git a/app/Views/policyRegisterModel.php b/app/Views/policyRegisterModel.php index 4e2419d9..4eb2c08f 100644 --- a/app/Views/policyRegisterModel.php +++ b/app/Views/policyRegisterModel.php @@ -166,7 +166,21 @@ + + + + + + + + + + + + + +
@@ -358,7 +372,7 @@ $("#policyRiskSplitUpForm").submit(function(event) { event.preventDefault(); - + var isValid = $('#policyRiskSplitUpForm').parsley().validate(); // console.log('isValid', isValid); @@ -403,25 +417,25 @@ let rawMaterial = [...document.querySelectorAll('[id^="rawMaterial_"]')].map(el => Number(el.value) || 0); let findMaterial = [...document.querySelectorAll('[id^="finishedStock_"]')].map(el => Number(el.value) || 0); - totalSI = InProcess.reduce((acc, val) => acc + val, 0) + - rawMaterial.reduce((acc, val) => acc + val, 0) + - findMaterial.reduce((acc, val) => acc + val, 0); + totalSI = InProcess.reduce((acc, val) => acc + val, 0) + + rawMaterial.reduce((acc, val) => acc + val, 0) + + findMaterial.reduce((acc, val) => acc + val, 0); let allowedSI = Number($("#policySI").val()) || 0; - if (totalSI > allowedSI) { + if (totalSI != allowedSI) { toastr.error("Sum Insured Exceeds Allowed Limit", "ERROR"); - return false; + return false; } // console.log("Total SI: ", totalSI); - }else{ + } else { let InProcess = [...document.querySelectorAll('[id^="stockInProcess_"]')].map(el => Number(el.value) || 0); let rawMaterial = [...document.querySelectorAll('[id^="rawMaterial_"]')].map(el => Number(el.value) || 0); let findMaterial = [...document.querySelectorAll('[id^="finishedStock_"]')].map(el => Number(el.value) || 0); - totalSI = InProcess.reduce((acc, val) => acc + val, 0) + - rawMaterial.reduce((acc, val) => acc + val, 0) + - findMaterial.reduce((acc, val) => acc + val, 0); + totalSI = InProcess.reduce((acc, val) => acc + val, 0) + + rawMaterial.reduce((acc, val) => acc + val, 0) + + findMaterial.reduce((acc, val) => acc + val, 0); } } @@ -465,6 +479,7 @@ // console.log("Grouped Data as Objects: ", policyRiskSplitUpData); savePolicyDataLocal(); + }); @@ -678,7 +693,7 @@
- +
@@ -790,11 +805,11 @@
- +
- + > + +
+
+ > + +
+
+ > + +
+ + + +
+ + +
+ + diff --git a/app/Views/rfq/money.php b/app/Views/rfq/money.php index bf8c1bca..e010d772 100644 --- a/app/Views/rfq/money.php +++ b/app/Views/rfq/money.php @@ -2,7 +2,7 @@
-
+
diff --git a/app/Views/view_rfq_non_eb.php b/app/Views/view_rfq_non_eb.php index 364f2d34..fc6193a6 100644 --- a/app/Views/view_rfq_non_eb.php +++ b/app/Views/view_rfq_non_eb.php @@ -536,7 +536,7 @@ // alert(rollover_or_renewal); var policyConfig = { - 1: ['Quote asked'] + 1: ['Sum Insured'] }; let myModal; @@ -634,7 +634,7 @@ let proposalCount = 1; // // console.log("Proposal count changed", proposalCount); let quotesConfig = { - 1: ['Quote asked'] + 1: ['Sum Insured'] }; // Stores quote columns for each proposal @@ -1002,8 +1002,8 @@ proposalCount++; // // console.log("proposal count after ", proposalCount); - quotesConfig[proposalCount] = ['Quote asked']; - policyConfig[proposalCount] = ['Quote asked']; + quotesConfig[proposalCount] = ['Sum Insured']; + policyConfig[proposalCount] = ['Sum Insured']; const tables = document.querySelectorAll('table'); let increaseBy = 150; increaseTableWidth(increaseBy); @@ -1037,7 +1037,7 @@ // Add new quote sub-header const newQuoteHeader = document.createElement('th'); - newQuoteHeader.textContent = 'Quote asked'; + newQuoteHeader.textContent = 'Sum Insured'; newQuoteHeader.style.backgroundColor = randomColor; headerRow2.insertBefore(newQuoteHeader, headerRow2.querySelector('th:last-child')); @@ -1593,7 +1593,7 @@ - ${Object.entries(quotesConfig).flatMap(([proposal, codes]) => codes.map(code => ` - + ${code}