CHANGE_POLICY_NO_DUB : RV

This commit is contained in:
VENKATESHWARAN 2025-09-26 14:46:35 +05:30
parent 3f19dea530
commit 439156863e

View File

@ -129,7 +129,7 @@
<div class="form-group col-md-4">
<label for="policy_no">Policy No<span class="text-danger">*</span></label>
<input value="" type="text" class="form-control" placeholder="Enter Policy Number " name="policy_no" id="policy_no" required>
<input value="" type="text" class="form-control"oninput="checkPolicy No(this)" placeholder="Enter Policy Number" name="policy_no" id="policy_no" required>
</div>
</div>
@ -1832,33 +1832,35 @@
}
$('#policy_no').change(function(){
//check dublicate policy number
function checkPolicyNo() {
var policy_no = $(this).val();
console.log(policy_no +'-'+policy_no.length);
var policy_no = $('#policy_no').val();
console.log(policy_no + '-' + policy_no.length);
policy_no = policy_no.trim();
console.log(policy_no +'-'+policy_no.length);
console.log(policy_no + '-' + policy_no.length);
$.ajax({
url: '<?php echo base_url('util/check_policy_no/');?>'+policy_no,
url: '<?php echo base_url('util/check_policy_no/');?>' + policy_no,
type: "GET",
dataType: 'json',
success: function (res) {
console.log(res);
if (res.status == true) {
console.log(res)
if(res.status == true){
toastr.warning(res.message, 'warning');
$('#policy_no').val('');
}else{
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
}
}
});
})
}
$(document).ready(function () {
// Check if the URL contains a hash