FIX_ISSUES

This commit is contained in:
VENKATESHWARAN 2026-01-07 09:30:06 +05:30
parent b859de50a2
commit 6c65c595ce
4 changed files with 12 additions and 12 deletions

View File

@ -109,8 +109,8 @@ class ApiServiceController extends BaseController
->where('employees.id', $id)
->where('employee_polices.is_active', 1)
->where('employees.is_active', 1)
->where('employee_polices.status', 'active')
->where('employees.emp_status', 'active')
->whereIn('employee_polices.status', ['active', 'expired'])
->whereIn('employees.emp_status', ['active', 'expired'])
->findAll();

View File

@ -1517,10 +1517,10 @@ class EmployeeController extends AdminController
->join('client_policy', 'client_policy.id = employee_polices.client_policy_id')
->join('employees', 'employees.id = employee_polices.employee_id')
->join('tpa', 'tpa.id = client_policy.tpa_id')
->where('employees.emp_status', 'active')
->where('employees.is_active', '1')
->where("employee_polices.tpa_id IS NOT NULL AND employee_polices.tpa_id <> ''")
->where('employee_polices.status', 'active')
->whereIn('employee_polices.status', ['active', 'expired'])
->whereIn('employees.emp_status', ['active', 'expired'])
->where('employee_polices.is_active', '1')
->where('employee_polices.rand_string', $rand_string)
->first();

View File

@ -1545,9 +1545,9 @@ class EmployeePolicyModel extends Model
->join('insurer_branch', 'insurer_branch.id = cp.insurer_branch_id')
->join('tpa', 'tpa.id = cp.tpa_id')
->where("ep.tpa_id IS NOT NULL AND ep.tpa_id <> ''")
->where('e.emp_status', 'active')
->where('e.is_active', '1')
->where('ep.status', 'active')
->whereIn('ep.status', ['active', 'expired'])
->whereIn('e.emp_status', ['active', 'expired'])
->where('ep.is_active', '1')
->where('e.emp_code', $emp_code)
->where('ep.client_policy_id', $client_policy_id)
@ -1618,9 +1618,9 @@ class EmployeePolicyModel extends Model
->join('insurer_branch', 'insurer_branch.id = cp.insurer_branch_id')
->join('tpa', 'tpa.id = cp.tpa_id')
->where("ep.tpa_id IS NOT NULL AND ep.tpa_id <> ''")
->where('e.emp_status', 'active')
->where('e.is_active', '1')
->where('ep.status', 'active')
->whereIn('ep.status', ['active', 'expired'])
->whereIn('e.emp_status', ['active', 'expired'])
->where('ep.is_active', '1')
->where('ep.rand_string', $rand_string)
->get()

View File

@ -197,20 +197,20 @@
<?php } ?>
<?php if(in_array($employee['policy_type_id'], [2,3,4,5]) && $employee['emp_status'] == 'active' && $employee['status'] == 'active' && !empty($employee['tpa_id'])) { ?>
<?php if(in_array($employee['policy_type_id'], [2,3,4,5]) && in_array($employee['emp_status'], ['active', 'expired']) && in_array($employee['status'], ['active', 'expired']) && !empty($employee['tpa_id'])) { ?>
<!-- <a href="<?= base_url('download-e-card/'). $employee['rand_string'] . "/0/1" ?>" class="dropdown-item" target="_blank"><i class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View E-Card</a> -->
<a class="dropdown-item" onclick="viewEcard(<?= $employee['employee_id'] ?>, '<?= $employee['emp_code'] ?>', <?= $employee['client_policy_id'] ?>, '<?= $employee['policy_no'] ?>')"><i class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View E-Card</a>
<?php } ?>
<?php if($employee['relationship'] == 'Self' && in_array($employee['policy_type_id'], [2,3,4,5]) && $employee['email_corporate'] != '' && $employee['emp_status'] == 'active' && $employee['status'] == 'active' && !empty($employee['tpa_id'])) { ?>
<?php if($employee['relationship'] == 'Self' && in_array($employee['policy_type_id'], [2,3,4,5]) && $employee['email_corporate'] != '' && in_array($employee['emp_status'], ['active', 'expired']) && in_array($employee['status'], ['active', 'expired']) && !empty($employee['tpa_id'])) { ?>
<a class="dropdown-item" onclick="send_mail_for_individual_employee_ecard('<?= $employee['id'];?>', '<?= $employee['client_policy_id'];?>')" ><i class="mdi mdi-email-alert mr-2 text-muted font-18 vertical-middle"></i>Send E-Card Mail</a>
<?php } ?>
<?php if($employee['relationship'] == 'Self' && in_array($employee['policy_type_id'], [2,3,4,5]) && $employee['emp_status'] == 'active' && $employee['status'] == 'active' && !empty($employee['tpa_id'])) { ?>
<?php if($employee['relationship'] == 'Self' && in_array($employee['policy_type_id'], [2,3,4,5]) && in_array($employee['emp_status'], ['active', 'expired']) && in_array($employee['status'], ['active', 'expired']) && !empty($employee['tpa_id'])) { ?>
<a class="dropdown-item" onclick="showReGenerateConfirmation('<?= $employee['client_policy_id'];?>', '<?= $employee['emp_code'];?>')" ><i class="mdi mdi-refresh mr-2 text-muted font-18 vertical-middle"></i>Re-Generate E-Card</a>
<?php } ?>
<?php if($employee['is_addon'] == 3 && $employee['policy_type_id'] == 3 && $employee['emp_status'] == 'active' && $employee['status'] == 'active' && !empty($employee['tpa_id'])) { ?>
<?php if($employee['is_addon'] == 3 && $employee['policy_type_id'] == 3 && in_array($employee['emp_status'], ['active', 'expired']) && in_array($employee['status'], ['active', 'expired']) && !empty($employee['tpa_id'])) { ?>
<a class="dropdown-item" onclick="showReGenerateConfirmation('<?= $employee['client_policy_id'];?>', '<?= $employee['emp_code'];?>')" ><i class="mdi mdi-refresh mr-2 text-muted font-18 vertical-middle"></i>Re-Generate E-Card</a>
<?php } ?>