'FIX_EMP_MODULE_ID_ISSUE_IN_RACK_RATE_RV'
This commit is contained in:
parent
e158a8126c
commit
6c99f547ab
@ -1048,11 +1048,19 @@ class ClientController extends AdminController
|
|||||||
->where("employees.emp_status",'active')
|
->where("employees.emp_status",'active')
|
||||||
->countAllResults();
|
->countAllResults();
|
||||||
|
|
||||||
if($emp_count == 0){
|
|
||||||
$emp_count = true;
|
$data = $this->employeePolicyModel->select('employee_polices.id')
|
||||||
}else{
|
->where('employee_polices.is_active', 1)
|
||||||
$emp_count = false;
|
->where('employee_polices.client_policy_id', $client_policy_id)
|
||||||
}
|
->findAll();
|
||||||
|
|
||||||
|
$emp_count = count($data);
|
||||||
|
|
||||||
|
// if($emp_count == 0){
|
||||||
|
// $emp_count = true;
|
||||||
|
// }else{
|
||||||
|
// $emp_count = false;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
$data = $this->policesModel->getPolicyPremium($record['policy_id']);
|
$data = $this->policesModel->getPolicyPremium($record['policy_id']);
|
||||||
|
|||||||
@ -1262,7 +1262,7 @@ class EmpDataServiceController extends BaseController
|
|||||||
$description = 'The following amount of Rs. ' . $amount->total_sum . '/- has been debited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.';
|
$description = 'The following amount of Rs. ' . $amount->total_sum . '/- has been debited for the ' . $arrayData['count'] . ' employees at ' . remove_underscore_capitalize_first_letter($arrayData['event']) . ' to ' . remove_underscore_capitalize_first_letter($arrayData['policy_name']) . '.';
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'amount' => $amount->total_sum,
|
'amount' => $amount->total_sum ?? 0,
|
||||||
'sub_type_id' => 4,
|
'sub_type_id' => 4,
|
||||||
'client_id' => $arrayData['client_id'],
|
'client_id' => $arrayData['client_id'],
|
||||||
'insurer_id' => $insurer_id['insurer_id'],
|
'insurer_id' => $insurer_id['insurer_id'],
|
||||||
|
|||||||
@ -106,6 +106,7 @@ class EmployeePolicyModel extends Model
|
|||||||
{
|
{
|
||||||
$client_policy_id = $ref_data['client_policy_id'];
|
$client_policy_id = $ref_data['client_policy_id'];
|
||||||
$insurer_or_tpa = $ref_data['insurer_or_tpa'];
|
$insurer_or_tpa = $ref_data['insurer_or_tpa'];
|
||||||
|
$event = $ref_data['event_type'];
|
||||||
|
|
||||||
if($insurer_or_tpa == 'tpa'){
|
if($insurer_or_tpa == 'tpa'){
|
||||||
|
|
||||||
@ -150,13 +151,11 @@ class EmployeePolicyModel extends Model
|
|||||||
batch_files.batch_code as bf
|
batch_files.batch_code as bf
|
||||||
FROM batch_files
|
FROM batch_files
|
||||||
LEFT JOIN batch_list ON batch_files.batch_code = batch_list.batch_code
|
LEFT JOIN batch_list ON batch_files.batch_code = batch_list.batch_code
|
||||||
WHERE batch_files.event_type = 'inception'
|
WHERE batch_files.event_type = '{$event}'
|
||||||
AND batch_files.actions = 'export'
|
AND batch_files.actions = 'export'
|
||||||
AND batch_files.insurer_or_tpa = '{$insurer_or_tpa}'
|
AND batch_files.insurer_or_tpa = '{$insurer_or_tpa}'
|
||||||
) as batch_data ON employee_polices.id = batch_data.emp_policy_id
|
) as batch_data ON employee_polices.id = batch_data.emp_policy_id
|
||||||
WHERE batch_data.bf IS NULL
|
WHERE employee_polices.client_policy_id = '{$client_policy_id}'
|
||||||
AND batch_data.bl IS NULL
|
|
||||||
AND employee_polices.client_policy_id = '{$client_policy_id}'
|
|
||||||
AND (employee_polices.{$id} IS NULL OR employee_polices.{$id} = '')
|
AND (employee_polices.{$id} IS NULL OR employee_polices.{$id} = '')
|
||||||
AND employee_polices.is_active = 1";
|
AND employee_polices.is_active = 1";
|
||||||
|
|
||||||
|
|||||||
@ -711,7 +711,7 @@ $('body').on('click', '.btnPolicyModel', function() {
|
|||||||
$('#nameOfThePolicy').html(' - ' + res.policy_name);
|
$('#nameOfThePolicy').html(' - ' + res.policy_name);
|
||||||
$('#grid_emp_count').val(res.count);
|
$('#grid_emp_count').val(res.count);
|
||||||
|
|
||||||
if (res.count == false) {
|
if (res.count > 0) {
|
||||||
console.log('count -- 2', res.count);
|
console.log('count -- 2', res.count);
|
||||||
$("#btnGridSubmit_2").hide();
|
$("#btnGridSubmit_2").hide();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user