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

This commit is contained in:
velz 2024-08-14 11:46:52 +05:30
commit d83c8fcd6f
10 changed files with 420 additions and 428 deletions

View File

@ -2994,7 +2994,9 @@ class ClientController extends AdminController
$update = $this->policyPremium2Model
->where('rack_rate_name', $rack_rate_name)
->where('client_policy_id', $client_policy_id)
->set($data)->update();
->where('is_active',1)
->set($data)
->update();
$affectedRows = $this->policyPremium2Model->affectedRows();

View File

@ -264,6 +264,10 @@ class MasterController extends AdminController
$data['addition_add_day'] = 1;
}
if($this->request->getPost('deletion_add_day')){
$data['deletion_add_day'] = 1;
}
$data['created_by'] = get_session_userid();
$data['insurer_logo'] = $file_name;
@ -342,6 +346,12 @@ class MasterController extends AdminController
$data['addition_add_day'] = 0;
}
if($this->request->getPost('deletion_add_day')){
$data['deletion_add_day'] = 1;
}else{
$data['deletion_add_day'] = 0;
}
$update = $this->insurerModel->update($id,$data);
if($update){
echo json_encode(array("status" => true , 'data' => $data));

View File

@ -35,7 +35,7 @@ class UserController extends AdminController
public function list()
{
$data['headerData'] = 'User List';
$data['page_name'] = 'User';
$this->myLogger->logme('error','User list function called');
$data['UserList'] = $this->userModel->getUserList();
// echo '<pre>';
@ -47,54 +47,60 @@ class UserController extends AdminController
public function create()
{
$this->myLogger->logme('error','User create function called');
$teams = $this->request->getPost('team');
{
$this->myLogger->logme('error', 'User create function called');
$teams = $this->request->getPost('team');
//if this is get method return to user creation page
if(!$this->request->getPost()){
if (!$this->request->getPost()) {
return redirect()->to(base_url('/user/list'));
}else{
} else {
$userData = $this->request->getPost();
$userData['created_by'] = get_session_userid();
$temp_team = $userData['team'];
unset($userData['team']);
$insert = $this->userModel->insert($userData);
if($insert){
$db = \Config\Database::connect();
$tableName = 'hdz_staff';
if($userData['role'] == 1){
if ($insert) {
if ($userData['role'] == 3) {
$db = \Config\Database::connect();
$tableName = 'hdz_staff';
$admin = 1;
}else{
$admin = 0;
}
foreach ($temp_team as $key => $value) {
$team = $this->teamModel->where('id' , $value)->first();
if($team['name'] == 'Claims'){
$hdz_staff = [
'emp_code' => $userData['emp_code'],
'fullname' => $userData['first_name'],
'username' => strtolower($userData['first_name']),
'email' => $userData['email'],
'admin' => $admin,
'registration' => time(),
];
$db->table($tableName)->insert($hdz_staff);
}
}
$teamData['user_id'] = $insert ;
foreach ($teams as $value) {
$teamData['team_id'] = $value;
$teamData['created_by'] = get_session_userid();
$this->userTeamsModel->insert($teamData);
$password = '12345678'; //Default password
$hashedPassword = password_hash($password, PASSWORD_DEFAULT);
foreach ($temp_team as $key => $value) {
$team = $this->teamModel->where('id', $value)->first();
if ($team['name'] == 'Claims') {
$hdz_staff = [
'emp_code' => $userData['emp_code'],
'fullname' => $userData['first_name'],
'username' => strtolower($userData['first_name']),
'email' => $userData['email'],
'admin' => $admin,
'registration' => time(),
'password' => $hashedPassword,
'active' => 1,
];
$db->table($tableName)->insert($hdz_staff);
}
}
$teamData['user_id'] = $insert;
foreach ($teams as $value) {
$teamData['team_id'] = $value;
$teamData['created_by'] = get_session_userid();
$this->userTeamsModel->insert($teamData);
}
}
}
}
$this->myLogger->logme('error','User create Successfully created by id {data}', ['data' => get_session_userid()]);
$this->myLogger->logme('error', 'User create Successfully created by id {data}', ['data' => get_session_userid()]);
return redirect()->to(base_url('/user/list'));
}
@ -110,65 +116,65 @@ class UserController extends AdminController
}
public function edit()
{
$teams = $this->request->getPost('team');
{
$teams = $this->request->getPost('team');
if(!$this->request->getPost()){
if (!$this->request->getPost()) {
return redirect()->to(base_url('/user/list'));
}else{
} else {
$id = $this->request->getPost('PrimaryKey');
$userData = $this->request->getPost();
unset($userData['csrf_test_name']);
unset($userData['PrimaryKey']);
// unset($userData['first_name']);
// Update data in the 'users' table based on the $id
$userData['updated_by'] = get_session_userid();
$update = $this->userModel->where('id', $id )->set($userData)->update();
$update = $this->userModel->where('id', $id)->set($userData)->update();
if($update){
if ($update) {
$db = \Config\Database::connect();
$tableName = 'hdz_staff';
if ($userData['role'] == 3) {
if($userData['role'] == 1){
$db = \Config\Database::connect();
$tableName = 'hdz_staff';
$admin = 1;
}else{
$admin = 0;
}
foreach ($userData['team'] as $key => $value) {
if($value == 2){
$hdz_staff = [
'emp_code' => $userData['emp_code'],
'fullname' => $userData['first_name'],
'username' => strtolower($userData['first_name']),
'email' => $userData['email'],
'admin' => $admin,
];
foreach ($userData['team'] as $key => $value) {
if ($value == 2) {
$db->table($tableName)->where('emp_code', $userData['emp_code'])
->where('email', $userData['email'])
->set($hdz_staff)
->update();
$hdz_staff = [
'emp_code' => $userData['emp_code'],
'fullname' => $userData['first_name'],
'username' => strtolower($userData['first_name']),
'email' => $userData['email'],
'admin' => $admin,
'registration' => time(),
'active' => 1,
];
$db->table($tableName)->where('emp_code', $userData['emp_code'])
->where('email', $userData['email'])
->set($hdz_staff)
->update();
}
}
}
$this->userTeamsModel->where('user_id', $id)->delete();
$this->userTeamsModel->where('user_id', $id)->delete();
if($teams){
$teamData['user_id'] = $id ;
foreach ($teams as $value) {
$teamData['team_id'] = $value;
$teamData['created_by'] = get_session_userid();
$this->userTeamsModel->insert($teamData);
}
if ($teams) {
$teamData['user_id'] = $id;
foreach ($teams as $value) {
$teamData['team_id'] = $value;
$teamData['created_by'] = get_session_userid();
$this->userTeamsModel->insert($teamData);
}
}
}
}
}
return redirect()->to(base_url('/user/list'));
}
}
public function deactive($id = null)

View File

@ -22,7 +22,6 @@ class ClientPolicyModel extends Model
"reminder_date",
"open_date",
"close_date",
"close_date",
"insured",
"no_of_employees",
"no_of_lives",

View File

@ -145,15 +145,15 @@
</div>
<div class="form-group col-md-4">
<label for="open_date">Open Date<span class="text-danger">*</span></label>
<input value="" type="text" class="form-control" placeholder="Enter OpenS Date " name="open_date" id="open_date" >
<input value="" type="text" class="form-control dateofdata" placeholder="Enter Open Date " name="open_date" id="open_date" >
</div>
<div class="form-group col-md-4">
<label for="close_date">Close Date<span class="text-danger">*</span></label>
<input value="" type="text" class="form-control" placeholder="Enter Close Date " name="close_date" id="close_date" >
<input value="" type="text" class="form-control dateofdata" placeholder="Enter Close Date " name="close_date" id="close_date" >
</div>
<div class="form-group col-md-4">
<label for="reminder_date">Reminder Date<span class="text-danger">*</span></label>
<input value="" type="text" class="form-control" placeholder="Enter Reminder Date " name="reminder_date" id="reminder_date" >
<input value="" type="text" class="form-control dateofdata" placeholder="Enter Reminder Date " name="reminder_date" id="reminder_date" >
</div>
<div class="form-group col-md-4">
<label class="switch" style="position: relative;top: 43px;left: 20px;">
@ -195,10 +195,13 @@
$(open_data).show();
$(close_data).show();
$(reminder_data).show();
$('.dateofdata').attr('required', true);
}else{
$(open_data).hide();
$(close_data).hide();
$(reminder_data).hide();
$('.dateofdata').attr('required', false);
}
})
@ -286,7 +289,7 @@
delete data.role;
$.each(data, function(index, item) {
console.log('step 1');
// console.log('step 1');
var patternGMC = /gmc/i; // Case insensitive pattern for 'gmc'
var patternGPA = /gpa/i; // Case insensitive pattern for 'gpa'
var subject = item.policy_type_name;
@ -447,8 +450,8 @@
var policyDataId = $('#policy').children('option:selected').attr('data-id');
var basePolicyDataId = $('#base_policy').children('option:selected').attr('data-id');
// //console.log('policyDataId', policyDataId);
// //console.log('basePolicyDataId', basePolicyDataId);
//console.log('policyDataId', policyDataId);
//console.log('basePolicyDataId', basePolicyDataId);
if (policy_PrimaryKey === '' && policy_client === '') {
toastr.error('Client is required', 'Error');
@ -525,7 +528,7 @@
delete res.data.role;
$.each(res.data, function(index, item) {
console.log(item);
// console.log(item);
var patternGMC = /gmc/i; // Case insensitive pattern for 'gmc'
var patternGPA = /gpa/i; // Case insensitive pattern for 'gpa'
var subject = item.policy_type_name;
@ -743,9 +746,9 @@
$('#policy_PrimaryKey').val(res.data.id);
$('#insurer_policy_id').val(res.data.policy_id);
$('#policy_no').val(res.data.policy_no);
// $('#start_date').val(rearrangeDateFormat(res.data.policy_start_date));
$('#start_date').val(rearrangeDateFormat(res.data.policy_start_date));
$('#open_date').val(rearrangeDateFormat(res.data.open_date));
// $('#end_date').val(rearrangeDateFormat(res.data.policy_end_date));
$('#end_date').val(rearrangeDateFormat(res.data.policy_end_date));
$('#close_date').val(rearrangeDateFormat(res.data.close_date));
$('#reminder_date').val(rearrangeDateFormat(res.data.reminder_date));
$('#gst_no').val(gst);
@ -758,11 +761,13 @@
$('#open_date').parent().show();
$('#close_date').parent().show();
$('#reminder_date').parent().show();
$('.dateofdata').attr('required', true);
} else {
$('#inception_type').prop('checked', false);
$('#open_date').parent().hide();
$('#close_date').parent().hide();
$('#reminder_date').parent().hide();
$('.dateofdata').attr('required', false);
}
@ -1011,11 +1016,11 @@
return rearrangedDate;
} else {
// Handle unexpected date format
return '00-00-0000';
return '';
}
} else {
// Handle the case where inputDate is not a valid string
return '00-00-0000';
return '';
}
}
@ -1129,14 +1134,14 @@
let number;
console.log( 'input type step 1', typeof input);
// console.log( 'input type step 1', typeof input);
if (input instanceof HTMLElement && input.value) {
// Ensure input.value is defined and not null
const inputValue = input.value;
number = parseFloat(inputValue.replace(/,/g, ''), 10);
} else if (input) {
console.log( 'input type step 2', typeof input);
// console.log( 'input type step 2', typeof input);
// Handle the case where input is a string
number = parseFloat(input.replace(/,/g, ''), 10);
} else {
@ -1191,8 +1196,8 @@
maximumFractionDigits: 2
});
console.log('formatNumber function formetted value', value);
console.log('formatNumber function formetted value type',typeof value);
// console.log('formatNumber function formetted value', value);
// console.log('formatNumber function formetted value type',typeof value);
if(value == 'NaN' || value == 'null' || value == 'undefined'){
value = '';
@ -1281,7 +1286,7 @@
$.get(url_for_get_policy_type_list, function(response){
console.log(response)
console.log(response.data)
// console.log(response.data)
appendBasePolicyList(response.data);
@ -1462,7 +1467,7 @@
var uri = '<?= base_url('client/policy/list/') ?>' + client_policy_id
console.log('uri', uri)
// console.log('uri', uri)
$('.loader').fadeIn();
$('.loader-mask').fadeIn();
@ -1604,9 +1609,9 @@
function appendBasePolicyList(data, select = null)
{
console.log('appendBasePolicyList', 'function called');
console.log('appendBasePolicyList data', data);
console.log('appendBasePolicyList selected value', select);
// console.log('appendBasePolicyList', 'function called');
// console.log('appendBasePolicyList data', data);
// console.log('appendBasePolicyList selected value', select);
$('#base_policy').empty();
$('#base_policy').append($('<option>', {
@ -1647,9 +1652,9 @@
$('.loader-mask').fadeIn();
var id = element.getAttribute('data-id');
console.log(id)
// console.log(id)
var form_action = '<?= base_url("client/policy/remove/") ?>' + id;
console.log(form_action)
// console.log(form_action)
$.ajax({
url: form_action,
type: "GET",
@ -1661,7 +1666,7 @@
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
console.log(res)
console.log('removepolicy function response', res)
if(res){
if (res.status == true) {

View File

@ -30,6 +30,10 @@
white-space: normal;
}
.dataTables_filter{
position: absolute;
}
</style>
<?php $pro_rata_total = 0; $gst_total = 0 ?>
@ -42,245 +46,154 @@
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Employees</h4>
</div>
</div>
<div class="table-responsive">
<table class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0"
id="tickets-table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">SNO</th>
<table class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">SNO</th>
<?php if(isset($getData)) { ?>
<?php if($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
<th class="font-weight-medium">Client/Branch</th>
<?php } ?>
<?php if (isset($getData)) { ?>
<?php if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
<th class="font-weight-medium">Client/Branch</th>
<?php } ?>
<?php } ?>
<?php if(isset($getData)) { ?>
<?php if($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
<th class="font-weight-medium">Branch</th>
<?php } ?>
<?php if (isset($getData)) { ?>
<?php if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
<th class="font-weight-medium">Branch</th>
<?php } ?>
<th class="font-weight-medium">Employee code</th>
<th class="font-weight-medium">Name/code</th>
<th class="font-weight-medium">Policy name</th>
<th class="font-weight-medium">Insurer <br> name</th>
<th class="font-weight-medium">TPA ID</th>
<th class="font-weight-medium">Risk ID</th>
<th class="font-weight-medium">Policy <br> status</th>
<th class="font-weight-medium">()Sum Insured</th>
<th class="font-weight-medium">()Premium</th>
<th class="font-weight-medium" id="rata_premium" data-toggle="tooltip" data-placement="top">
()Pro Rata <br> Premium</th>
<th class="font-weight-medium" id="gst" data-toggle="tooltip" data-placement="top">()GST
</th>
<!-- <th class="font-weight-medium">Action</th> -->
</tr>
</thead>
<?php } ?>
<tbody class="font-12">
<?php
if(isset($employees))
{
<th class="font-weight-medium">Name/code</th>
<th class="font-weight-medium">Policy name</th>
<th class="font-weight-medium">Insurer name</th>
<th class="font-weight-medium">TPA ID</th>
<th class="font-weight-medium">Risk ID</th>
<th class="font-weight-medium">Policy status</th>
<th class="font-weight-medium">()Sum Insured</th>
<th class="font-weight-medium">()Premium</th>
<th class="font-weight-medium" id="rata_premium" data-toggle="tooltip" data-placement="top">()Pro Rata <br> Premium</th>
<th class="font-weight-medium" id="gst" data-toggle="tooltip" data-placement="top">()GST</th>
</tr>
</thead>
<tbody class="font-12">
<?php
if (isset($employees)) {
$pro_rata_total = 0;
$gst_total = 0;
foreach ($employees as $key => $employee) { ?>
<tr>
<td><b><?php echo ($key + 1); ?></b></td>
<tr>
<td><b><?php echo ($key + 1)?></b></td>
<?php if(isset($getData)) { ?>
<?php if($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
<td><?php echo $employee['client_short_name']?> - <?php echo $employee['client_branch_name']?> </td>
<?php if (isset($getData)) { ?>
<?php if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
<td><?php echo $employee['client_short_name'] . ' - ' . $employee['client_branch_name']; ?></td>
<?php } ?>
<?php } ?>
<?php } ?>
<?php if(isset($getData)) { ?>
<?php if($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
<td><?php echo $employee['client_branch_name']?></td>
<?php if (isset($getData)) { ?>
<?php if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
<td><?php echo $employee['client_branch_name']; ?></td>
<?php } ?>
<?php } ?>
<td><?php echo $employee['name'] . ' (' . $employee['emp_code'] . ' - ' . $employee['relationship'] . ')'; ?></td>
<td><?php echo isset($employee['policy_type']) ? $employee['policy_type'] : ''; ?> - <?php echo isset($employee['policy_no']) ? $employee['policy_no'] : ''; ?></td>
<td><?php echo $employee['insurer_short_name']; ?></td>
<td><?php echo $employee['tpa_id']; ?></td>
<td><?php echo $employee['uhid']; ?></td>
<td>
<?php
switch ($employee['status']) {
case 'draft':
echo '<span class="badge badge-secondary">' . $employee['status'] . '</span>';
break;
case 'active':
echo '<span class="badge badge-success">' . $employee['status'] . '</span>';
break;
case 'inactive':
echo '<span class="badge badge-warning">' . $employee['status'] . '</span>';
break;
case 'expired':
echo '<span class="badge badge-danger">' . $employee['status'] . '</span>';
break;
case 'enrolled':
echo '<span class="badge2 badge2-secondary2">' . $employee['status'] . '</span>';
break;
default:
echo $employee['status'];
break;
}
?>
</td>
<td><?php echo format_indian_number($employee['basic_cover_si']); ?></td>
<td><?php echo format_indian_number($employee['premium']); ?></td>
<td><?php $pro_rata_total += $employee['rata_premimum']; echo format_indian_number($employee['rata_premimum']); ?></td>
<td><?php $gst_total += $employee['gst']; echo format_indian_number($employee['gst']); ?></td>
</tr>
<?php }
} ?>
</tbody>
<tfoot>
<tr>
<th></th>
<?php if (isset($getData)) { ?>
<?php if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
<th></th>
<?php } ?>
<?php } ?>
<td><?php echo $employee['name']?>( <?php echo $employee['emp_code']?> - <?php echo $employee['relationship']?> )</td>
<!-- <td><?php echo isset($employee['policy_name']) ? $employee['policy_name'] : '' ?> - <?php echo isset($employee['policy_no']) ? $employee['policy_no'] : '' ?> - <?php echo isset($employee['policy_type']) ? $employee['policy_type'] : '' ?></td> -->
<td><?php echo isset($employee['policy_type']) ? $employee['policy_type'] : '' ?> - <?php echo isset($employee['policy_no']) ? $employee['policy_no'] : '' ?></td>
<td><?php echo $employee['insurer_short_name']?></td>
<td><?php echo $employee['tpa_id']?></td>
<td><?php echo $employee['uhid']?></td>
<td>
<?php
if ($employee['status'] == 'draft') {
echo '<span class="badge badge-secondary">' . $employee['status'] . '</span>';
} elseif ($employee['status'] == 'active') {
echo '<span class="badge badge-success">' . $employee['status'] . '</span>';
} elseif ($employee['status'] == 'inactive') {
echo '<span class="badge badge-warning">' . $employee['status'] . '</span>';
}elseif ($employee['status'] == 'expired') {
echo '<span class="badge badge-danger">' . $employee['status'] . '</span>';
}elseif ($employee['status'] == 'enrolled') {
echo '<span class="badge2 badge2-secondary2">' . $employee['status'] . '</span>';
}else{
echo $employee['status'];
}
?>
</td>
<td><?php echo format_indian_number($employee['basic_cover_si'])?> </td>
<td><?php echo format_indian_number($employee['premium'])?></td>
<td><?php $pro_rata_total = $pro_rata_total + $employee['rata_premimum']; echo format_indian_number($employee['rata_premimum'])?></td>
<td><?php $gst_total = $gst_total + $employee['gst']; echo format_indian_number($employee['gst'])?></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" href="#"><i
class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit
Ticket</a>
<a class="dropdown-item" href="#"><i
class="mdi mdi-check-all mr-2 text-muted font-18 vertical-middle"></i>Close</a>
<a class="dropdown-item" href="#"><i
class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Remove</a>
<a class="dropdown-item" href="#"><i
class="mdi mdi-star mr-2 font-18 text-muted vertical-middle"></i>Mark as
Unread</a>
</div>
</div>
</td> -->
</tr>
<?php }}?>
</tbody>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th>Total</th>
<th><?php echo format_indian_number($pro_rata_total) ?></th>
<th><?php echo format_indian_number($gst_total) ?></th>
</tr>
</tfoot>
</table>
</div>
<?php if (isset($getData)) { ?>
<?php if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
<th></th>
<?php } ?>
<?php } ?>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th>Total</th>
<th><?php echo format_indian_number($pro_rata_total); ?></th>
<th><?php echo format_indian_number($gst_total); ?></th>
</tr>
</tfoot>
</table>
</div>
</div>
</div><!-- end col -->
</div>
<link rel="stylesheet" href="https://unpkg.com/tippy.js@6/dist/tippy.css">
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>
<script>
$(document).ready(function() {
$(document).ready(function() {
var ticketsTable = $('#tickets-table');
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{
extend: 'csv',
text: 'CSV',
title: 'Employee-List',
className: 'my_class',
exportOptions: {
columns: ':not(:last-child)', // Adjust as needed
footer: true // Include the footer in the export
}
}],
initComplete: function(settings, json) {
$('.my_class').css({
position: "relative",
left: "82px"
if (ticketsTable.length) {
ticketsTable.DataTable({
dom: "<'row'<'col-sm-6'f><'col-sm-6 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
buttons: [{
extend: 'csv',
text: 'CSV',
title: 'Member-List',
exportOptions: {
columns: ':not(:last-child)'
},
}],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true, // Enable pagination
pageLength: 25 // Set default number of rows per page (optional)
});
},
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true,
// pagingType: 'full_numbers'
});
});
} else {
console.error("Table not found.");
}
});
</script>
<script>
// // Function to format a number in Indian Rupees format
// function formatNumberInIndianRupees(number) {
// const maxLength = 24;
// let value = number.toString().replace(/[^\d.]/g, ''); // Remove non-numeric characters
// // Limit the number of digits before the decimal point
// if (value.includes('.')) {
// let parts = value.split('.');
// parts[0] = parts[0].slice(0, maxLength); // Limit the integer part
// value = parts.join('.');
// } else {
// value = value.slice(0, maxLength);
// }
// // Convert to a number and format with commas using the Indian numbering system
// const formattedNumber = Number(value).toLocaleString('en-IN', {
// maximumFractionDigits: 2 // Optional: limit to 2 decimal places if required
// });
// return formattedNumber;
// }
// // Function to format numbers based on a class
// function formatNumbersByClass(className) {
// const elements = document.querySelectorAll(`.${className}`);
// elements.forEach(element => {
// const number = parseFloat(element.innerText.replace(/,/g, ''));
// if (!isNaN(number)) {
// element.innerText = formatNumberInIndianRupees(number);
// }
// });
// }
// // Format numbers when the DOM content is loaded
// document.addEventListener("DOMContentLoaded", function() {
// setTimeout(() => {
// formatNumbersByClass('indian-number');
// }, 500);
// });
</script>
<script>
// $(document).ready(function() {
// var table = $('#tickets-table').DataTable({
// "footer": true
// });
// var sumColumn9 = table.column(9).data().reduce(function(a, b) {
// return parseFloat(a) + parseFloat(b);
// }, 0);
// console.log(sumColumn9)
// var sumColumn10 = table.column(10).data().reduce(function(a, b) {
// return parseFloat(a) + parseFloat(b);
// }, 0);
// console.log(sumColumn10)
// $('#tickets-table tfoot th:eq(9)').html(sumColumn9);
// $('#tickets-table tfoot th:eq(10)').html(sumColumn10);
// });
</script>

View File

@ -84,12 +84,20 @@ input:checked + .slider:before {
<input type="text" class="form-control" id="short_name" placeholder="Enter Short Name" value="<?= isset($insurer['short_name']) ? $insurer['short_name'] : '' ?>" name="short_name" required minlength="3" maxlength="8">
</div>
<div class="form-group col-md-2">
<div class="form-group col-md-4">
<label class="switch" style="position: absolute;top: 32px;left: 17px;">
<input id="addition_add_day" type="checkbox" name="addition_add_day" <?= (isset($insurer['addition_add_day']) && $insurer['addition_add_day'] == 1) ? 'checked' : '' ?>>
<span class="slider round" style="height: 27px;"></span>
</label>
<label for="is_download_btn" style="position: relative;top: 30px;left: 82px;">Add one day to date of coverage when Addition/Dependent addition</label>
<label for="addition_add_day" style="position: relative;top: 30px;left: 82px;">Add one day to date of coverage when Addition/Dependent addition</label>
</div>
<div class="form-group col-md-2">
<label class="switch" style="position: absolute;top: 32px;left: 17px;">
<input id="deletion_add_day" type="checkbox" name="deletion_add_day" <?= (isset($insurer['deletion_add_day']) && $insurer['deletion_add_day'] == 1) ? 'checked' : '' ?>>
<span class="slider round" style="height: 27px;"></span>
</label>
<label for="deletion_add_day" style="position: relative;top: 30px;left: 82px;">Add one day to date of Deletion </label>
</div>
</div>
@ -199,6 +207,8 @@ input:checked + .slider:before {
setTimeout(function(){
window.location.href = '<?= base_url('master/insurer/list/')?>' + res.data.id
}, 100)
}else{
window.location.reload();
}
},

View File

@ -813,7 +813,8 @@
<script>
function formatDate(dateString) {
function formatDate(dateString)
{
// Parse the input date string
let date = new Date(dateString);
@ -840,6 +841,18 @@
return formattedDate;
}
function printCurrentTime()
{
var now = new Date();
var hours = now.getHours().toString().padStart(2, '0');
var minutes = now.getMinutes().toString().padStart(2, '0');
var seconds = now.getSeconds().toString().padStart(2, '0');
var currentTime = hours + ':' + minutes + ':' + seconds;
// console.log("Current Time:", currentTime);
return currentTime;
}
</script>
</body>

View File

@ -31,6 +31,32 @@
} */
</style>
<style>
#grid_content_input {
overflow-y: auto;
overflow-x: hidden;
max-height: 350px;
}
/* Custom scrollbar styles */
#grid_content_input::-webkit-scrollbar {
width: 8px; /* Set the width of the scrollbar */
}
#grid_content_input::-webkit-scrollbar-thumb {
background-color: #888; /* Color of the scrollbar thumb */
border-radius: 4px; /* Rounded corners of the scrollbar thumb */
}
#grid_content_input::-webkit-scrollbar-thumb:hover {
background-color: #555; /* Color of the scrollbar thumb on hover */
}
#grid_content_input::-webkit-scrollbar-track {
background-color: #f1f1f1; /* Background color of the scrollbar track */
}
</style>
<!-- Modal content for the Large example -->
<div class="modal fade" id="bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
aria-hidden="true" aria-modal="true" data-backdrop="static" style="padding-right: 15px">
@ -99,7 +125,7 @@
<div class="form-row" id="relationship" class="relationship" >
</div>
<a href="#" id="copyfromexcel" onclick="copyFromExcel(this)">Copy from excel</a>
<a href="#" id="copyfromexcel" onclick="copyFromExcel(this)">Copy from excel </a>
<hr>
<div class="form-row" id="grid_content_input" style="display: true;">
@ -107,7 +133,7 @@
<div class="form-row" id="grid_content_from_excel" style="display: none;">
<p>Paste excel data here: <a href="#" type="button" onclick="copyHeaders('na')">Copy Excel Headers</a></p>
<p>Paste excel data here: <a href="#" type="button" onclick="copyHeaders('na')">Copy Excel Headers</a> &nbsp; &nbsp; &nbsp; &nbsp; <h2 id="please_wait" style="display: none;"> please wait.... </h2></p>
<textarea class="form-control excel_textarea" id="copied_excel_data" name="copied_excel_data" style="width:100%;height:200px;" oninput="generateTable('na')"></textarea><br>
<hr>
<div class="excel_table_class" id="excel_table" style="display: none;"></div>
@ -156,10 +182,8 @@ $('.close').click(function()
});
$(document).on('click', '.close', function() {
console.log("Close button clicked");
$('#tab_content .tab-pane').not('#primary_rack_rate_tab').remove();
$('#nav_pills li').not('#primary_rack_rate_tab_list').remove();
console.log("Tab panes removed");
});
var rarc_rate_json_array = [];
@ -183,7 +207,7 @@ $(document).on('submit', 'form[id^="GridForm_"]', function(event) {
secondaryValue = String(secondaryValue);
}
}
console.log('formId secondaryValue', secondaryValue);
// console.log('formId secondaryValue', secondaryValue);
var check = checkDuplicate(secondaryValue);
if (check) {
@ -363,9 +387,7 @@ $('body').on('click', '.btnPolicyModel', function()
var data_for_the_rack_rate = JSON.parse(res.premiumData) ?? [];
var groupedData = groupByRackRateName(data_for_the_rack_rate) ?? [];
rarc_rate_json_array.push(res.jsonArray);
console.log('groupedData', groupedData)
if(policy_type_string == 'GMC'){
@ -395,7 +417,7 @@ $('body').on('click', '.btnPolicyModel', function()
unit_length = client_units_for_hide_unit_text_field.length;
}
console.log('unit_length', unit_length);
// console.log('unit_length', unit_length);
var policy_grid_id_value = null;
var secondary_policy_grid_id_value = null;
@ -453,7 +475,7 @@ $('body').on('click', '.btnPolicyModel', function()
checkboxdata = checkboxDataObject;
}
console.log('before create checkbox')
createCheckboxes(checkboxdata, additional_relationship, null, policy_type_id);
appendGridData(res.data, policy_grid_id_value);
if(premiumData[0]){
@ -501,8 +523,6 @@ $('body').on('click', '.btnPolicyModel', function()
console.error('Error Name:', error.name);
console.error('Error Message:', error.message);
console.error('Error Stack:', error.stack);
// Optional: handle the error in a user-friendly way
console.error('An error occurred while processing the data. Please try again.');
}
@ -594,8 +614,6 @@ $('body').on('click', '.btnPolicyModel', function()
});
console.log('after the form submit', rarc_rate_json_array);
$(document).on('change', 'select[id^="grid_"]', function(event)
{
@ -694,24 +712,25 @@ $('#grid').change(function()
function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = false, unique_id = false)
{
console.log('addgridhtmll function data', data)
console.log('addgridhtmll function data.unit', data.unit)
console.log('addgridhtmll function data.unit type',typeof data.unit)
console.log('addgridhtmll function unique id', unique_id)
console.log('addGridHTML si_or_bp', si_or_bp);
console.log('addGridHTML event', event);
console.log('addGridHTML ui_type', ui_type);
// console.log('addgridhtmll function data.unit', data.unit)
// console.log('addgridhtmll function data.unit type',typeof data.unit)
var secondaryValue = unique_id;
var grid_container = document.getElementById('grid_content_input');
console.log('step 1', grid_container);
// console.log('step 1', grid_container);
if (secondaryValue != false && secondaryValue != null) {
grid_container_id = 'grid_content_input_for_additional_' + secondaryValue;
grid_container = document.getElementById(grid_container_id);
console.log('step 2', grid_container);
// console.log('step 2', grid_container);
}
console.log('step 3', grid_container);
// console.log('step 3', grid_container);
var id_var = 'grid_';
@ -1301,14 +1320,14 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
}
console.log('grid_container step 4', grid_container)
// console.log('grid_container step 4', grid_container)
// console.log('grid_html', grid_html)
if(data == false){
$(grid_container).empty();
}
grid_container.insertAdjacentHTML('beforeend', grid_html);
console.log('grid_container step 5');
console.log('grid_container step 6', grid_container);
// console.log('grid_container step 5');
// console.log('grid_container step 6', grid_container);
if (dataIdValue == '1') {
@ -1345,31 +1364,30 @@ var Count = 1;
function appendGridtHtml(ui_type = false, secondary = false, data = false)
{
console.log('appendGridtHtml function data', data);
console.log('appendGridtHtml function data.unit', data.unit);
console.log('appendGridtHtml function data.unit type',typeof data.unit);
console.log('appendGridtHtml function ui_type', ui_type);
console.log('appendGridtHtml function secondary', secondary);
console.log('appendGridtHtml function typeof secondary', typeof secondary);
// console.log('appendGridtHtml function data.unit', data.unit);
// console.log('appendGridtHtml function data.unit type',typeof data.unit);
var html = '';
Count++;
var container = document.getElementById('grid_content_input');
console.log('appendGridtHtml function container step 1', container);
// console.log('appendGridtHtml function container step 1', container);
if (secondary != false && secondary != 'false' && secondary != null && secondary != 'null') {
container_id = 'grid_content_input_for_additional_' + secondary;
container = document.getElementById(container_id);
console.log('appendGridtHtml function container step 2', container);
// console.log('appendGridtHtml function container step 2', container);
}
console.log('appendGridtHtml function container step 3', container);
// console.log('appendGridtHtml function container step 3', container);
if (ui_type == '1') {
// console.log('step 1')
var currentTime = getCurrentTime();
// console.log(currentTime);
if ($("#si_or_bp").val() == 1 || data.si_or_bp == '1') {
@ -1465,7 +1483,7 @@ function appendGridtHtml(ui_type = false, secondary = false, data = false)
}
console.log('step 4')
// console.log('step 4')
} else if (ui_type == '3') {
@ -1807,9 +1825,9 @@ function appendGridtHtml(ui_type = false, secondary = false, data = false)
</div>`;
}
console.log('appendGridtHtml function container step 4', container);
// console.log('appendGridtHtml function container step 4', container);
container.insertAdjacentHTML('beforeend', html);
console.log('appendGridtHtml function container step 5', container);
// console.log('appendGridtHtml function container step 5', container);
// $('#gmc_add_more').hide();
// $('#gmc_add_more2').hide();
@ -2481,15 +2499,16 @@ function checkDuplicate(unique_id = null)
function basicPayMultiple(input)
{
console.log('basicPayMultiple function called')
// console.log('basicPayMultiple function called')
var inputId = input.id;
var inputValue = input.value.replace(/,/g, '');
var count = inputId.split('_')[2];
console.log('count :', count)
console.log('input :', input);
console.log('input_id :', input.id);
console.log('input_class :', input.className);
// console.log('count :', count)
// console.log('input :', input);
// console.log('input_id :', input.id);
// console.log('input_class :', input.className);
if (input.className.includes('basic_pay')) {
@ -2516,15 +2535,15 @@ function basicPayMultiple(input)
function basicMultiplierAndPremiumMultipiler(input)
{
console.log('basicPayMultipleforfirstone function called')
// console.log('basicPayMultipleforfirstone function called')
var inputId = input.id;
var inputValue = input.value.replace(/,/g, '');
console.log('input', input);
console.log('input id ', input.id);
console.log('input class ', input.className);
console.log('inputValue', inputValue);
// console.log('input', input);
// console.log('input id ', input.id);
// console.log('input class ', input.className);
// console.log('inputValue', inputValue);
if (input.className.includes('basic_multiplier')) {
@ -3019,39 +3038,23 @@ function createCheckboxes(obj, additional_relationship = [], unique_id = null, p
if (obj['self'] > 0 && obj['spouse'] == 0 && obj['childrens'] == 0 && obj['parents'] == 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-50px');
} else if (obj['self'] == 0 && obj['spouse'] > 0 && obj['childrens'] == 0 && obj['parents'] == 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-50px');
} else if (obj['self'] == 0 && obj['spouse'] == 0 && obj['childrens'] > 0 && obj['parents'] == 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-40px');
} else if (obj['self'] == 0 && obj['spouse'] == 0 && obj['childrens'] == 0 && obj['parents'] > 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-30px');
} else if (obj['self'] == 0 && obj['spouse'] == 0 && obj['childrens'] == 0 && obj['parents'] == 0 && obj['parents-in-law'] > 0) {
$('.radio-group .form-check').css('margin-right', '-20px');
} else if (obj['self'] > 0 && obj['spouse'] > 0 && obj['childrens'] == 0 && obj['parents'] == 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-10px');
} else if (obj['self'] > 0 && obj['spouse'] == 0 && obj['childrens'] > 0 && obj['parents'] == 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-5px');
} else if (obj['self'] > 0 && obj['spouse'] == 0 && obj['childrens'] == 0 && obj['parents'] > 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-15px');
} else if (obj['self'] > 0 && obj['spouse'] == 0 && obj['childrens'] == 0 && obj['parents'] == 0 && obj['parents-in-law'] > 0) {
$('.radio-group .form-check').css('margin-right', '-25px');
$('.radio-group .form-check').css('margin-right', '-60px');
} else if (obj['self'] == 0 && obj['spouse'] > 0 && obj['childrens'] > 0 && obj['parents'] == 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-35px');
} else if (obj['self'] == 0 && obj['spouse'] > 0 && obj['childrens'] == 0 && obj['parents'] > 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-45px');
} else if (obj['self'] == 0 && obj['spouse'] > 0 && obj['childrens'] == 0 && obj['parents'] == 0 && obj['parents-in-law'] > 0) {
$('.radio-group .form-check').css('margin-right', '-55px');
} else if (obj['self'] == 0 && obj['spouse'] == 0 && obj['childrens'] > 0 && obj['parents'] > 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-65px');
} else if (obj['self'] == 0 && obj['spouse'] == 0 && obj['childrens'] > 0 && obj['parents'] == 0 && obj['parents-in-law'] > 0) {
$('.radio-group .form-check').css('margin-right', '-75px');
} else if (obj['self'] == 0 && obj['spouse'] == 0 && obj['childrens'] == 0 && obj['parents'] > 0 && obj['parents-in-law'] > 0) {
$('.radio-group .form-check').css('margin-right', '-85px');
$('.radio-group .form-check').css('margin-right', '-110px');
} else if (obj['self'] == 0 && obj['spouse'] == 0 && obj['childrens'] == 0 && obj['parents'] > 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-60px');
} else if (obj['self'] == 0 && obj['spouse'] == 0 && obj['childrens'] == 0 && obj['parents'] == 0 && obj['parents-in-law'] > 0) {
$('.radio-group .form-check').css('margin-right', '-60px');
} else if (obj['self'] > 0 && obj['spouse'] == 0 && obj['childrens'] > 0 && obj['parents'] == 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-110px');
} else if (obj['self'] == 0 && obj['spouse'] == 0 && obj['childrens'] > 0 && obj['parents'] == 0 && obj['parents-in-law'] == 0) {
$('.radio-group .form-check').css('margin-right', '-110px');
} else if (obj['self'] > 0 && obj['spouse'] > 0 && obj['childrens'] == 0 && obj['parents'] > 0 && obj['parents-in-law'] > 0){
$('.radio-group .form-check').css('margin-right', '-60px');
} else if (obj['self'] > 0 && obj['spouse'] == 0 && obj['childrens'] == 0 && obj['parents'] > 0 && obj['parents-in-law'] > 0){
$('.radio-group .form-check').css('margin-right', '-60px');
} else {
// Add more else if combinations as needed or handle default case here
$('.radio-group .form-check').css('margin-right', '-110px');
}
@ -3352,6 +3355,8 @@ function appendNewTab(tabNameData = null, data = null)
tabContent.appendChild(newTabPane);
applyStyles(tabId);
var policy_grid_id = null;
var additional_relationship = [];
var premium_type = null;
@ -3368,12 +3373,12 @@ function appendNewTab(tabNameData = null, data = null)
additional_relationship = data[0].additional_relationship;
premium_type = data[0].premium_type;
data.shift();
data.shift(); //remove first index of the array
}
$.each(data, function(index, item) {
console.log('appendNewTab function index', index)
// console.log('appendNewTab function index', index)
policy_grid_id = item.policy_grid_id
additional_relationship = item.additional_relationship;
premium_type = item.premium_type;
@ -3382,12 +3387,10 @@ function appendNewTab(tabNameData = null, data = null)
});
$(`input[name="${policy_grid_id}_si[]"]`).each(function() {
// console.log(first+'_si[]', $(this));
$(this).trigger('keyup');
});
$(`input[name="${policy_grid_id}_premium[]"]`).each(function() {
// console.log(first+"_premium[]", $(this));
$(this).trigger('keyup');
});
}
@ -4288,4 +4291,35 @@ function checkValideUnits(unique_id = null)
}
}
function applyStyles(tabId) {
var dynamicId = `grid_content_input_for_additional_${tabId}`;
var element = document.getElementById(dynamicId);
if (element) {
element.style.overflowY = 'auto';
element.style.overflowX = 'hidden';
element.style.maxHeight = '350px';
var style = document.createElement('style');
style.innerHTML = `
#${dynamicId}::-webkit-scrollbar {
width: 8px;
}
#${dynamicId}::-webkit-scrollbar-thumb {
background-color: #888;
border-radius: 4px;
}
#${dynamicId}::-webkit-scrollbar-thumb:hover {
background-color: #555;
}
#${dynamicId}::-webkit-scrollbar-track {
background-color: #f1f1f1;
}
`;
document.head.appendChild(style);
}
}
</script>

View File

@ -140,8 +140,8 @@ function copyHeaders(unique_id) {
var client_units = localStorage.getItem('client_units');
client_units = JSON.parse(client_units);
console.log('copyHeaders function client_units', client_units);
console.log('copyHeaders function client_units.length', client_units.length)
// console.log('copyHeaders function client_units', client_units);
// console.log('copyHeaders function client_units.length', client_units.length)
let formatType = $('#grid').val();
@ -190,12 +190,9 @@ function copyHeaders(unique_id) {
console.log('copyHeaders function default headerString', headerString)
if (formatType == 1) {
console.log('copyHeaders function formatType 1', formatType)
// console.log('copyHeaders function formatType 1', formatType)
if(client_units.length == 1){
console.log('copyHeaders function client_units.length', client_units.length)
// console.log('copyHeaders function client_units.length', client_units.length)
delete excel_headers[formatType][secondKey].unit;
}
var headerString = Object.values(excel_headers[formatType][secondKey]).join("\t"); // Using specified format type for copying headers
@ -214,6 +211,11 @@ function copyHeaders(unique_id) {
function generateTable(unique_id) {
// $('.loader').fadeIn();
// $('.loader-mask').fadeIn();
console.log('generateTable Function called : ', printCurrentTime());
var client_units = localStorage.getItem('client_units');
client_units = JSON.parse(client_units);
@ -230,8 +232,8 @@ function generateTable(unique_id) {
console.log('generateTable obj', obj);
console.log('generateTable formatType', formatType);
console.log('generateTable data');
console.log(data)
// console.log('generateTable data');
// console.log(data)
console.log('generateTable secondKey', secondKey);
console.log('generateTable client_units', client_units);
@ -288,7 +290,7 @@ function generateTable(unique_id) {
if (formatType == 1) {
console.log('si_or_bp secondKey', secondKey)
// console.log('si_or_bp secondKey', secondKey)
expectedHeader = Object.keys(excel_headers[formatType][secondKey]);
}
@ -298,16 +300,16 @@ function generateTable(unique_id) {
}
console.log('expectedHeader', expectedHeader);
console.log('HEADERS' , JSON.stringify(header));
console.log('Excepted HEADERS' , JSON.stringify(expectedHeader));
console.log('secondKey' , secondKey);
// console.log('expectedHeader', expectedHeader);
// console.log('HEADERS' , JSON.stringify(header));
// console.log('Excepted HEADERS' , JSON.stringify(expectedHeader));
// console.log('secondKey' , secondKey);
if (secondKey != 2 && secondKey != undefined) {
console.log('expectedHeader' + secondKey + '-' + formatType);
console.log(expectedHeader);
console.log(excel_headers[formatType]);
// console.log('expectedHeader' + secondKey + '-' + formatType);
console.log('expectedHeader', expectedHeader);
// console.log(excel_headers[formatType]);
if (JSON.stringify(header) !== JSON.stringify(expectedHeader)) {
var expectedHeaders;
@ -488,7 +490,7 @@ function generateTable(unique_id) {
if(secondKey != 2 && secondKey != undefined){
console.log(secondKey)
// console.log(secondKey)
if ($('.duplicate').length > 0) {
//console.log('test');
toastr.warning("Duplicates found!", "warning");
@ -505,10 +507,18 @@ function generateTable(unique_id) {
}
submitData(unique_id, client_units);
$('.excel_textarea').val('');
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
console.log('generateTable Function end : ', printCurrentTime());
}
function submitData(unique_id, client_units)
{
console.log('submitData Function called : ', printCurrentTime());
console.log('submitData function unique id', unique_id);
console.log('submitData function client_units', client_units);
console.log('submitData function client_units first index', client_units[0]);
@ -623,7 +633,7 @@ function submitData(unique_id, client_units)
});
console.log(jsonData);
console.log('formatType', formatType);
// console.log('formatType', formatType);
if (unique_id != 'na') {
@ -672,71 +682,61 @@ function submitData(unique_id, client_units)
});
$(`input[name="${formatType}_si[]"]`).each(function() {
// //console.log($(this));
$(this).trigger('keyup');
$(this).trigger('change').keyup();
});
$(`input[name="${formatType}_premium[]"]`).each(function() {
// //console.log($(this));
$(this).trigger('keyup');
$(this).trigger('change').keyup();
});
$(`input[name="basic_pay[]"]`).each(function() {
// //console.log($(this));
$(this).trigger('keyup');
$(this).trigger('change').keyup();
});
$(`input[name="gpa_basic_si[]"]`).each(function() {
// //console.log($(this));
$(this).trigger('keyup');
$(this).trigger('change').keyup();
});
$(`input[name="gpa_basic_premium[]"]`).each(function() {
// //console.log($(this));
$(this).trigger('keyup');
$(this).trigger('change').keyup();
});
$(`input[name="gpa_sum_si2[]"]`).each(function() {
// //console.log($(this));
$(this).trigger('keyup');
$(this).trigger('change').keyup();
});
$(`input[name="gpa_sum_si[]"]`).each(function() {
// //console.log($(this));
$(this).trigger('keyup');
$(this).trigger('change').keyup();
});
$(`input[name="gpa_premium"]`).each(function() {
// //console.log($(this));
$(this).trigger('keyup');
$(this).trigger('change').keyup();
});
$(`input[name="gpa_si"]`).each(function() {
// //console.log($(this));
$(this).trigger('keyup');
$(this).trigger('change').keyup();
});
$(`input[name="gpa_premium29[]"]`).each(function() {
// //console.log($(this));
$(this).trigger('keyup');
$(this).trigger('change').keyup();
});
$(`input[name="gpa_si29[]"]`).each(function() {
// //console.log($(this));
$(this).trigger('keyup');
$(this).trigger('change').keyup();
});
console.log('submitData Function end : ', printCurrentTime());
}