CHANGE_BDS
This commit is contained in:
parent
fdb559feb4
commit
24524aab62
@ -1211,19 +1211,19 @@
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
document.getElementById('vehicle_form').addEventListener('reset', function(event) {
|
||||
console.log('vehicle_form reset called', event.type);
|
||||
if(isVehicleFormSubmitting == false){
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
// document.getElementById('vehicle_form').addEventListener('reset', function(event) {
|
||||
// console.log('vehicle_form reset called', event.type);
|
||||
// if(isVehicleFormSubmitting == false){
|
||||
// event.preventDefault();
|
||||
// }
|
||||
// });
|
||||
|
||||
document.getElementById('client_form').addEventListener('reset', function(event) {
|
||||
console.log('client_form reset called', event.type);
|
||||
if(isClientFormSubmitting == false){
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
// document.getElementById('client_form').addEventListener('reset', function(event) {
|
||||
// console.log('client_form reset called', event.type);
|
||||
// if(isClientFormSubmitting == false){
|
||||
// event.preventDefault();
|
||||
// }
|
||||
// });
|
||||
|
||||
$('#upload_enrollment_model').on('hide.bs.modal', function (e) {
|
||||
|
||||
@ -2337,10 +2337,12 @@
|
||||
|
||||
// $('#variance_' + input).val(!isNaN(variance) && isFinite(variance) ? variance.toFixed(2) : '0.00');
|
||||
|
||||
checkCDAmountForBasePremium(input);
|
||||
setCoPremiums(input);
|
||||
|
||||
console.log('############################## END AMOUNT CALCULATION ############################################')
|
||||
|
||||
|
||||
}
|
||||
|
||||
function actualAmountCalculation(input, field = null){
|
||||
@ -4135,7 +4137,7 @@
|
||||
newCell = `<td><input type="text" class="right-align-input" id="non_comm_per_amt_${insurerCount}" name="non_comm_per_amt[]" oninput="" onkeypress="return onlyNumbers(event)"></td>`;
|
||||
break;
|
||||
case 7: // Base Premium
|
||||
newCell = `<td><input type="text" class="right-align-input" id="base_premium_${insurerCount}" name="base_premium[]" oninput="" onkeypress="return onlyNumbers(event)" onkeyup="checkCDAmountForBasePremium(this);"></td>`;
|
||||
newCell = `<td><input type="text" class="right-align-input" id="base_premium_${insurerCount}" name="base_premium[]" oninput="" onkeypress="return onlyNumbers(event)"></td>`;
|
||||
break;
|
||||
case 8: // TP Premium
|
||||
newCell = `<td><input type="text" class="right-align-input" id="tp_premium_${insurerCount}" name="tp_premium[]" oninput="" onkeypress="return onlyNumbers(event)"></td>`;
|
||||
@ -4835,22 +4837,27 @@
|
||||
let client_type = $('#client_type').val();
|
||||
console.log('client type', client_type);
|
||||
|
||||
let base_premium = $(input).val();
|
||||
let base_premium = $('#base_premium_' +input).val();
|
||||
console.log("base_premium:", base_premium);
|
||||
|
||||
let tp_premium = $('#tp_premium_' +input).val();
|
||||
console.log("tp_premium:", tp_premium);
|
||||
|
||||
// return;
|
||||
|
||||
if(client_type == 1){
|
||||
|
||||
let current_total_amt = $('#base_cd_amount').val() ?? 0;
|
||||
console.log('current_total_amt', current_total_amt);
|
||||
|
||||
// Extract increment value from input ID
|
||||
let input_id = input.id;
|
||||
console.log("input_id:", input_id);
|
||||
// let input_id = input.id;
|
||||
// console.log("input_id:", input_id);
|
||||
|
||||
let increment = input_id.split("_").pop();
|
||||
console.log("increment:", increment);
|
||||
// let increment = input_id.split("_").pop();
|
||||
// console.log("increment:", increment);
|
||||
|
||||
let total_amt = $('#total_amt_' + increment).val();
|
||||
let total_amt = $('#total_amt_' + input).val();
|
||||
console.log("total_amt:", total_amt);
|
||||
|
||||
let differnce_bp_amt = 0;
|
||||
@ -4872,7 +4879,7 @@
|
||||
console.log("total_amt:", total_amt);
|
||||
|
||||
// Get the corresponding `cd_ac_no` value
|
||||
let cd_ac_no = $('#cd_ac_no_' + increment).val();
|
||||
let cd_ac_no = $('#cd_ac_no_' + input).val();
|
||||
console.log("cd_ac_no:", cd_ac_no);
|
||||
|
||||
// Validate inputs
|
||||
@ -4891,6 +4898,9 @@
|
||||
|
||||
// Send AJAX request
|
||||
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
|
||||
|
||||
console.log('#################################### Check CD Amount For Base Premium Response ####################################');
|
||||
|
||||
console.log('Data fetched successfully:', response);
|
||||
|
||||
if (response.status) {
|
||||
@ -4911,6 +4921,9 @@
|
||||
} else {
|
||||
toastr.error(response.message || 'Unable to fetch data', 'ERROR');
|
||||
}
|
||||
|
||||
console.log('#################################### End Check CD Amount For Base Premium Response ####################################');
|
||||
|
||||
}, function(xhr, status, error) {
|
||||
console.error('Error fetching data:', error);
|
||||
console.error(xhr.responseText);
|
||||
@ -5634,4 +5647,10 @@
|
||||
|
||||
});
|
||||
|
||||
$(document).on("input change", "input[name='total[]']", function () {
|
||||
let val = $(this).val();
|
||||
console.log("✅ total[] changed:", val);
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user