CHANGE_CLIENT_CONTROLLER_TERMS_VALUE_COMMA_REMOVE_ : AADHAVAN
This commit is contained in:
parent
32eadb700a
commit
fcdd187fcc
@ -214,6 +214,7 @@ $routes->post("/editEmployeeProfile", "EmployeeRestController::editEmployeeProfi
|
||||
|
||||
|
||||
|
||||
$routes->post("employeeUpload", "EmployeeRestController::employeeUpload");
|
||||
|
||||
$routes->group("employeeRest", ["filter" => "authJWT"], function($routes){
|
||||
$routes->post("employeeUpload", "EmployeeRestController::employeeUpload");
|
||||
|
||||
@ -833,8 +833,10 @@ class ClientController extends AdminController
|
||||
|
||||
$client_policy_id = $this->request->getGet('client_policy_id');
|
||||
$record = $this->clientPolicyModel->where('id', $client_policy_id)->first();
|
||||
|
||||
$family_floater=json_decode($record['policy_terms'])->family_floater;
|
||||
$family_floater ='';
|
||||
if (isset(json_decode($record['policy_terms'])->family_floater)) {
|
||||
$family_floater=json_decode($record['policy_terms'])->family_floater;
|
||||
}
|
||||
|
||||
$emp_count = $this->employeeModel ->join('client_policy cp',"employees.client_id = cp.client_id")
|
||||
->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id")
|
||||
@ -865,6 +867,10 @@ class ClientController extends AdminController
|
||||
}else{
|
||||
$premiumData = $this->policyPremium2Model->where(['client_id' => $record['client_id'], 'client_policy_id' => $client_policy_id, 'is_active' => 1])->findAll();
|
||||
}
|
||||
// echo $record['client_id'];
|
||||
// echo "-----";
|
||||
// echo $client_policy_id;
|
||||
// print_r($premiumData);die;
|
||||
// echo '<pre>';
|
||||
// echo $family_floater;
|
||||
$resultss = [];
|
||||
@ -876,19 +882,43 @@ class ClientController extends AdminController
|
||||
$resultss[$index] = $record;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
}else if($family_floater == 0){
|
||||
foreach ($results as $index => $record) {
|
||||
if ($index == '0' || $index == '1' || $index == '2' || $index == '3' || $index == '4' || $index == '5' || $index == '6') {
|
||||
// Clearing the $results array
|
||||
$resultss[$index] = $record;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
foreach ($results as $index => $record) {
|
||||
$resultss[$index] = $record;
|
||||
}
|
||||
}
|
||||
$premiumDataa ='';
|
||||
if ($family_floater == 0) {
|
||||
// print_r($premiumData);die;
|
||||
if (count($premiumData) == 0) {
|
||||
$premiumDataa = $premiumData;
|
||||
}else if ($premiumData[0]['policy_grid_id'] == '3' || $premiumData[0]['policy_grid_id'] == '4' || $premiumData[0]['policy_grid_id'] == '5' || $premiumData[0]['policy_grid_id'] == '6' || $premiumData[0]['policy_grid_id'] == '7' || $premiumData[0]['policy_grid_id'] == '8' || $premiumData[0]['policy_grid_id'] == '9' ) {
|
||||
$premiumDataa = $premiumData;
|
||||
}
|
||||
}
|
||||
else if($family_floater == 1){
|
||||
if(count($premiumData) == 0){
|
||||
$premiumDataa = $premiumData;
|
||||
}else if ($premiumData[0]['policy_grid_id'] == '10' || $premiumData[0]['policy_grid_id'] == '11') {
|
||||
$premiumDataa = $premiumData;
|
||||
}
|
||||
}else{
|
||||
$premiumDataa = $premiumData;
|
||||
}
|
||||
|
||||
// print_r($premiumData);die;
|
||||
|
||||
// print_r($data[0]->policy_type); die;
|
||||
// echo "hello";
|
||||
// return json_encode($premiumData);
|
||||
return $this->respond(['status' => true,'code' => 200,'data' => $resultss, 'premiumData' => json_encode($premiumData), 'count' => $emp_count, 'policy_name' => $policy_name,], 200);
|
||||
return $this->respond(['status' => true,'code' => 200,'data' => $resultss, 'premiumData' => json_encode($premiumDataa), 'count' => $emp_count, 'policy_name' => $policy_name,], 200);
|
||||
|
||||
}
|
||||
|
||||
@ -903,7 +933,7 @@ class ClientController extends AdminController
|
||||
/*** Client Policy Table Primary Key(ID) ***/
|
||||
$client_policy_id = $this->request->getPost("client_policy_id");
|
||||
|
||||
$data['sum_insured'] =$this->request->getPost("sum_insured");
|
||||
$data['sum_insured'] =str_replace(',', '',$this->request->getPost("sum_insured"));
|
||||
$data['family_floater'] =$this->request->getPost("family_floater");
|
||||
$data['corporatebuffer'] = $this->request->getPost("corporatebuffer");
|
||||
$data['family_floaters'] = $this->request->getPost("family_floaters") ?? [];
|
||||
@ -913,49 +943,49 @@ class ClientController extends AdminController
|
||||
}
|
||||
$data['waiverofpreexistingdiseases'] =$this->request->getPost("waiverofpreexistingdiseases");
|
||||
if ($data['waiverofpreexistingdiseases'] == 1) {
|
||||
$data['maternitycoverage'] =$this->request->getPost("maternitycoverage");
|
||||
$data['twindelivery'] =$this->request->getPost("twindelivery");
|
||||
$data['preandpostnatal'] =$this->request->getPost("preandpostnatal");
|
||||
$data['babyday1cover'] =$this->request->getPost("babyday1cover");
|
||||
$data['maternitycoverage'] =str_replace(',', '',$this->request->getPost("maternitycoverage"));
|
||||
$data['twindelivery'] =str_replace(',', '',$this->request->getPost("twindelivery"));
|
||||
$data['preandpostnatal'] =str_replace(',', '',$this->request->getPost("preandpostnatal"));
|
||||
$data['babyday1cover'] =str_replace(',', '',$this->request->getPost("babyday1cover"));
|
||||
}else{
|
||||
$data['maternitycoverage'] ="";
|
||||
$data['twindelivery'] ="";
|
||||
$data['preandpostnatal'] ="";
|
||||
$data['babyday1cover'] ="";
|
||||
}
|
||||
$data['9monthwaitingperiodwaived'] =$this->request->getPost("9monthwaitingperiodwaived");
|
||||
$data['coverfromthedateofjoining'] =$this->request->getPost("coverfromthedateofjoining");
|
||||
$data['9monthwaitingperiodwaived'] =str_replace(',', '',$this->request->getPost("9monthwaitingperiodwaived"));
|
||||
$data['coverfromthedateofjoining'] =str_replace(',', '',$this->request->getPost("coverfromthedateofjoining"));
|
||||
$data['waiverof1,2,3&4thyearexclusions'] =$this->request->getPost("waiverof1,2,3&4thyearexclusions");
|
||||
$data['waiverof30dayswaitingperiod'] =$this->request->getPost("waiverof30dayswaitingperiod");
|
||||
$data['prehospitalizationcover'] =$this->request->getPost("prehospitalizationcover");
|
||||
$data['prehospitalizationcover'] =str_replace(',', '',$this->request->getPost("prehospitalizationcover"));
|
||||
// $data['posthospitalizationcover'] =$this->request->getPost("posthospitalizationcover");
|
||||
$data['congenitaldiseasesinternal'] =$this->request->getPost("congenitaldiseasesinternal");
|
||||
$data['congenitaldiseasesinternal'] =str_replace(',', '',$this->request->getPost("congenitaldiseasesinternal"));
|
||||
// $data['congenitaldiseasesexternal'] =$this->request->getPost("congenitaldiseasesexternal");
|
||||
$data['copayzonewisecopay'] =$this->request->getPost("copayzonewisecopay");
|
||||
$data['bioabsorbablestenttoriclensmultifocallens'] =$this->request->getPost("bioabsorbablestenttoriclensmultifocallens");
|
||||
$data['roomrentlimit'] =$this->request->getPost("roomrentlimit");
|
||||
$data['proportionatedeductionclause'] =$this->request->getPost("proportionatedeductionclause");
|
||||
$data['nursingallowance'] =$this->request->getPost("nursingallowance");
|
||||
$data['ailmentcapping'] =$this->request->getPost("ailmentcapping");
|
||||
$data['ambulancecharges'] =$this->request->getPost("ambulancecharges");
|
||||
$data['airambulance'] =$this->request->getPost("airambulance");
|
||||
$data['familytransportationbenefit'] =$this->request->getPost("familytransportationbenefit");
|
||||
$data['reasonableandcustomarycharges'] =$this->request->getPost("reasonableandcustomarycharges");
|
||||
$data['ayudhtreatmentcover'] =$this->request->getPost("ayudhtreatmentcover");
|
||||
$data['armdcovered'] =$this->request->getPost("armdcovered");
|
||||
$data['suminsuredenhancement'] =$this->request->getPost("suminsuredenhancement");
|
||||
$data['automaticsuminsuredreinstatement'] =$this->request->getPost("automaticsuminsuredreinstatement");
|
||||
$data['additionalsicknessbenefit'] =$this->request->getPost("additionalsicknessbenefit");
|
||||
$data['lasiksurgery'] =$this->request->getPost("lasiksurgery");
|
||||
$data['midterminclusion'] =$this->request->getPost("midterminclusion");
|
||||
$data['capd'] =$this->request->getPost("capd");
|
||||
$data['organdonorexpenses'] =$this->request->getPost("organdonorexpenses");
|
||||
$data['moderntreatmentsasperirdai'] =$this->request->getPost("moderntreatmentsasperirdai");
|
||||
$data['Wellness'] =$this->request->getPost("Wellness");
|
||||
$data['days_of_discharge'] =$this->request->getPost("days_of_discharge");
|
||||
$data['days_from_dod'] =$this->request->getPost("days_from_dod");
|
||||
$data['special_condition_label'] = $this->request->getPost("special_condition_label") ?? [];
|
||||
$data['special_condition_input'] = $this->request->getPost("special_condition_input") ?? [];
|
||||
$data['roomrentlimit'] =str_replace(',', '',$this->request->getPost("roomrentlimit"));
|
||||
$data['proportionatedeductionclause'] =str_replace(',', '',$this->request->getPost("proportionatedeductionclause"));
|
||||
$data['nursingallowance'] =str_replace(',', '',$this->request->getPost("nursingallowance"));
|
||||
$data['ailmentcapping'] =str_replace(',', '',$this->request->getPost("ailmentcapping"));
|
||||
$data['ambulancecharges'] =str_replace(',', '',$this->request->getPost("ambulancecharges"));
|
||||
$data['airambulance'] =str_replace(',', '',$this->request->getPost("airambulance"));
|
||||
$data['familytransportationbenefit'] =str_replace(',', '',$this->request->getPost("familytransportationbenefit"));
|
||||
$data['reasonableandcustomarycharges'] =str_replace(',', '',$this->request->getPost("reasonableandcustomarycharges"));
|
||||
$data['ayudhtreatmentcover'] =str_replace(',', '',$this->request->getPost("ayudhtreatmentcover"));
|
||||
$data['armdcovered'] =str_replace(',', '',$this->request->getPost("armdcovered"));
|
||||
$data['suminsuredenhancement'] =str_replace(',', '',$this->request->getPost("suminsuredenhancement"));
|
||||
$data['automaticsuminsuredreinstatement'] =str_replace(',', '',$this->request->getPost("automaticsuminsuredreinstatement"));
|
||||
$data['additionalsicknessbenefit'] =str_replace(',', '',$this->request->getPost("additionalsicknessbenefit"));
|
||||
$data['lasiksurgery'] =str_replace(',', '',$this->request->getPost("lasiksurgery"));
|
||||
$data['midterminclusion'] =str_replace(',', '',$this->request->getPost("midterminclusion"));
|
||||
$data['capd'] =str_replace(',', '',$this->request->getPost("capd"));
|
||||
$data['organdonorexpenses'] =str_replace(',', '',$this->request->getPost("organdonorexpenses"));
|
||||
$data['moderntreatmentsasperirdai'] =str_replace(',', '',$this->request->getPost("moderntreatmentsasperirdai"));
|
||||
$data['Wellness'] =str_replace(',', '',$this->request->getPost("Wellness"));
|
||||
$data['days_of_discharge'] =str_replace(',', '',$this->request->getPost("days_of_discharge"));
|
||||
$data['days_from_dod'] =str_replace(',', '',$this->request->getPost("days_from_dod"));
|
||||
$data['special_condition_label'] = str_replace(',', '',$this->request->getPost("special_condition_label")) ?? [];
|
||||
$data['special_condition_input'] = str_replace(',', '',$this->request->getPost("special_condition_input")) ?? [];
|
||||
|
||||
|
||||
$jsonData = json_encode($data);
|
||||
@ -1023,14 +1053,14 @@ class ClientController extends AdminController
|
||||
/*** Client Policy Table Primary Key(ID) ***/
|
||||
$client_policy_id = $this->request->getPost("client_policy_id");
|
||||
|
||||
$data['sumInsured2'] =$this->request->getPost("sumInsured2");
|
||||
$data['totalSumInsured'] =$this->request->getPost("totalSumInsured");
|
||||
$data['accidentalDeathBenefit'] =$this->request->getPost("accidentalDeathBenefit");
|
||||
$data['permanentTotalDisablement'] =$this->request->getPost("permanentTotalDisablement");
|
||||
$data['sumInsured2'] =str_replace(',', '', $this->request->getPost("sumInsured2"));
|
||||
$data['totalSumInsured'] =str_replace(',', '',$this->request->getPost("totalSumInsured"));
|
||||
$data['accidentalDeathBenefit'] =str_replace(',', '',$this->request->getPost("accidentalDeathBenefit"));
|
||||
$data['permanentTotalDisablement'] =str_replace(',', '',$this->request->getPost("permanentTotalDisablement"));
|
||||
$data['permanentPartialDisablement'] =$this->request->getPost("permanentPartialDisablement");
|
||||
$data['temporaryTotalDisablementBenefit'] =$this->request->getPost("temporaryTotalDisablementBenefit");
|
||||
$data['accidentalHospitalizationExpenses'] =$this->request->getPost("accidentalHospitalizationExpenses");
|
||||
$data['childrenEducationWelfareFund'] =$this->request->getPost("childrenEducationWelfareFund");
|
||||
$data['accidentalHospitalizationExpenses'] =str_replace(',', '',$this->request->getPost("accidentalHospitalizationExpenses"));
|
||||
$data['childrenEducationWelfareFund'] =str_replace(',', '',$this->request->getPost("childrenEducationWelfareFund"));
|
||||
|
||||
$data['compassionateVisitExpenses'] =$this->request->getPost("compassionateVisitExpenses");
|
||||
if ($data['compassionateVisitExpenses'] == 1) {
|
||||
@ -1039,16 +1069,16 @@ class ClientController extends AdminController
|
||||
$data['compassionateVisitExpensesData'] ="";
|
||||
}
|
||||
|
||||
$data['brokenBoneExpenses'] = $this->request->getPost("brokenBoneExpenses");
|
||||
$data['brokenBoneExpenses'] = str_replace(',', '',$this->request->getPost("brokenBoneExpenses"));
|
||||
if ($data['brokenBoneExpenses'] == 1) {
|
||||
$data['brokenBoneExpensesData'] = $this->request->getPost("brokenBoneExpensesData");
|
||||
$data['brokenBoneExpensesData'] = str_replace(',', '',$this->request->getPost("brokenBoneExpensesData"));
|
||||
}else{
|
||||
$data['brokenBoneExpensesData'] ="";
|
||||
}
|
||||
|
||||
$data['ambulanceCharges'] =$this->request->getPost("ambulanceCharges");
|
||||
$data['ambulanceCharges'] =str_replace(',', '',$this->request->getPost("ambulanceCharges"));
|
||||
if ($data['ambulanceCharges'] == 1) {
|
||||
$data['ambulanceChargesData'] =$this->request->getPost("ambulanceChargesData");
|
||||
$data['ambulanceChargesData'] =str_replace(',', '',$this->request->getPost("ambulanceChargesData"));
|
||||
}else{
|
||||
$data['ambulanceChargesData'] ="";
|
||||
}
|
||||
|
||||
@ -780,10 +780,6 @@
|
||||
<button style="margin-top: 44px;" type="button" class="btn btn-primary" id="gmc_add_more_${Count}" onclick="appendGridtHtml('1')">+</button>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
else if(ui_type == '1_2' )
|
||||
{
|
||||
|
||||
}
|
||||
else if(ui_type == '3'){
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user