FIX_LIVE_ISSUES
This commit is contained in:
parent
726c9b7c16
commit
b163f3220e
@ -427,6 +427,7 @@ $routes->group("/util", ["filter" => "authMVC"], function ($routes) {
|
||||
$routes->get('checkDuplicateCdAccount', 'MasterController::checkDuplicateCdAccount');
|
||||
$routes->get('proceedExcelFileDataValidation', 'EmployeeController::proceedExcelFileDataValidation');
|
||||
$routes->get('checkTpaApiEnable', 'EmployeeRestController::checkTpaApiEnable');
|
||||
$routes->get('generateDemographyDataTable', 'LeadsController::generateDemographyDataTable');
|
||||
});
|
||||
|
||||
$routes->post("policy_tranction/sendInstallmentRemainderMail","PolicyTransactionController::sendInstallmentRemainderMail");
|
||||
@ -525,7 +526,6 @@ $routes->cli('cli/check_env', 'MasterController::checkEnv');
|
||||
$routes->cli('cli/enrollOpendAndClose', 'DashboardController::updatePolicyEnrollmentStatus');
|
||||
$routes->cli("cli/sendCroneRemainderMail", "DashboardController::sendCroneRemainderMail");
|
||||
$routes->cli('cli/update-emp-policy-status', 'ClientController::updateEmpAndPolicyStatus');
|
||||
$routes->cli('cli/update-emp-policy-status', 'ClientController::updateEmpAndPolicyStatus');
|
||||
$routes->cli('cli/insurerRFQRemainder', 'LeadsController::remainderForQcr');
|
||||
$routes->cli('cli/sendMailWithAutoQuery','TicketController::sendMailWithAutoQuery');
|
||||
$routes->cli('cli/MediAssit-ClaimStatusUpdate','MediAssistApiController::ClaimStatusUpdate');
|
||||
|
||||
@ -6091,6 +6091,8 @@ class ClientController extends AdminController
|
||||
// $response = $ticketServiceController->getClaimExcelErrorData(["file_id" => 41]);
|
||||
// $response = $ticketServiceController->claimDumpOnBoardProcess(["file_id" => 17]);
|
||||
// $response = $ticketServiceController->extractExcelData("claims_dump_form_client.xlsx");
|
||||
// $response = $ticketServiceController->tpaClaimDumpImporter(["file_id" => 48]);
|
||||
// $response = $ticketServiceController->tpaClaimDumpToTicketMasterImporters(["file_id" => 48]);
|
||||
// dd($response);
|
||||
|
||||
// ---------- TICKET CONTROLLER --------------------------------------------------------------------------------
|
||||
@ -6105,7 +6107,8 @@ class ClientController extends AdminController
|
||||
$empServiceController = new EmployeeServiceController();
|
||||
// $res = $empServiceController->excelFileFormatValidation(['file_id' => '1248']);
|
||||
// $res = $empServiceController->excelFileDataValidation(['file_id' => '1252']);
|
||||
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => 1183]);
|
||||
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => 1263]);
|
||||
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => 1262]);
|
||||
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => 1169]);
|
||||
// $res = $empServiceController->employeesOnboardProcess(['file_id' => 835]);
|
||||
// $res = $empServiceController->employeesEnrollmentInsert(['file_id' => 836]);
|
||||
@ -6231,8 +6234,8 @@ class ClientController extends AdminController
|
||||
// $res = $LeadsController->convertQCRJsonToPolicyTerms($jsonArray, $policy_type, $proposel_name, $insurer_name);
|
||||
// $res = $LeadsController->handleMemberDataGPATotalSumInsurerFromExcel(['lead_id' => 169]);
|
||||
// $res = $LeadsController->reorderProposalsByInsurerTotal($jsonArray);
|
||||
// $res = $LeadsController->calculateMembersDemography(['lead_id' => 326]);
|
||||
// $res = $LeadsController->generateDemographyDataTable(['lead_id' => 326]);
|
||||
// $res = $LeadsController->calculateMembersDemography(['lead_id' => 287], "internal");
|
||||
// $res = $LeadsController->generateDemographyDataTable(['lead_id' => 287]);
|
||||
// echo $res;
|
||||
// dd($res);
|
||||
|
||||
|
||||
@ -392,7 +392,7 @@ class EmployeeController extends AdminController
|
||||
CONCAT(
|
||||
(
|
||||
SELECT lc.name
|
||||
FROM level_contect lc
|
||||
FROM level_contacts lc
|
||||
WHERE lc.id = files.hr_id
|
||||
LIMIT 1
|
||||
),
|
||||
|
||||
@ -1136,7 +1136,7 @@ class LeadsController extends BaseController
|
||||
|
||||
// 12. Conditional rendering based on lead_form_type
|
||||
if ($lead_data['lead_form_type'] == 1) {
|
||||
$data['demogrphy_html_data'] = $this->generateDemographyDataTable(['lead_id' => $id]);
|
||||
// $data['demogrphy_html_data'] = $this->generateDemographyDataTable(['lead_id' => $id]);
|
||||
$this->loadLayout('view_rfq.php', $data);
|
||||
} else if ($lead_data['lead_form_type'] == 2) {
|
||||
$data['occupancy'] = $this->occupancyModel->findAll();
|
||||
@ -5384,8 +5384,13 @@ class LeadsController extends BaseController
|
||||
return [];
|
||||
}
|
||||
|
||||
public function generateDemographyDataTable($param)
|
||||
{
|
||||
public function generateDemographyDataTable($param = [])
|
||||
{
|
||||
|
||||
if ($this->request !== null) {
|
||||
$param['lead_id'] = $this->request->getGet('lead_id');
|
||||
}
|
||||
|
||||
$returnData = $this->calculateMembersDemography($param, "internal");
|
||||
|
||||
$html = "";
|
||||
@ -5431,6 +5436,14 @@ class LeadsController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->request !== null) {
|
||||
if(!empty($html)){
|
||||
return $this->respond(['status' => true, 'data' => $html], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false, 'data' => $html], 200);
|
||||
}
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
@ -1884,7 +1884,7 @@ if (!function_exists('premium_calculation_manager')) {
|
||||
|
||||
}
|
||||
// if the family floater case first self add first the process completed, after spouse or any dependent add the rata premium not added this change will handle this
|
||||
if (strtolower($emp_data['relationship']) != 'self' && $temp_slab_rates[0]['premium_type'] == 1 && $emp_data['temp']['action'] == 'DA') {
|
||||
if (strtolower($emp_data['relationship']) != 'self' && empty($emp_data['temp']['acting_self']) && $temp_slab_rates[0]['premium_type'] == 1 && $emp_data['temp']['action'] == 'DA') {
|
||||
//set dependent si to 0
|
||||
$emp_data['policy_details']['basic_cover_si'] = 0;
|
||||
$emp_data['policy_details']['premium'] = 0;
|
||||
@ -1897,7 +1897,7 @@ if (!function_exists('premium_calculation_manager')) {
|
||||
$emp_data['policy_details']['gst'] = (float) number_format(($emp_data['policy_details']['rata_premimum'] * ($gst / 100)), 2, '.', '');
|
||||
}
|
||||
|
||||
}else if(strtolower($emp_data['relationship']) != 'self' && $temp_slab_rates[0]['premium_type'] == 1 && ($emp_data['temp']['action'] == 'I' || $emp_data['temp']['action'] == 'A' || $emp_data['temp']['action'] == 'MI')){
|
||||
}else if(strtolower($emp_data['relationship']) != 'self' && empty($emp_data['temp']['acting_self']) && $temp_slab_rates[0]['premium_type'] == 1 && ($emp_data['temp']['action'] == 'I' || $emp_data['temp']['action'] == 'A' || $emp_data['temp']['action'] == 'MI')){
|
||||
|
||||
$emp_data['policy_details']['basic_cover_si'] = 0;
|
||||
$emp_data['policy_details']['premium'] = 0;
|
||||
|
||||
@ -2568,8 +2568,10 @@
|
||||
pt.action_type as action_type_string,
|
||||
|
||||
c.client_name,
|
||||
c.id as client_id,
|
||||
c.short_name AS client_short_name,
|
||||
cb.branch_name AS client_branch_name,
|
||||
cb.id AS client_branch_id,
|
||||
cb.address1 AS client_address,
|
||||
ptype.policy_type,
|
||||
ptype.bap,
|
||||
@ -2577,6 +2579,7 @@
|
||||
ins.name AS insurer_name,
|
||||
ins.short_name AS insurer_short_name,
|
||||
ib.branch_name AS insurer_branch_name,
|
||||
ib.id AS insurer_branch_id,
|
||||
ib.branch_code AS insurer_branch_code,
|
||||
|
||||
created_user.first_name AS user_name,
|
||||
@ -2734,8 +2737,10 @@
|
||||
pt.action_type as action_type_string,
|
||||
|
||||
c.client_name,
|
||||
c.id as client_id,
|
||||
c.short_name AS client_short_name,
|
||||
cb.branch_name AS client_branch_name,
|
||||
cb.id AS client_branch_id,
|
||||
cb.address1 AS client_address,
|
||||
ptype.policy_type,
|
||||
ptype.bap,
|
||||
@ -2743,6 +2748,7 @@
|
||||
ins.name AS insurer_name,
|
||||
ins.short_name AS insurer_short_name,
|
||||
ib.branch_name AS insurer_branch_name,
|
||||
ib.id AS insurer_branch_id,
|
||||
ib.branch_code AS insurer_branch_code,
|
||||
|
||||
created_user.first_name as user_name,
|
||||
@ -3002,13 +3008,14 @@
|
||||
|
||||
public function getBDSReportList($start_date = 0, $end_date = 0, $client_id = 0, $insurer_id = 0, $policy_type_id = 0, $date_type = 0, $issuer = 0, $client_branch_id = 0, $insurer_branch_id = 0, $client_policy_id = 0, $user_id = 0, $where = [])
|
||||
{
|
||||
|
||||
$whereAdded = false;
|
||||
$statement_month_condition = '';
|
||||
if ($date_type == 'statement_month' && $start_date != 0 && $end_date != 0) {
|
||||
$statement_month_condition = "
|
||||
WHERE statement_month >= '" . $start_date . "'
|
||||
AND statement_month <= '" . $end_date . "'
|
||||
";
|
||||
$whereAdded = true;
|
||||
}
|
||||
|
||||
$default_date_filter = '';
|
||||
@ -3098,6 +3105,33 @@
|
||||
$conditions .= " AND pt.issuer = $issuer ";
|
||||
}
|
||||
|
||||
$main_conditions = '';
|
||||
function addCondition(&$main_conditions, &$whereAdded, $condition)
|
||||
{
|
||||
if (!$whereAdded) {
|
||||
$main_conditions .= " WHERE $condition ";
|
||||
$whereAdded = true;
|
||||
} else {
|
||||
$main_conditions .= " AND $condition ";
|
||||
}
|
||||
}
|
||||
|
||||
// 4. Common filters
|
||||
if ($client_id != 0) {
|
||||
addCondition($main_conditions, $whereAdded, "client_id = $client_id");
|
||||
}
|
||||
|
||||
if ($insurer_id != 0) {
|
||||
addCondition($main_conditions, $whereAdded, "insurer_id = $insurer_id");
|
||||
}
|
||||
|
||||
if ($client_branch_id != 0) {
|
||||
addCondition($main_conditions, $whereAdded, "client_branch_id = $client_branch_id");
|
||||
}
|
||||
|
||||
if ($insurer_branch_id != 0) {
|
||||
addCondition($main_conditions, $whereAdded, "insurer_branch_id = $insurer_branch_id");
|
||||
}
|
||||
|
||||
$sql = "
|
||||
SELECT * FROM (
|
||||
@ -3137,8 +3171,10 @@
|
||||
pt.action_type as action_type_string,
|
||||
|
||||
c.client_name,
|
||||
c.id as client_id,
|
||||
c.short_name AS client_short_name,
|
||||
cb.branch_name AS client_branch_name,
|
||||
cb.id AS client_branch_id,
|
||||
cb.address1 AS client_address,
|
||||
ptype.policy_type,
|
||||
ptype.bap,
|
||||
@ -3146,6 +3182,7 @@
|
||||
ins.name AS insurer_name,
|
||||
ins.short_name AS insurer_short_name,
|
||||
ib.branch_name AS insurer_branch_name,
|
||||
ib.id AS insurer_branch_id,
|
||||
ib.branch_code AS insurer_branch_code,
|
||||
|
||||
created_user.first_name AS user_name,
|
||||
@ -3294,8 +3331,10 @@
|
||||
pt.action_type as action_type_string,
|
||||
|
||||
c.client_name,
|
||||
c.id as client_id,
|
||||
c.short_name AS client_short_name,
|
||||
cb.branch_name AS client_branch_name,
|
||||
cb.id AS client_branch_id,
|
||||
cb.address1 AS client_address,
|
||||
ptype.policy_type,
|
||||
ptype.bap,
|
||||
@ -3303,6 +3342,7 @@
|
||||
ins.name AS insurer_name,
|
||||
ins.short_name AS insurer_short_name,
|
||||
ib.branch_name AS insurer_branch_name,
|
||||
ib.id AS insurer_branch_id,
|
||||
ib.branch_code AS insurer_branch_code,
|
||||
|
||||
created_user.first_name as user_name,
|
||||
@ -3479,8 +3519,10 @@
|
||||
pt.action_type as action_type_string,
|
||||
|
||||
c.client_name,
|
||||
c.id as client_id,
|
||||
c.short_name AS client_short_name,
|
||||
cb.branch_name AS client_branch_name,
|
||||
cb.id AS client_branch_id,
|
||||
cb.address1 AS client_address,
|
||||
ptype.policy_type,
|
||||
ptype.bap,
|
||||
@ -3488,6 +3530,7 @@
|
||||
ins.name AS insurer_name,
|
||||
ins.short_name AS insurer_short_name,
|
||||
ib.branch_name AS insurer_branch_name,
|
||||
ib.id AS insurer_branch_id,
|
||||
ib.branch_code AS insurer_branch_code,
|
||||
|
||||
created_user.first_name as user_name,
|
||||
@ -3616,6 +3659,7 @@
|
||||
) AS final_result
|
||||
|
||||
$statement_month_condition
|
||||
$main_conditions
|
||||
-- GROUP BY statement_month, insurer_name, policy_no
|
||||
-- WHERE id = 6143
|
||||
|
||||
@ -3631,7 +3675,7 @@
|
||||
$result = $query->getResultArray();
|
||||
// $countofalldata = count($result);
|
||||
// dd($result);
|
||||
// dd($this->db->getLastQuery());
|
||||
// dd($this->db->getLastQuery()->getQuery());
|
||||
|
||||
$keys = [];
|
||||
$filtered = [];
|
||||
|
||||
@ -1059,7 +1059,7 @@
|
||||
<button type="button" id="close_btn" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div style='max-height: 400px; overflow-y: auto; margin-bottom: 30px;'>
|
||||
<div style='max-height: 400px; overflow-y: auto; margin-bottom: 30px;' id="demography_modal_body">
|
||||
<?php
|
||||
if(isset($demogrphy_html_data) && !empty($demogrphy_html_data)){
|
||||
echo $demogrphy_html_data;
|
||||
@ -7302,11 +7302,11 @@ function appendMultiFileData(data) {
|
||||
}, 2000)
|
||||
})
|
||||
|
||||
function viewDemography(){
|
||||
// Show the modal
|
||||
const myModal = new bootstrap.Modal(document.getElementById('view_demography_modal'));
|
||||
myModal.show();
|
||||
}
|
||||
// function viewDemography(){
|
||||
// // Show the modal
|
||||
// const myModal = new bootstrap.Modal(document.getElementById('view_demography_modal'));
|
||||
// myModal.show();
|
||||
// }
|
||||
|
||||
function viewDocs(){
|
||||
// Show the modal
|
||||
@ -7643,6 +7643,63 @@ function appendMultiFileData(data) {
|
||||
}, 2000); // check every 2 seconds
|
||||
}
|
||||
|
||||
function viewDemography() {
|
||||
|
||||
let lead_id = $('#lead_id').val();
|
||||
console.log('lead_id ', lead_id);
|
||||
|
||||
if (!lead_id) {
|
||||
console.error("Lead ID is required");
|
||||
return;
|
||||
}
|
||||
|
||||
let url = '<?= base_url('util/generateDemographyDataTable') ?>';
|
||||
|
||||
// Data to send in the AJAX request
|
||||
let requestData = {
|
||||
lead_id: lead_id,
|
||||
};
|
||||
|
||||
// Show loader
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
|
||||
// Send AJAX request
|
||||
sendAjaxRequestForGlobal(url, 'GET', requestData, function(res) {
|
||||
|
||||
$('#demography_modal_body').empty();
|
||||
|
||||
if (res.status) {
|
||||
$('#demography_modal_body').append(res.data);
|
||||
} else {
|
||||
$('#demography_modal_body').append("<p style='text-align: center; color: #6c757d; font-style: italic;'>No Demography Data Found or Wrong File</p>")
|
||||
}
|
||||
|
||||
// Show the modal
|
||||
const myModal = new bootstrap.Modal(document.getElementById('view_demography_modal'));
|
||||
myModal.show();
|
||||
|
||||
// Hide loader
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
|
||||
}, function(xhr, status, error) {
|
||||
$('#demography_modal_body').append("<p style='text-align: center; color: #6c757d; font-style: italic;'>No Demography Data Found or Wrong File</p>")
|
||||
|
||||
// Show the modal
|
||||
const myModal = new bootstrap.Modal(document.getElementById('view_demography_modal'));
|
||||
myModal.show();
|
||||
|
||||
console.error('Error fetching data:', error);
|
||||
console.error(xhr.responseText);
|
||||
// toastr.error('An error occurred while fetching demography.', 'ERROR');
|
||||
// Hide loader
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function toggleButtons(status) {
|
||||
if (status === "failed") {
|
||||
$("#send_mail_btn").hide();
|
||||
@ -7658,4 +7715,6 @@ function appendMultiFileData(data) {
|
||||
this.value = (v < 0) ? 0 : (v > 100 ? 100 : v);
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user