Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
velz 2024-11-27 12:01:22 +05:30
commit 808fdfc247
6 changed files with 158 additions and 99 deletions

View File

@ -2138,11 +2138,15 @@ class ClientController extends AdminController
$data['congenitaldiseasesinternal'] = str_replace(',', '', $this->request->getPost("congenitaldiseasesinternal"));
// $data['congenitaldiseasesexternal'] =$this->request->getPost("congenitaldiseasesexternal");
$data['copayzonewisecopay'] = $this->request->getPost("copayzonewisecopay");
$data['co_pay_details'] = str_replace(',', '', $this->request->getPost("co_pay_details"));
$data['bioabsorbablestenttoriclensmultifocallens'] = $this->request->getPost("bioabsorbablestenttoriclensmultifocallens");
$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['ailmentcapping'] = $this->request->getPost("ailmentcapping");
$data['ailment_capping_details'] = str_replace(',', '', $this->request->getPost("ailment_capping_details"));
$data['ambulancecharges'] = str_replace(',', '', $this->request->getPost("ambulancecharges"));
$data['airambulance'] = str_replace(',', '', $this->request->getPost("airambulance"));
$data['familytransportationbenefit'] = str_replace(',', '', $this->request->getPost("familytransportationbenefit"));
@ -2151,7 +2155,7 @@ class ClientController extends AdminController
$data['ayudhtreatmentcover'] = str_replace(',', '', $this->request->getPost("ayudhtreatmentcover"));
$data['congenitaldiseasesexternal'] = str_replace(',', '', $this->request->getPost("congenitaldiseasesexternal"));
$data['optionalparentalcopay'] = str_replace(',', '', $this->request->getPost("optionalparentalcopay"));
// $data['optionalparentalcopay'] = str_replace(',', '', $this->request->getPost("optionalparentalcopay"));
$data['posthospitalizationcover'] = str_replace(',', '', $this->request->getPost("posthospitalizationcover"));
$data['corporatebuffer'] = str_replace(',', '', $this->request->getPost("corporatebuffer"));
$data['sublimitofcorporatebuffer'] = str_replace(',', '', $this->request->getPost("sublimitofcorporatebuffer"));

View File

@ -1795,9 +1795,21 @@ class EmployeeController extends AdminController
// 'client_id' => 77,
// 'client_policy_id' => 203,
// 'client_branch_id' => 53,
// 'insurer_or_tpa' => 'tpa',
// ];
// $batch_data['insurer_or_tpa'] = 'insurer';
// $batch_data['insurer_or_tpa'] = 'tpa';
//INCEPTION
// $result = $this->employeePolicyModel->getInceptionEmployeeDataForExportExcel($batch_data);
// CORRECTION
// $result = $this->employeePolicyModel->getCorrectionEmployeesDataForExportExcel($batch_data);
//SI-ENHANCEMENT
// $result = $this->employeePolicyModel->getSIEnhancementEmployeesDataForExportExcel($batch_data);
//DELETION
// $result = $this->employeePolicyModel->getDeletionEmployeeDataForExportExcel($batch_data);
// print_rr($result); die;

View File

