CHANGE_ base policy related changes in getAddOnPolicy API : GWM

This commit is contained in:
bitbucket 2024-05-03 10:58:12 +05:30
parent ca6eb4a872
commit f3d0127e3a
2 changed files with 12 additions and 5 deletions

View File

@ -1272,7 +1272,7 @@ public function getAddOnPolicy()
try {
$addOnEmployeeData = $this->employeeModel->where('is_active', 1 )->where('emp_code',$this->request->getGet('emp_code'))->where('client_id',$this->request->getGet('client_id'))->where('is_addon_value',1)->findAll();
$GMCEmployeeData = $this->employeeModel->where('is_active', 1 )->where('emp_code',$this->request->getGet('emp_code'))->where('client_id',$this->request->getGet('client_id'))->where('is_addon_value',0)->findAll();
$clientPolicy = $this->clientPolicyModel->where('client_id',$this->request->getGet('client_id'))
@ -1327,7 +1327,7 @@ public function getAddOnPolicy()
}
if($array['is_addon'] == 3)
if($array['is_addon'] == 3)//dependent add on policy
{
@ -1437,14 +1437,21 @@ public function getAddOnPolicy()
}
//array_push($PolicyData, $responce);
}else if($array['is_addon'] == 2){
}else if($array['is_addon'] == 2)//Topup policy
{
$getAddOnType = $this->clientPolicyModel->where('id',$array['base_policy'])->where('policy_status', 1)->get()->getRow();
$basePolicyAddOnType = $getAddOnType->is_addon;
// if is_addon value is 1 it is GMC if not it is one of the Add On policy
if($basePolicyAddOnType == 1){ $is_addon_value = 0; }else{ $is_addon_value = 1; }
$only_si_array = [];
$only_si_value = 0;
$only_si_premium_value = 0;
$only_si_gst_value = 0;
foreach ($GMCEmployeeData as $key => $value) {
$BasePolicyEmployeeData = $this->employeeModel->where('is_active', 1 )->where('emp_code',$this->request->getGet('emp_code'))->where('client_id',$this->request->getGet('client_id'))->where('is_addon_value',$is_addon_value)->findAll();
foreach ($BasePolicyEmployeeData as $key => $value) {
$employee_policy = $this->employeePolicyModel->where('employee_id',$value['id'])->where('client_policy_id',$array['id'])->where('is_active', 1 )->get()->getRow();
if(isset($employee_policy->basic_cover_si)){ $only_si_value = $employee_policy->basic_cover_si; }

View File

@ -607,7 +607,7 @@
$currentUrl = base_url();
$parsedUrl = parse_url($currentUrl);
$baseUrl = $parsedUrl['scheme'] . '://' . $parsedUrl['host'] . '/';
$redirectUrl = $baseUrl . 'nhanceTicket/staff/login_done?' . http_build_query(['token' => $sessionData]);
$redirectUrl = $baseUrl . 'Ticketing/nhance_login?' . http_build_query(['token' => $sessionData]);
?>
<a href="<?php echo $redirectUrl; ?>" target="_blank">
<i class="mdi mdi-lifebuoy"></i>