FEAT_CLAIM_STATUS_FOR_MAIL_TEMPLATE_SRI
This commit is contained in:
commit
3bdf3f6bb5
@ -114,7 +114,8 @@ class TicketController extends BaseController
|
||||
'((AUTO_QUERY_CONTENT))' => 'auto_query_content',
|
||||
];
|
||||
$this->extraFields = [
|
||||
|
||||
1 => ['non_id_reason'],
|
||||
10 => ['pay_initiate_date'],
|
||||
3 => ['raised_date'],
|
||||
4 => ['raised_date'],
|
||||
5 => ['claim_number', 'registration_date'],
|
||||
|
||||
@ -68,6 +68,10 @@ class TicketMasterModel extends Model
|
||||
'return_remark',
|
||||
'cancel_remark',
|
||||
'awb_no_courier_name',
|
||||
|
||||
'non_id_reason',
|
||||
'head_rejection_reason',
|
||||
'pay_initiate_date',
|
||||
|
||||
];
|
||||
|
||||
|
||||
@ -1314,8 +1314,8 @@ $(document).ready(function(){
|
||||
|
||||
$(document).on('change', 'input[type="checkbox"][name="co_share_type[]"]', function() {
|
||||
|
||||
$('[name="base_premium[]"]').val("");
|
||||
$('[name="co_premium[]"]').val("");
|
||||
// $('[name="base_premium[]"]').val("");
|
||||
// $('[name="co_premium[]"]').val("");
|
||||
|
||||
let isAnyChecked = $('input[type="checkbox"][name="co_share_type[]"]:checked').length > 1;
|
||||
|
||||
@ -1764,7 +1764,7 @@ function checkAndDistributeTax(input)
|
||||
|
||||
function amountCalculation(input) {
|
||||
|
||||
console.log('amountCalculation - ' + input);
|
||||
console.log('amountCalculation : ' + input);
|
||||
let selectedOption = $('#policy_type_id').find('option:selected');
|
||||
let bap = selectedOption.data('bap');
|
||||
|
||||
@ -1816,10 +1816,8 @@ function amountCalculation(input) {
|
||||
// Calculate GST percentage
|
||||
let gst_per = igst;
|
||||
if (igst === 0) {
|
||||
console.log('called' + cgst + sgst);
|
||||
gst_per = parseFloat(cgst) + parseFloat(sgst);
|
||||
// gst_per = (cgst) + (sgst);
|
||||
console.log(gst_per);
|
||||
}
|
||||
|
||||
console.log('gst_per', gst_per);
|
||||
@ -4267,4 +4265,34 @@ function getCdAmount(cd_ac_pk, increment){
|
||||
|
||||
}
|
||||
|
||||
$('#bro_payable_by').on('change', function(){
|
||||
|
||||
var columnIndexes = [];
|
||||
$('#insurerTable thead th').each(function(index) {
|
||||
if(index == 0){
|
||||
console.log("columnIndexes is ", index);
|
||||
}else{
|
||||
amountCalculation(index);
|
||||
}
|
||||
columnIndexes.push(index);
|
||||
});
|
||||
console.log("columnIndexes", columnIndexes);
|
||||
|
||||
});
|
||||
|
||||
$(document).on('change', '#insurerTable input, #insurerTable select, #insurerTable textarea', function() {
|
||||
console.log('Changed in table:', $(this).attr('name'), 'Value:', $(this).val());
|
||||
getColumnIndexes()
|
||||
});
|
||||
|
||||
function getColumnIndexes() {
|
||||
$('#insurerTable thead th').each(function(index) {
|
||||
if (index === 0) {
|
||||
console.log("columnIndexes is", index);
|
||||
} else {
|
||||
amountCalculation(index);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -24,28 +24,28 @@
|
||||
<li class="nav-item">
|
||||
<a href="#general-tab" data-toggle="tab" class="nav-link px-2 py-1 active" id="general_tab"
|
||||
aria-expanded="true">
|
||||
<i class="mdi mdi-contacts mr-1"></i>
|
||||
<i class="mdi mdi-ticket-account"></i>
|
||||
<span class="d-none d-sm-inline-block">General</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#reply-tab" data-toggle="tab" class="nav-link px-2 py-1" id="reply_tab"
|
||||
aria-expanded="false">
|
||||
<i class="fa fa-file mr-1"></i>
|
||||
<i class="mdi mdi-message-processing"></i>
|
||||
<span class="d-none d-sm-inline-block">Reply</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#note-tab" data-toggle="tab" class="nav-link px-2 py-1" id="note_tab"
|
||||
aria-expanded="false">
|
||||
<i class="mdi mdi-account-switch mr-1"></i>
|
||||
<span class="d-none d-sm-inline-block">Note</span>
|
||||
<i class="mdi mdi-note-text"></i>
|
||||
<span class="d-none d-sm-inline-block">Notes</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#history-tab" data-toggle="tab" class="nav-link px-2 py-1" id="history_tab"
|
||||
aria-expanded="false">
|
||||
<i class="mdi mdi-source-branch mr-1"></i>
|
||||
<i class="mdi mdi-history"></i>
|
||||
<span class="d-none d-sm-inline-block">History</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -294,6 +294,12 @@
|
||||
value="<?= isset($ticket_data['settle_letter']) ? $ticket_data['settle_letter'] : '' ?>" name="settle_letter">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 payment" style="display: none;">
|
||||
<label for="pay_initiate_date">Payment Initiate Date</label>
|
||||
<input type="text" class="form-control datepicker" id="pay_initiate_date" placeholder="Select Payment Initiate Date"
|
||||
value="<?= isset($ticket_data['pay_initiate_date']) ? $ticket_data['pay_initiate_date'] : '' ?>" name="pay_initiate_date">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 returned" style="display: none;">
|
||||
<label for="return_remark">Return Remark</label>
|
||||
<textarea class="form-control" id="return_remark" placeholder="Enter Return Remark" name="return_remark"><?= isset($ticket_data['return_remark']) ? $ticket_data['return_remark'] : '' ?></textarea>
|
||||
@ -304,13 +310,17 @@
|
||||
<textarea class="form-control" id="cancel_remark" placeholder="Enter Cancel Remark" name="cancel_remark"><?= isset($ticket_data['cancel_remark']) ? $ticket_data['cancel_remark'] : '' ?></textarea>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-md-6 returned" style="display: none;">
|
||||
<label for="awb_no_courier_name">AWB No with Courier Name</label>
|
||||
<input type="text" class="form-control" id="awb_no_courier_name" placeholder="eg : 0001/ST Courier"
|
||||
value="<?= isset($ticket_data['awb_no_courier_name']) ? $ticket_data['awb_no_courier_name'] : '' ?>" name="awb_no_courier_name">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 non_id" style="display: none;">
|
||||
<label for="non_id_reason">Non ID Reason</label>
|
||||
<textarea class="form-control" id="non_id_reason" placeholder="Enter Cancel Remark" name="non_id_reason"><?= isset($ticket_data['non_id_reason']) ? $ticket_data['non_id_reason'] : '' ?></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12 text-right m-b-0" style="margin-top: 29px;">
|
||||
@ -363,6 +373,7 @@ $(document).ready(function() {
|
||||
flatpickr("#denial_date", { dateFormat: "d/m/Y", allowInput: false });
|
||||
flatpickr("#approved_date", { dateFormat: "d/m/Y", allowInput: false });
|
||||
flatpickr("#settled_date", { dateFormat: "d/m/Y", allowInput: false });
|
||||
flatpickr("#pay_initiate_date", { dateFormat: "d/m/Y", allowInput: false });
|
||||
|
||||
// updateClaimStatusDisplay("<?= isset($ticket_data['claim_status_id']) ? $ticket_data['claim_status_id'] : 0 ?>")
|
||||
var extraFields = <?= json_encode(isset($extra_fields) ? $extra_fields : []); ?>;
|
||||
@ -408,7 +419,7 @@ $(document).ready(function() {
|
||||
function updateClaimStatusDisplay(value) {
|
||||
|
||||
// Hide all sections and remove required attribute from their inputs and textareas
|
||||
let sections = $('.cda_ir, .settled, .approved, .rejected, .up_qdr, .up_cnu, .canceled, .returned');
|
||||
let sections = $('.cda_ir, .settled, .approved, .rejected, .up_qdr, .up_cnu, .canceled, .returned, .payment, .non_id');
|
||||
sections.hide().find('input, textarea').removeAttr('required');
|
||||
|
||||
// Determine which section to show
|
||||
@ -429,11 +440,22 @@ function updateClaimStatusDisplay(value) {
|
||||
showClass = '.canceled';
|
||||
} else if (value == 14) { // RETURNED
|
||||
showClass = '.returned';
|
||||
} else if (value == 1) { // NON ID
|
||||
showClass = '.non_id';
|
||||
} else if (value == 10) { // PAYMENT INITIATED
|
||||
showClass = '.payment';
|
||||
}
|
||||
|
||||
// Show the relevant section and enable required attributes
|
||||
if (showClass) {
|
||||
$(showClass).show().find('input, textarea').attr('required', true);
|
||||
// $(showClass).show().find('input, textarea').attr('required', true);
|
||||
$(showClass).show().find('input, textarea').attr('required', true).each(function() {
|
||||
var $label = $("label[for='" + $(this).attr('id') + "']");
|
||||
if ($label.length && !$label.find('.text-danger').length) {
|
||||
$label.append(' <span class="text-danger">*</span>');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -455,7 +477,7 @@ function claimStatusFieldChanges(fields) {
|
||||
|
||||
var $label = $parentDiv.find("label[for='" + fieldId + "']");
|
||||
if ($label.length && !$label.find(".text-danger").length) {
|
||||
$label.append(' <span class="text-danger">*</span>');
|
||||
// $label.append(' <span class="text-danger">*</span>');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -477,7 +499,7 @@ function claimStatusFieldRemoveREquired(fields, remove_or_add, thirdClass) {
|
||||
var $label = $parentDiv.find("label[for='" + fieldId + "']");
|
||||
// if(remove_or_add == false){
|
||||
// $parentDiv.find("label[for='" + fieldId + "'] .text-danger").remove();
|
||||
// console.log('one', remove_or_add);
|
||||
// // console.log('one', remove_or_add);
|
||||
// }else{
|
||||
// if ($label.length && !$label.find(".text-danger").length) {
|
||||
// $label.append(' <span class="text-danger">*</span>');
|
||||
@ -512,10 +534,14 @@ $(document).on("input", function (event) {
|
||||
|
||||
if (thirdClass) {
|
||||
claimStatusFieldRemoveREquired(fields, false, thirdClass);
|
||||
let $label = $(thirdClass).find("label");
|
||||
if ($label.length && !$label.find(".text-danger").length) {
|
||||
$label.append(' <span class="text-danger">*</span>');
|
||||
}
|
||||
$(thirdClass).each(function() {
|
||||
let $label = $(this).find("label");
|
||||
$label.each(function() {
|
||||
if (!$(this).find(".text-danger").length) {
|
||||
$(this).append(' <span class="text-danger">*</span>');
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
claimStatusFieldRemoveREquired($field, false, '');
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<table id="scroll-horizontal-datatable" class="table w-100">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Label</th>
|
||||
<!-- <th>Old Value</th>
|
||||
<th>New Value</th> -->
|
||||
<th>Change</th>
|
||||
|
||||
@ -74,11 +74,11 @@ table.dataTable tbody td {
|
||||
title=" <?php
|
||||
if ($row['claim_status_id'] == 8) {
|
||||
if ($row['is_head_approved'] == 0) {
|
||||
echo 'Waiting For Head Approvel';
|
||||
echo 'Waiting for approvel';
|
||||
} elseif ($row['is_head_approved'] == 1) {
|
||||
echo 'Head Approved';
|
||||
echo 'Rejection approved';
|
||||
} elseif ($row['is_head_approved'] == 2) {
|
||||
echo 'Head Rejected';
|
||||
echo 'Rejection not approved';
|
||||
} else {
|
||||
echo $row['status'];
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" onclick="submitToRedirectTicketNewUrl(this)">submit</button>
|
||||
<button type="button" class="btn btn-primary" onclick="submitToRedirectTicketNewUrl(this)">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user