@ -331,6 +331,8 @@ class EmployeePolicyModel extends Model
$client_branch_id = $ref_data['client_branch_id'];
$insurer_or_tpa = $ref_data['insurer_or_tpa'];
$endorsement_condition = "{$insurer_or_tpa}" === 'tpa' ? "AND (emp_endorsement.endorsement_id IS NOT NULL OR emp_endorsement.endorsement_id != '')" : "AND (emp_endorsement.endorsement_id IS NULL OR emp_endorsement.endorsement_id = '')";
$sql = "
SELECT DISTINCT
emp_endorsement.id,
@ -389,13 +391,14 @@ class EmployeePolicyModel extends Model
AND employee_polices.client_policy_id = '{$client_policy_id}'
AND employees.client_branch_id = '{$client_branch_id}'
AND emp_endorsement.actions = 'c'
AND emp_endorsement.status != 'truncated'
AND employee_polices.is_active = 1
AND employee_polices.status = 'active'
AND employees.is_active = 1
AND employees.emp_status = 'active'
AND (employee_polices.tpa_id IS NOT NULL AND employee_polices.tpa_id != '')
AND (employee_polices.uhid IS NOT NULL AND employee_polices.uhid != '')
AND (emp_endorsement.endorsement_id IS NULL OR emp_endorsement.endorsement_id = '')";
$endorsement_condition";
// Execute the raw query
$query = $this->db->query($sql);
@ -403,6 +406,8 @@ class EmployeePolicyModel extends Model
// Get the result set
$result = $query->getResult();
// dd($this->db->getLastQuery(), $result);
return $result;
}
@ -416,6 +421,9 @@ class EmployeePolicyModel extends Model
$client_branch_id = $ref_data['client_branch_id'];
$insurer_or_tpa = $ref_data['insurer_or_tpa'];
$endorsement_condition = "{$insurer_or_tpa}" === 'tpa' ? "AND (a.endorsement_id IS NOT NULL OR a.endorsement_id != '')" : "AND (a.endorsement_id IS NULL OR a.endorsement_id = '')";
$query = $this->db->query("
SELECT
a.id as endorsement_primarykey,
@ -528,8 +536,9 @@ class EmployeePolicyModel extends Model
WHERE employee_polices.client_policy_id = '{$client_policy_id}'
AND employees.client_branch_id = '{$client_branch_id}'
AND (a.endorsement_id IS NULL OR a.endorsement_id = '')
$endorsement_condition
AND a.actions = 'si'
AND a.status != 'truncated'
AND employee_polices.is_active = 1
AND employee_polices.status = 'active'
AND employees.is_active = 1
@ -539,6 +548,7 @@ class EmployeePolicyModel extends Model
// Get the result set
$results = $query->getResult();
// dd($this->db->getLastQuery(), $results);
return $results;
}

View File

@ -137,6 +137,7 @@
<?php } ?>
</select>
</div>
<div class="form-group col-md-5">
<label for="event_name">Event<span class="text-danger">*</span></label>
<select name="event" class="form-control" id="event" required>
@ -209,7 +210,8 @@
<div class="modal-body">
<div class="form-row">
<div class="form-group col-md-12">
<!-- <div class="form-group col-md-12">
<label for="event_name">Event<span class="text-danger">*</span></label>
<select class="form-control" name="event_name_for_duplicate" id="event_name_for_duplicate">
<option value="">Select</option>
@ -221,7 +223,20 @@
<option value="si_enhancement">SI Enhancement</option>
<option value="si_enhancement">All</option>
</select>
</div> -->
<div class="form-group col-md-12">
<label for="event_name">Event<span class="text-danger">*</span></label>
<select name="event_name_for_duplicate" class="form-control" id="event_name_for_duplicate" required>
<option value="">Select</option>
<?php if (!empty($events)){ ?>
<?php foreach ($events as $key => $event) { ?>
<option value="<?= $key ?>"><?= $event?></option>
<?php } ?>
<?php } ?>
</select>
</div>
</div>
<div class="form-group text-right m-b-0" id="hide_smbt_btn">

View File

