CHANGE_help_desk_tickets - VADIVEL J 2025-11-04 17:50
This commit is contained in:
parent
c44a3f05af
commit
e6911a06ab
@ -213,6 +213,7 @@ $routes->group("/master", ["filter" => "authMVC"], function ($routes) {
|
|||||||
$routes->post("edit", "MasterController::editInsurerBranch");
|
$routes->post("edit", "MasterController::editInsurerBranch");
|
||||||
$routes->get("editget/(:any)", "MasterController::editInsurerGet/$1");
|
$routes->get("editget/(:any)", "MasterController::editInsurerGet/$1");
|
||||||
$routes->get("list/(:any)", "MasterController::insurerBranchList/$1");
|
$routes->get("list/(:any)", "MasterController::insurerBranchList/$1");
|
||||||
|
$routes->post("getList", "MasterController::getInsurerBranchList");
|
||||||
$routes->get("remove/(:any)", "MasterController::removeInsurerBranch/$1");
|
$routes->get("remove/(:any)", "MasterController::removeInsurerBranch/$1");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -181,7 +181,7 @@ class BDSReportController extends AdminController
|
|||||||
'Client' => 'client'
|
'Client' => 'client'
|
||||||
];
|
];
|
||||||
|
|
||||||
$data['page_name'] = "IRBA Report";
|
$data['page_name'] = "IRDA Report";
|
||||||
|
|
||||||
return $this->loadLayout('irba_report', $data);
|
return $this->loadLayout('irba_report', $data);
|
||||||
} else {
|
} else {
|
||||||
@ -202,9 +202,11 @@ class BDSReportController extends AdminController
|
|||||||
$viewData = [];
|
$viewData = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$view_name = "bds_report_Insurer_wise_Data" ;
|
||||||
|
|
||||||
|
|
||||||
$html = view('bds_report_Insurer_wise_Data', $viewData);
|
$html = view('bds_report_Insurer_wise_Data', $viewData);
|
||||||
return $this->respond(['status' => true, 'html' => $html], 200);
|
return $this->respond(['status' => true, 'html' => $html , 'view_name' => $view_name], 200);
|
||||||
} else if ($report_type == 'bap') {
|
} else if ($report_type == 'bap') {
|
||||||
|
|
||||||
$life = $category == 'life' ? 1 : 0;
|
$life = $category == 'life' ? 1 : 0;
|
||||||
@ -217,33 +219,40 @@ class BDSReportController extends AdminController
|
|||||||
$viewData = [];
|
$viewData = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$view_name = "bds_report_bap_wise_data";
|
||||||
|
|
||||||
$html = view('bds_report_bap_wise_data', $viewData);
|
$html = view('bds_report_bap_wise_data', $viewData);
|
||||||
return $this->respond(['status' => true, 'html' => $html], 200);
|
return $this->respond(['status' => true, 'html' => $html , 'view_name' => $view_name], 200);
|
||||||
} else if ($report_type == 'bapInsurer') {
|
} else if ($report_type == 'bapInsurer') {
|
||||||
|
|
||||||
//Condition for BAP Insurer wise date
|
//Condition for BAP Insurer wise date
|
||||||
$category = $category == 'life' ? 1 : 0;
|
$category = $category == 'life' ? 1 : 0;
|
||||||
$viewData['data'] = $this->getBAPInsurerData($category, $fromDate, $toDate);
|
$viewData['data'] = $this->getBAPInsurerData($category, $fromDate, $toDate);
|
||||||
|
|
||||||
|
$view_name = "irda_bap_insurer_report_list";
|
||||||
|
|
||||||
$html = view('irda_bap_insurer_report_list', $viewData);
|
$html = view('irda_bap_insurer_report_list', $viewData);
|
||||||
return $this->respond(['status' => true, 'html' => $html], 200);
|
return $this->respond(['status' => true, 'html' => $html , 'view_name' => $view_name], 200);
|
||||||
} else if ($report_type == 'bapClient') {
|
} else if ($report_type == 'bapClient') {
|
||||||
|
|
||||||
//Condition for BAP Client wise date
|
//Condition for BAP Client wise date
|
||||||
$category = $category == 'life' ? 1 : 0;
|
$category = $category == 'life' ? 1 : 0;
|
||||||
$viewData['data'] = $this->getBAPClientData($category, $fromDate, $toDate);
|
$viewData['data'] = $this->getBAPClientData($category, $fromDate, $toDate);
|
||||||
|
|
||||||
|
$view_name = "irda_bap_client_report_list";
|
||||||
|
|
||||||
$html = view('irda_bap_client_report_list', $viewData);
|
$html = view('irda_bap_client_report_list', $viewData);
|
||||||
return $this->respond(['status' => true, 'html' => $html], 200);
|
return $this->respond(['status' => true, 'html' => $html , 'view_name' => $view_name], 200);
|
||||||
} else if ($report_type == 'client') {
|
} else if ($report_type == 'client') {
|
||||||
|
|
||||||
//Condition for Client wise date
|
//Condition for Client wise date
|
||||||
$category = $category == 'life' ? 1 : 0;
|
$category = $category == 'life' ? 1 : 0;
|
||||||
$viewData['data'] = $this->getClientData($category, $fromDate, $toDate);
|
$viewData['data'] = $this->getClientData($category, $fromDate, $toDate);
|
||||||
|
|
||||||
|
$view_name = "irda_client_report_list";
|
||||||
|
|
||||||
$html = view('irda_client_report_list', $viewData);
|
$html = view('irda_client_report_list', $viewData);
|
||||||
return $this->respond(['status' => true, 'html' => $html], 200);
|
return $this->respond(['status' => true, 'html' => $html , 'view_name' => $view_name], 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -932,8 +941,9 @@ class BDSReportController extends AdminController
|
|||||||
$data['client_type'] = [1 => 'Group', 2 => 'Individual'];
|
$data['client_type'] = [1 => 'Group', 2 => 'Individual'];
|
||||||
$data['renewal_data'] = $this->policyTransactionModel->getRenewalReportData($fromDate, $toDate, $client_type, $client_id, $issuer);
|
$data['renewal_data'] = $this->policyTransactionModel->getRenewalReportData($fromDate, $toDate, $client_type, $client_id, $issuer);
|
||||||
// print_r($data); die;
|
// print_r($data); die;
|
||||||
|
$view_name = "bds_renewal_report_list";
|
||||||
$html = view('bds_renewal_report_list', $data);
|
$html = view('bds_renewal_report_list', $data);
|
||||||
return $this->respond(['status' => true, 'html' => $html], 200);
|
return $this->respond(['status' => true, 'html' => $html , 'view_name' => $view_name], 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -354,6 +354,15 @@ class MasterController extends AdminController
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getInsurerBranchList()
|
||||||
|
{
|
||||||
|
$id = $this->request->getPost('insurer_id');
|
||||||
|
|
||||||
|
$insurer_branch_list = $this->insurerBranchModel->where(['insurer_id' => $id, 'is_active' => 1])->findAll()??[];
|
||||||
|
|
||||||
|
return $this->response->setJSON([ 'data' => $insurer_branch_list ])->setStatusCode(200);
|
||||||
|
}
|
||||||
|
|
||||||
public function editInsurerGeneralInfo()
|
public function editInsurerGeneralInfo()
|
||||||
{
|
{
|
||||||
$this->myLogger->logme('error','edit Insurer general info function called');
|
$this->myLogger->logme('error','edit Insurer general info function called');
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
// Get headers dynamically
|
// Get headers dynamically
|
||||||
$headers = array_keys($data[0]);
|
$headers = array_keys($data[0]);
|
||||||
foreach ($headers as $header): ?>
|
foreach ($headers as $header): ?>
|
||||||
<th><?= esc($header) ?></th>
|
<th><?= esc(str_replace('_', ' ', $header)) ?></th>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<th>TOTAL</th>
|
<th>TOTAL</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -19,6 +19,10 @@ table.dataTable tbody td {
|
|||||||
.right-align-input {
|
.right-align-input {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#scroll-horizontal-datatable tfoot .right-align-input {
|
||||||
|
text-align: right !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@ -84,6 +88,7 @@ table.dataTable tbody td {
|
|||||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
title: 'Insurer-Wise-Report-List',
|
title: 'Insurer-Wise-Report-List',
|
||||||
|
footer: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
@ -93,6 +98,7 @@ table.dataTable tbody td {
|
|||||||
orthogonal: 'sort'
|
orthogonal: 'sort'
|
||||||
},
|
},
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
|
footer: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,12 @@ table.dataTable tbody td {
|
|||||||
.right-align-input {
|
.right-align-input {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#scroll-horizontal-datatable tfoot .right-align-input {
|
||||||
|
text-align: right !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@ -84,6 +90,7 @@ table.dataTable tbody td {
|
|||||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
title: 'Bap-Wise-Report-List',
|
title: 'Bap-Wise-Report-List',
|
||||||
|
footer: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
@ -93,6 +100,7 @@ table.dataTable tbody td {
|
|||||||
},
|
},
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
title: 'Bap-Wise-Report-List',
|
title: 'Bap-Wise-Report-List',
|
||||||
|
footer: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,6 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div id="view_name"></div> -->
|
||||||
<div id="report"></div>
|
<div id="report"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -131,19 +132,26 @@
|
|||||||
var toDate = $('#endDate').val();
|
var toDate = $('#endDate').val();
|
||||||
var category = $('#category').val();
|
var category = $('#category').val();
|
||||||
var report_type = $('#report_type').val();
|
var report_type = $('#report_type').val();
|
||||||
|
|
||||||
|
if(category == false || report_type == false){
|
||||||
|
alert("Please Fill the Mandatory Fields Category and Report Type to Proceed ..!! ");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
var requestData = {
|
var requestData = {
|
||||||
fromDate: fromDate,
|
fromDate: fromDate,
|
||||||
toDate: toDate,
|
toDate: toDate,
|
||||||
category: category,
|
category: category,
|
||||||
report_type: report_type
|
report_type: report_type
|
||||||
};
|
};
|
||||||
console.log(typeof fromDate);
|
|
||||||
var url = '<?= base_url('/bdsReport/irba_report') ?>';
|
var url = '<?= base_url('/bdsReport/irba_report') ?>';
|
||||||
$('.loader').fadeIn();
|
$('.loader').fadeIn();
|
||||||
$('.loader-mask').fadeIn();
|
$('.loader-mask').fadeIn();
|
||||||
sendAjaxRequestForGlobal(url, 'POST', requestData, function(response) {
|
sendAjaxRequestForGlobal(url, 'POST', requestData, function(response) {
|
||||||
if (response.status == true) {
|
if (response.status == true) {
|
||||||
$('#report').html(response.html);
|
$('#report').html(response.html);
|
||||||
|
// $('#view_name').html(response.view_name);
|
||||||
$('.loader').fadeOut();
|
$('.loader').fadeOut();
|
||||||
$('.loader-mask').delay(350).fadeOut('slow');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,10 @@ table.dataTable tbody td {
|
|||||||
background-color: #ffffff; /* White shade */
|
background-color: #ffffff; /* White shade */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#scroll-horizontal-datatable tfoot .right-align-input {
|
||||||
|
text-align: right !important;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="col-12" id="second_page">
|
<div class="col-12" id="second_page">
|
||||||
@ -216,6 +220,7 @@ $(document).ready(function() {
|
|||||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
title: 'IRDA-BAP-CLIENT-List',
|
title: 'IRDA-BAP-CLIENT-List',
|
||||||
|
footer:true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
@ -225,6 +230,7 @@ $(document).ready(function() {
|
|||||||
orthogonal: 'sort'
|
orthogonal: 'sort'
|
||||||
},
|
},
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
|
footer:true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,6 +20,10 @@ table.dataTable tbody td {
|
|||||||
.right-align-input {
|
.right-align-input {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#scroll-horizontal-datatable tfoot .right-align-input {
|
||||||
|
text-align: right !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="col-12" id="second_page">
|
<div class="col-12" id="second_page">
|
||||||
@ -167,7 +171,7 @@ table.dataTable tbody td {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
<tfoot>
|
<tfoot align="right">
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>Grand Total</th>
|
<th>Grand Total</th>
|
||||||
@ -299,12 +303,14 @@ $(document).ready(function() {
|
|||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
extend: 'csv',
|
extend: 'csv',
|
||||||
|
footer:true,
|
||||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
title: 'IRDA-BAP-INSURER-List',
|
title: 'IRDA-BAP-INSURER-List',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
|
footer:true,
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
className: 'app-btn-primary ',
|
className: 'app-btn-primary ',
|
||||||
title: 'IRDA-BAP-INSURER-List',
|
title: 'IRDA-BAP-INSURER-List',
|
||||||
|
|||||||
@ -1523,6 +1523,8 @@
|
|||||||
submitButton.innerText = 'Submit';
|
submitButton.innerText = 'Submit';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeAttachment(id) {
|
function removeAttachment(id) {
|
||||||
|
|||||||
@ -40,24 +40,10 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
<!-- <div class="form-group col-md-3">
|
|
||||||
<label for="client_branch">Client<span class="text-danger"></span></label>
|
|
||||||
<select class="form-control" id="client_id" name="client_id">
|
|
||||||
<option value="0">Select Client</option>
|
|
||||||
<?php
|
|
||||||
if (isset($clients) && count($clients)) {
|
|
||||||
foreach ($clients as $key => $value) {
|
|
||||||
echo "<option value='" . $value['id'] . "'>" . $value['client_name'] . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="addon_policy"> Insurer <span id="base_danger"
|
<label for="addon_policy"> Insurer <span
|
||||||
class="text-danger"></span></label>
|
class="text-danger">*</span></label>
|
||||||
<select class="form-control" id="insurer_id" name="insurer_id">
|
<select class="form-control" id="insurer_id" name="insurer_id" onchange="getInsurerBranch()">
|
||||||
<option value="0" selected>Select Insurer</option>
|
<option value="0" selected>Select Insurer</option>
|
||||||
<?php if (isset($insurer) && count($insurer)) { ?>
|
<?php if (isset($insurer) && count($insurer)) { ?>
|
||||||
<?php foreach ($insurer as $value) { ?>
|
<?php foreach ($insurer as $value) { ?>
|
||||||
@ -68,65 +54,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="addon_policy"> Insurer Branch<span id="base_danger"
|
<label for="addon_policy"> Insurer Branch<span
|
||||||
class="text-danger"></span></label>
|
class="text-danger">*</span></label>
|
||||||
<select class="form-control" id="insurer_id" name="insurer_id">
|
<select class="form-control" id="insurer_branch_id" name="insurer_branch_id">
|
||||||
<option value="0" selected>Select Insurer Branch</option>
|
<option value="0" selected>Select Insurer Branch</option>
|
||||||
<?php if (isset($insurer) && count($insurer)) { ?>
|
|
||||||
<?php foreach ($insurer as $value) { ?>
|
|
||||||
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="form-group col-md-3">
|
|
||||||
<label for="email"> Policy Type <span class="text-danger"></span></label>
|
|
||||||
<select class="form-control" id="policy_type_id" name="policy_type_id">
|
|
||||||
<option value="0">Select Policy Type</option>
|
|
||||||
<?php
|
|
||||||
if (isset($policy_types) && count($policy_types)) {
|
|
||||||
foreach ($policy_types as $key => $value) {
|
|
||||||
echo "<option value='" . $value['id'] . "'>" . $value['policy_type'] . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<!-- <div class="form-group col-md-3">
|
|
||||||
<label for="client_branch">Issuer<span class="text-danger">*</span></label>
|
|
||||||
<select class="form-control" id="issuer" name="issuer" required>
|
|
||||||
<option value="0">Select Issure</option>
|
|
||||||
<?php
|
|
||||||
if (isset($issuer) && count($issuer)) {
|
|
||||||
foreach ($issuer as $key => $value) {
|
|
||||||
echo "<option value=" . $key . ">" . $value . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<!-- </div>
|
|
||||||
|
|
||||||
<div class="form-row"> -->
|
|
||||||
|
|
||||||
<!-- <div class="form-group col-md-3">
|
|
||||||
<label>Date Type<span class="text-danger"></span></label>
|
|
||||||
<select class="form-control" id="date_type" name="date_type"
|
|
||||||
onchange="hideDateField()">
|
|
||||||
<option value="0">Select Date Type</option>
|
|
||||||
<?php
|
|
||||||
if (isset($date_type) && count($date_type)) {
|
|
||||||
foreach ($date_type as $key => $value) {
|
|
||||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div class="form-group col-md-4" style="display: true;" id="date_div">
|
<div class="form-group col-md-4" style="display: true;" id="date_div">
|
||||||
<label>Statement Month<span class="text-danger"></span></label>
|
<label>Statement Month<span class="text-danger"></span></label>
|
||||||
<div class="input-icon">
|
<div class="input-icon">
|
||||||
@ -294,6 +228,7 @@
|
|||||||
getURLParams()
|
getURLParams()
|
||||||
$('#client_id').select2();
|
$('#client_id').select2();
|
||||||
$('#insurer_id').select2();
|
$('#insurer_id').select2();
|
||||||
|
$('#insurer_branch_id').select2();
|
||||||
$('#policy_type_id').select2();
|
$('#policy_type_id').select2();
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -304,10 +239,17 @@
|
|||||||
var end_date = $('#endDate').val();
|
var end_date = $('#endDate').val();
|
||||||
var client_id = $('#client_id').val();
|
var client_id = $('#client_id').val();
|
||||||
var insurer_id = $('#insurer_id').val();
|
var insurer_id = $('#insurer_id').val();
|
||||||
|
var insurer_branch_id = $('#insurer_branch_id').val();
|
||||||
var policy_type_id = $('#policy_type_id').val();
|
var policy_type_id = $('#policy_type_id').val();
|
||||||
var date_type = $('#date_type').val();
|
var date_type = $('#date_type').val();
|
||||||
var issuer = $('#issuer').val();
|
var issuer = $('#issuer').val();
|
||||||
|
|
||||||
|
if(insurer_id == false || insurer_branch_id == false){
|
||||||
|
alert("Please Choose Insurer and its branch to Proceed .. !!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log(start_date + '-' + end_date);
|
console.log(start_date + '-' + end_date);
|
||||||
|
|
||||||
var queryParams = {
|
var queryParams = {
|
||||||
@ -315,6 +257,7 @@
|
|||||||
end_date: end_date,
|
end_date: end_date,
|
||||||
client_id: client_id,
|
client_id: client_id,
|
||||||
insurer_id: insurer_id,
|
insurer_id: insurer_id,
|
||||||
|
insurer_branch_id : insurer_branch_id,
|
||||||
policy_type_id: policy_type_id,
|
policy_type_id: policy_type_id,
|
||||||
date_type: date_type,
|
date_type: date_type,
|
||||||
issuer: issuer,
|
issuer: issuer,
|
||||||
@ -338,6 +281,7 @@
|
|||||||
const endDate = params.get('end_date') || 0; // Default to 0 if not found
|
const endDate = params.get('end_date') || 0; // Default to 0 if not found
|
||||||
const client_id = params.get('client_id') || 0; // Default to 0 if not found
|
const client_id = params.get('client_id') || 0; // Default to 0 if not found
|
||||||
const insurer_id = params.get('insurer_id') || 0; // Default to 0 if not found
|
const insurer_id = params.get('insurer_id') || 0; // Default to 0 if not found
|
||||||
|
const insurer_branch_id = params.get('insurer_branch_id') || 0 ; // Default to 0 if not found
|
||||||
const policy_type_id = params.get('policy_type_id') || 0; // Default to 0 if not found
|
const policy_type_id = params.get('policy_type_id') || 0; // Default to 0 if not found
|
||||||
const date_type = params.get('date_type') || 0; // Default to 0 if not found
|
const date_type = params.get('date_type') || 0; // Default to 0 if not found
|
||||||
const issuer = params.get('issuer') || 0; // Default to 0 if not found
|
const issuer = params.get('issuer') || 0; // Default to 0 if not found
|
||||||
@ -348,6 +292,7 @@
|
|||||||
console.log('endDate', endDate)
|
console.log('endDate', endDate)
|
||||||
console.log('client_id', client_id)
|
console.log('client_id', client_id)
|
||||||
console.log('insurer_id', insurer_id)
|
console.log('insurer_id', insurer_id)
|
||||||
|
console.log('insurer_branch_id',insurer_branch_id)
|
||||||
console.log('policy_type_id', policy_type_id)
|
console.log('policy_type_id', policy_type_id)
|
||||||
console.log('date_type', date_type)
|
console.log('date_type', date_type)
|
||||||
console.log('issuer', issuer)
|
console.log('issuer', issuer)
|
||||||
@ -361,7 +306,8 @@
|
|||||||
$('#start_date').val(startDate)
|
$('#start_date').val(startDate)
|
||||||
$('#end_date').val(endDate)
|
$('#end_date').val(endDate)
|
||||||
$('#client_id').val(client_id).change()
|
$('#client_id').val(client_id).change()
|
||||||
$('#insurer_id').val(insurer_id).change()
|
$('#insurer_id').val(insurer_id)
|
||||||
|
$('#insurer_branch_id').val(insurer_branch_id).change()
|
||||||
$('#policy_type_id').val(policy_type_id).change()
|
$('#policy_type_id').val(policy_type_id).change()
|
||||||
$('#date_type').val(date_type)
|
$('#date_type').val(date_type)
|
||||||
$('#issuer').val(issuer)
|
$('#issuer').val(issuer)
|
||||||
@ -415,6 +361,7 @@
|
|||||||
// Reset all select dropdowns to the first option
|
// Reset all select dropdowns to the first option
|
||||||
$('#client_id').val('0').change();
|
$('#client_id').val('0').change();
|
||||||
$('#insurer_id').val('0').change();
|
$('#insurer_id').val('0').change();
|
||||||
|
$('#insurer_branch_id').val('0').change();
|
||||||
$('#policy_type_id').val('0').change();
|
$('#policy_type_id').val('0').change();
|
||||||
$('#date_type').val('0');
|
$('#date_type').val('0');
|
||||||
$('#issuer').val('0');
|
$('#issuer').val('0');
|
||||||
@ -457,4 +404,68 @@
|
|||||||
console.log(apiURL);
|
console.log(apiURL);
|
||||||
window.location.href = apiURL;
|
window.location.href = apiURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getInsurerBranch(){
|
||||||
|
|
||||||
|
let insurer_id = $('#insurer_id').val();
|
||||||
|
|
||||||
|
if(insurer_id == 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.loader').fadeIn();
|
||||||
|
$('.loader-mask').fadeIn('slow');
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '<?= base_url('master/insurer/branch/getList?') ?>',
|
||||||
|
type: 'POST',
|
||||||
|
data: {insurer_id},
|
||||||
|
success: function(response) {
|
||||||
|
|
||||||
|
console.log(response)
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
|
||||||
|
if (response.data && response.data != []) {
|
||||||
|
|
||||||
|
let options ="";
|
||||||
|
let insurer_branch_list = response.data;
|
||||||
|
|
||||||
|
insurer_branch_list.forEach(element => {
|
||||||
|
options += `<option value="${element['id']}"> ${element['branch_name']} </option>`;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#insurer_branch_id').html('<option value="0" selected>Select Insurer Branch</option>' + options);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
// Handle error
|
||||||
|
console.error('Upload error occurred:');
|
||||||
|
console.error('Status: ', status); // Status of the request
|
||||||
|
console.error('Error: ', error); // Specific error message
|
||||||
|
console.error('XHR Object: ', xhr); // Full XHR object with response details
|
||||||
|
|
||||||
|
// Optionally log server response, if available
|
||||||
|
if (xhr.responseText) {
|
||||||
|
console.error('Response Text: ', xhr.responseText);
|
||||||
|
}
|
||||||
|
|
||||||
|
toastr.warning('Error uploading file', 'WARNING');
|
||||||
|
console.error('Upload error:', error);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
console.log("Ajax call completed successfully");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -231,12 +231,12 @@
|
|||||||
buttons: [{
|
buttons: [{
|
||||||
extend: 'csv',
|
extend: 'csv',
|
||||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||||
title: 'Policy-Tranction-BDS-List',
|
title: 'Variance-Report-List',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||||
title: 'Policy-Tranction-BDS-List',
|
title: 'Variance-Report-List',
|
||||||
customize: function(xlsx) {
|
customize: function(xlsx) {
|
||||||
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||||
var total = 0;
|
var total = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user