MERGE_LIVE_ISSUES
This commit is contained in:
commit
6583985722
@ -444,6 +444,7 @@ $routes->group("/api", ["filter" => "authJWT"], function ($routes) {
|
|||||||
|
|
||||||
$routes->post("employeeRest/saveMpin", "RestAuthenticationController::saveMpin");
|
$routes->post("employeeRest/saveMpin", "RestAuthenticationController::saveMpin");
|
||||||
$routes->post("employeeRest/updateMpin", "RestAuthenticationController::updateMpin");
|
$routes->post("employeeRest/updateMpin", "RestAuthenticationController::updateMpin");
|
||||||
|
$routes->post("calculatePremium", "EmployeeRestController::calculatePremium");
|
||||||
|
|
||||||
// $routes->post("employeeRest/createOrUpdateEmployeePolicySiAmount", "EmployeeRestController::createOrUpdateEmployeePolicySiAmount");
|
// $routes->post("employeeRest/createOrUpdateEmployeePolicySiAmount", "EmployeeRestController::createOrUpdateEmployeePolicySiAmount");
|
||||||
// $routes->post("employeeRest/calculatePremium", "EmployeeRestController::calculatePremium");
|
// $routes->post("employeeRest/calculatePremium", "EmployeeRestController::calculatePremium");
|
||||||
|
|||||||
@ -44,6 +44,7 @@ use App\Models\SIMappingModel;
|
|||||||
|
|
||||||
use App\Controllers\EmpDataServiceController;
|
use App\Controllers\EmpDataServiceController;
|
||||||
use App\Controllers\GoogleDriveController;
|
use App\Controllers\GoogleDriveController;
|
||||||
|
use App\Controllers\EmployeeRestController;
|
||||||
|
|
||||||
use App\Helpers\sendMailNotification;
|
use App\Helpers\sendMailNotification;
|
||||||
|
|
||||||
@ -4567,6 +4568,10 @@ class ClientController extends AdminController
|
|||||||
// $empmodel = new EmployeeModel();
|
// $empmodel = new EmployeeModel();
|
||||||
// $data = $empmodel->getEmployeePolicy(348);
|
// $data = $empmodel->getEmployeePolicy(348);
|
||||||
// dd($data);
|
// dd($data);
|
||||||
|
|
||||||
|
|
||||||
|
// $empRest = new EmployeeRestController();
|
||||||
|
// $empRest->calculatePremium(393, 'ARCPO7010', 500000, 27);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -98,7 +98,8 @@ class EmployeeController extends AdminController
|
|||||||
{
|
{
|
||||||
// $model = new UserModel();
|
// $model = new UserModel();
|
||||||
$data = [];
|
$data = [];
|
||||||
$data['status'] = ['draft' => 'Draft', 'enrolled' => 'Enrolled', 'active' => 'Active', 'inactive' => 'In-Active', 'pending' => 'Pending'];
|
// $data['status'] = ['draft' => 'Draft', 'enrolled' => 'Enrolled', 'active' => 'Active', 'inactive' => 'In-Active', 'pending' => 'Pending'];
|
||||||
|
$data['status'] = ['draft' => 'Draft', 'enrolled' => 'Enrolled'];
|
||||||
|
|
||||||
if (count($this->request->getGet())) {
|
if (count($this->request->getGet())) {
|
||||||
$filterData = $this->request->getGet();
|
$filterData = $this->request->getGet();
|
||||||
|
|||||||
@ -2234,12 +2234,14 @@ class EmployeeRestController extends AdminController
|
|||||||
helper('excel_util_helper');
|
helper('excel_util_helper');
|
||||||
|
|
||||||
if($this->request){ //
|
if($this->request){ //
|
||||||
|
echo 'request';
|
||||||
$client_policy_id = $this->request->getVar('client_policy_id') ?? $clientPolicyId;
|
$client_policy_id = $this->request->getVar('client_policy_id') ?? $clientPolicyId;
|
||||||
$emp_code = $this->request->getVar('emp_code') ?? $empCode;
|
$emp_code = $this->request->getVar('emp_code') ?? $empCode;
|
||||||
$default_si = $this->request->getVar('si') ?? $default_si;// si amt which choosed in add on policy
|
$default_si = $this->request->getVar('si') ?? $default_si;// si amt which choosed in add on policy
|
||||||
$client_branch_id = $this->request->getVar('client_branch_id') ?? $client_branch_id;
|
$client_branch_id = $this->request->getVar('client_branch_id') ?? $client_branch_id;
|
||||||
}else{
|
}else{
|
||||||
//Cli and enrollment
|
//Cli and enrollment
|
||||||
|
echo 'internal';
|
||||||
$client_policy_id = $clientPolicyId;
|
$client_policy_id = $clientPolicyId;
|
||||||
$emp_code = $empCode;
|
$emp_code = $empCode;
|
||||||
$default_si = $default_si;// si amt which choosed in add on policy
|
$default_si = $default_si;// si amt which choosed in add on policy
|
||||||
@ -2321,6 +2323,43 @@ class EmployeeRestController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->request){
|
||||||
|
if(isset($policy_terms['policy_terms'])){
|
||||||
|
$policyTermsJson = json_decode($policy_terms['policy_terms'], true);
|
||||||
|
// print_r($employee_data_group_by_family);die();
|
||||||
|
|
||||||
|
foreach ($employee_data_group_by_family[$emp_code] as $key => &$value) {
|
||||||
|
|
||||||
|
if(strtolower($value['relationship']) == 'self' && $policyTermsJson['is_payable_employee']['self'] == 0){
|
||||||
|
$value['policy_details']['rata_premimum'] = 0;
|
||||||
|
$value['policy_details']['premium'] = 0;
|
||||||
|
$value['policy_details']['gst'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(strtolower($value['relationship']) == 'spouse' && $policyTermsJson['is_payable_employee']['spouse'] == 0){
|
||||||
|
$value['policy_details']['rata_premimum'] = 0;
|
||||||
|
$value['policy_details']['premium'] = 0;
|
||||||
|
$value['policy_details']['gst'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if((strtolower($value['relationship']) == 'son' || strtolower($value['relationship']) == 'daughter') && $policyTermsJson['is_payable_employee']['childern'] == 0){
|
||||||
|
$value['policy_details']['rata_premimum'] = 0;
|
||||||
|
$value['policy_details']['premium'] = 0;
|
||||||
|
$value['policy_details']['gst'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if((strtolower($value['relationship']) == 'father in law' || strtolower($value['relationship']) == 'mother in law' || strtolower($value['relationship']) == 'father' || strtolower($value['relationship']) == 'mother' ) && $policyTermsJson['is_payable_employee']['elders'] == 0){
|
||||||
|
$value['policy_details']['rata_premimum'] = 0;
|
||||||
|
$value['policy_details']['premium'] = 0;
|
||||||
|
$value['policy_details']['gst'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
unset($value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// die();
|
// die();
|
||||||
|
|||||||
@ -151,8 +151,8 @@ class EmployeePolicyModel extends Model
|
|||||||
->join('client_policy cp', 'employee_polices.client_policy_id = cp.id') //cp - client policy
|
->join('client_policy cp', 'employee_polices.client_policy_id = cp.id') //cp - client policy
|
||||||
->join('policies pm', 'cp.policy_id = pm.id', 'left') //pm - policy master
|
->join('policies pm', 'cp.policy_id = pm.id', 'left') //pm - policy master
|
||||||
->join('policy_type', 'policy_type.id = cp.policy_type_id')
|
->join('policy_type', 'policy_type.id = cp.policy_type_id')
|
||||||
->join('insurers im', 'cp.insurer_id = im.id') //im - insurer master
|
->join('insurers im', 'cp.insurer_id = im.id', 'left') //im - insurer master
|
||||||
->join('insurer_branch ib', 'cp.insurer_branch_id = ib.id') //ib - insurer branch
|
->join('insurer_branch ib', 'cp.insurer_branch_id = ib.id', 'left') //ib - insurer branch
|
||||||
->join('tpa tpam', 'cp.tpa_id = tpam.id', 'left') //tpam - tpa master
|
->join('tpa tpam', 'cp.tpa_id = tpam.id', 'left') //tpam - tpa master
|
||||||
->join('tpa_branch tpab', 'cp.tpa_branch_id = tpab.id', 'left') //tpab - tpa branch
|
->join('tpa_branch tpab', 'cp.tpa_branch_id = tpab.id', 'left') //tpab - tpa branch
|
||||||
->join('clients cm', 'cp.client_id = cm.id') //cm - client master
|
->join('clients cm', 'cp.client_id = cm.id') //cm - client master
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user