@ -53,72 +53,74 @@ table.dataTable tbody td {
</div>
</div>
<div>
<table class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
<div class="table-responsive">
<table class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th><div class="column-header">S.No.</div></th>
<th><div class="column-header">Lead Type</div></th>
<th><div class="column-header">Issuer</div></th>
<th><div class="column-header">Client Type</div></th>
<th><div class="column-header">Client / Branch</div></th>
<th><div class="column-header">Entity Type</div></th>
<th><div class="column-header">Branch Name</div></th>
<th><div class="column-header">Branch Code</div></th>
<th><div class="column-header">Contact Person Name</div></th>
<th><div class="column-header">Contact Person Mobile</div></th>
<th><div class="column-header">Policy Type</div></th>
<th><div class="column-header">Status</div></th>
<th><div class="column-header">Action</div></th>
</tr>
</thead>
<tbody>
<?php if(isset($lead_data_list)) { ?>
<?php foreach($lead_data_list as $index => $row){ ?>
<thead class="bg-light">
<tr>
<td><?php echo $index + 1; ?></td>
<td><?php echo $lead_type[$row['lead_type']] ?? '-'; ?></td>
<td><?php echo $issuer[$row['issuer']] ?? '-'; ?></td>
<td><?php echo $client_type[$row['client_type']] ?? '-'; ?></td>
<td><?php echo $row['client_type'] == 2 ? ($row['client_name'] ?? '-') : (($row['client_short_name'] ?? '-') . ' - ' . ($row['branch_name'] ?? '-')); ?></td>
<td><?php echo $row['entity_type'] ?? '-'; ?></td>
<td><?php echo $row['branch_name'] ?? '-'; ?></td>
<td><?php echo $row['branch_code'] ?? '-'; ?></td>
<td><?php echo $row['contact_person_name'] ?? '-'; ?></td>
<td><?php echo $row['contact_person_mobile'] ?? '-'; ?></td>
<td><?php echo $row['policy_type'] ?? '-'; ?></td>
<td><?php echo $lead_status[$row['status']] ?? '-'; ?></td>
<td>
<div class="btn-group dropdown">
<a href="javascript:void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false">
<i class="mdi mdi-dots-horizontal"></i>
</a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item btnEdit" data-id="<?= $row['id']; ?>" onclick="getLeadsDataForEdit('<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')">
<i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit
<th><div class="column-header">S.No.</div></th>
<th><div class="column-header">Lead Type</div></th>
<th><div class="column-header">Issuer</div></th>
<th><div class="column-header">Client Type</div></th>
<th><div class="column-header">Client / Branch</div></th>
<th><div class="column-header">Entity Type</div></th>
<th><div class="column-header">Branch Name</div></th>
<th><div class="column-header">Branch Code</div></th>
<th><div class="column-header">Contact Person Name</div></th>
<th><div class="column-header">Contact Person Mobile</div></th>
<th><div class="column-header">Policy Type</div></th>
<th><div class="column-header">Status</div></th>
<th><div class="column-header">Action</div></th>
</tr>
</thead>
<tbody>
<?php if(isset($lead_data_list)) { ?>
<?php foreach($lead_data_list as $index => $row){ ?>
<tr>
<td><?php echo $index + 1; ?></td>
<td><?php echo $lead_type[$row['lead_type']] ?? '-'; ?></td>
<td><?php echo $issuer[$row['issuer']] ?? '-'; ?></td>
<td><?php echo $client_type[$row['client_type']] ?? '-'; ?></td>
<td><?php echo $row['client_type'] == 2 ? ($row['client_name'] ?? '-') : (($row['client_short_name'] ?? '-') . ' - ' . ($row['branch_name'] ?? '-')); ?></td>
<td><?php echo $row['entity_type'] ?? '-'; ?></td>
<td><?php echo $row['branch_name'] ?? '-'; ?></td>
<td><?php echo $row['branch_code'] ?? '-'; ?></td>
<td><?php echo $row['contact_person_name'] ?? '-'; ?></td>
<td><?php echo $row['contact_person_mobile'] ?? '-'; ?></td>
<td><?php echo $row['policy_type'] ?? '-'; ?></td>
<td><?php echo $lead_status[$row['status']] ?? '-'; ?></td>
<td>
<div class="btn-group dropdown">
<a href="javascript:void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false">
<i class="mdi mdi-dots-horizontal"></i>
</a>
<a href="<?= base_url('/rfq/list/').$row['id'] . '/' . 1; ?>" class="dropdown-item btnEdit" data-id="<?= $row['id']; ?>">
<i class="mdi mdi-note-text mr-2 text-muted font-18 vertical-middle"></i>RFQ
</a>
<?php if($row['qcr_count'] > 0) { ?>
<a href="<?= base_url('/rfq/list/').$row['id'] . '/' . 2; ?>" class="dropdown-item btnEdit" data-id="<?= $row['id']; ?>">
<i class="mdi mdi-note-text mr-2 text-muted font-18 vertical-middle"></i>QCR
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item btnEdit" data-id="<?= $row['id']; ?>" onclick="getLeadsDataForEdit('<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')">
<i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit
</a>
<?php } ?>
<a href="<?= base_url('/rfq/list/').$row['id'] . '/' . 1; ?>" class="dropdown-item btnEdit" data-id="<?= $row['id']; ?>">
<i class="mdi mdi-note-text mr-2 text-muted font-18 vertical-middle"></i>RFQ
</a>
<?php if($row['qcr_count'] > 0) { ?>
<a href="<?= base_url('/rfq/list/').$row['id'] . '/' . 2; ?>" class="dropdown-item btnEdit" data-id="<?= $row['id']; ?>">
<i class="mdi mdi-note-text mr-2 text-muted font-18 vertical-middle"></i>QCR
</a>
<?php } ?>
</div>
</div>
</div>
</td>
</tr>
</td>
</tr>
<?php } ?>
<?php } else { ?>
<tr>
<td colspan="14" class="text-center">No data available</td>
</tr>
<?php } ?>
<?php } else { ?>
<tr>
<td colspan="14" class="text-center">No data available</td>
</tr>
<?php } ?>
</tbody>
</table>
</tbody>
</table>
</div>
</div>
</div>
</div>
@ -174,7 +176,7 @@ $(document).ready(function() {
if (ticketsTable.length) {
ticketsTable.DataTable({
scrollX: true,
// scrollX: true,
dom: "<'row'<'col-sm-6'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector

View File

@ -341,43 +341,18 @@
<label for="totalSumInsured">Co-Pay/Zone wise Co Pay</label>
</div>
<div class="col-md-6">
<select name="copayzonewisecopay" id="copayzonewisecopay" class="form-control ">
<option value="">Select an option</option>
<option value="Nil">Nil</option>
<option value="5%">5%</option>
<option value="10%">10%</option>
<option value="15%">15%</option>
<option value="20%">20%</option>
<option value="25%">25%</option>
<option value="30%">30%</option>
<option value="35%">35%</option>
<option value="40%">40%</option>
<option value="45%">45%</option>
<option value="50%">50%</option>
</select>
<input type="radio" name="copayzonewisecopay" class="copayzonewisecopay" value="1"> Yes
<input type="radio" name="copayzonewisecopay" class="copayzonewisecopay" value="0" style="margin-left:10px"> No
</div>
</div>
<div class="row" style="margin-bottom: 10px;">
<div class="col-md-6">
<label for="totalSumInsured">Optional Parental Co-Pay</label>
<div class="row" style="margin-bottom: 10px;display:none;">
<div class="col-md-6">
<label for="totalSumInsured">Co-pay Details</label>
</div>
<div class="col-md-6">
<select name="optionalparentalcopay" id="optionalparentalcopay" class="form-control ">
<option value="">Select an option</option>
<option value="Nil">Nil</option>
<option value="5%">5%</option>
<option value="10%">10%</option>
<option value="15%">15%</option>
<option value="20%">20%</option>
<option value="25%">25%</option>
<option value="30%">30%</option>
<option value="35%">35%</option>
<option value="40%">40%</option>
<option value="45%">45%</option>
<option value="50%">50%</option>
</select>
</div>
<input type="text" name="co_pay_details" id="co_pay_details" class="form-control">
</div>
</div>
<div class="row" style="margin-bottom: 10px;">
@ -430,6 +405,15 @@
</div>
</div>
<div class="row" style="margin-bottom: 10px;display:none;">
<div class="col-md-6">
<label for="totalSumInsured">Ailment capping Details</label>
</div>
<div class="col-md-6">
<input type="text" name="ailment_capping_details" id="ailment_capping_details" class="form-control">
</div>
</div>
<div class="row" style="margin-bottom: 10px;">
<div class="col-md-6">
<label for="totalSumInsured">Corporate Buffer</label>
@ -705,6 +689,34 @@
}
});
$('input[name="ailmentcapping"]').change(function() {
////console.log($(this).val());
if ($(this).val() == '1') {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "");
} else {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "none");
}
});
$('input[name="copayzonewisecopay"]').change(function() {
////console.log($(this).val());
if ($(this).val() == '1') {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "");
} else {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "none");
}
});
$('input[name="cataract"]').change(function() {
//console.log($(this).val());
@ -1067,6 +1079,10 @@
}else if(element.name === "ayudhtreatmentcover"){
element.parentElement.parentElement.nextElementSibling.style.display = '';
}else if(element.name === "ailmentcapping"){
element.parentElement.parentElement.nextElementSibling.style.display = '';
}else if(element.name === "copayzonewisecopay"){
element.parentElement.parentElement.nextElementSibling.style.display = '';
}else if(element.name === "cataract"){
element.parentElement.parentElement.nextElementSibling.style.display = '';
}