CHANGE_ family floter text : GWM
This commit is contained in:
parent
11ecfce5c4
commit
5ae2fcfdc4
@ -1075,6 +1075,11 @@ public function getEmployeePolicy()
|
||||
|
||||
// Generate Notes string based on familyFloates terms
|
||||
$array->notes = $this->FloterNotesConvertion($familyFloates);
|
||||
|
||||
if($getSlabAndGridData['slab_rates'][0]['premium_type'] == 1)
|
||||
{ $array->family_floter_notes = 'For Family'; }
|
||||
else{ $array->family_floter_notes = 'For Members'; }
|
||||
|
||||
// Convert familyFloaters terms data to plain array
|
||||
$floters = $this->FloterConvertion($familyFloates);
|
||||
|
||||
@ -1514,50 +1519,54 @@ public function getCashDepositData()
|
||||
->findAll();
|
||||
$result = [];
|
||||
|
||||
foreach ($ClientPolicyData as $key => $value) {
|
||||
if(count($ClientPolicyData))
|
||||
{
|
||||
foreach ($ClientPolicyData as $key => $value) {
|
||||
|
||||
$data['clientId'] = $value['clientId'];
|
||||
$data['insurerId'] = $value['insurerId'];
|
||||
$data['insurerName'] = $value['insurer_name'];
|
||||
$data['depositData'] = $this->clientPolicyModel->getdepositData($value['clientId'],$value['insurerId']);
|
||||
$data['balance'] = count($data['depositData']) ? $data['depositData'][0]->balance : 0;
|
||||
|
||||
$data['policyDetails'] = [];
|
||||
$ClientPolicyData =$this->clientPolicyModel->select('client_policy.id as client_policy_id , client_policy.client_id as client_id, policies.id as policy_id,policies.policy_type_id as policy_type_id, policies.name as policy_name , client_policy.is_addon as is_addon')
|
||||
->join('policies', 'client_policy.policy_id = policies.id', 'left')
|
||||
->where('client_policy.insurer_id', $value['insurerId'] )
|
||||
->where('client_policy.client_id', $this->request->getGet('client_id') )
|
||||
->findAll();
|
||||
foreach ($ClientPolicyData as $key => $value)
|
||||
{
|
||||
$getSlabAndGridData = $this->policesModel->getPolicySlabRatesForEmpOnboard( $value['client_policy_id'],$value['client_id']);
|
||||
if($value['is_addon'] == "2"){ $value['type'] = 'SI TopUp'; }else if($value['is_addon'] == "3"){ $value['type'] = 'Dependent AddOn'; }else{ $value['type'] = $getSlabAndGridData['grid_master']['policy_type']; }
|
||||
$employeeDetails = $this->employeePolicyModel->getEmployeePolicy( client_id:$value['client_id'],policy_id: $value['client_policy_id'],status:0);
|
||||
$enrolledCount = 0;
|
||||
$draftCount = 0;
|
||||
if(count($employeeDetails))
|
||||
$data['clientId'] = $value['clientId'];
|
||||
$data['insurerId'] = $value['insurerId'];
|
||||
$data['insurerName'] = $value['insurer_name'];
|
||||
$data['depositData'] = $this->clientPolicyModel->getdepositData($value['clientId'],$value['insurerId']);
|
||||
$data['balance'] = count($data['depositData']) ? $data['depositData'][0]->balance : 0;
|
||||
|
||||
$data['policyDetails'] = [];
|
||||
$ClientPolicyData =$this->clientPolicyModel->select('client_policy.id as client_policy_id , client_policy.client_id as client_id, policies.id as policy_id,policies.policy_type_id as policy_type_id, policies.name as policy_name , client_policy.is_addon as is_addon')
|
||||
->join('policies', 'client_policy.policy_id = policies.id', 'left')
|
||||
->where('client_policy.insurer_id', $value['insurerId'] )
|
||||
->where('client_policy.client_id', $this->request->getGet('client_id') )
|
||||
->findAll();
|
||||
foreach ($ClientPolicyData as $key => $value)
|
||||
{
|
||||
foreach ($employeeDetails as $item) {
|
||||
if ($item['emp_status'] === 'enrolled') {
|
||||
$enrolledCount++;
|
||||
} elseif ($item['emp_status'] === 'draft') {
|
||||
$draftCount++;
|
||||
$getSlabAndGridData = $this->policesModel->getPolicySlabRatesForEmpOnboard( $value['client_policy_id'],$value['client_id']);
|
||||
if($value['is_addon'] == "2"){ $value['type'] = 'SI TopUp'; }else if($value['is_addon'] == "3"){ $value['type'] = 'Dependent AddOn'; }else{ $value['type'] = $getSlabAndGridData['grid_master']['policy_type']; }
|
||||
$employeeDetails = $this->employeePolicyModel->getEmployeePolicy( client_id:$value['client_id'],policy_id: $value['client_policy_id'],status:0);
|
||||
$enrolledCount = 0;
|
||||
$draftCount = 0;
|
||||
if(count($employeeDetails))
|
||||
{
|
||||
foreach ($employeeDetails as $item) {
|
||||
if ($item['emp_status'] === 'enrolled') {
|
||||
$enrolledCount++;
|
||||
} elseif ($item['emp_status'] === 'draft') {
|
||||
$draftCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$value['totalMembersCount'] = count($employeeDetails);
|
||||
$value['membersCountOfEnrolled'] = $enrolledCount;
|
||||
$value['membersCountOfDraft'] = $draftCount;
|
||||
|
||||
array_push($data['policyDetails'],$value);
|
||||
}
|
||||
|
||||
$value['totalMembersCount'] = count($employeeDetails);
|
||||
$value['membersCountOfEnrolled'] = $enrolledCount;
|
||||
$value['membersCountOfDraft'] = $draftCount;
|
||||
|
||||
array_push($data['policyDetails'],$value);
|
||||
|
||||
|
||||
array_push($result,$data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
array_push($result,$data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if($result)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user